You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+24-3
Original file line number
Diff line number
Diff line change
@@ -95,14 +95,17 @@ The EOA you use must have enough funds to pay for the Mech requests, or alternat
95
95
96
96
### Select the mech you are going to send requests to
97
97
98
-
Mechs are deployed to several networks. Find the list of supported networks and corresponging mech addresses [here](https://github.com/valory-xyz/mech?tab=readme-ov-file#examples-of-deployed-mechs).
98
+
Mechs can receive requests via the [Mech Marketplace](https://github.com/valory-xyz/ai-registry-mech/) or directly. We call the last ones _Legacy Mechs_.
99
+
Mechs are deployed on several networks. Find the list of supported networks and corresponding mech addresses [here](https://github.com/valory-xyz/mech?tab=readme-ov-file#examples-of-deployed-mechs). Additionally, on Gnosis you can find more available Mechs [here](https://mech.olas.network/) (click on the tab "Legacy Mech"in order to see Legacy Mech and "Mech Marketplace"for the ones which receive requests via the Mech Marketplace).
99
100
100
101
### Generate Mech requests
101
102
103
+
#### Legacy Mechs
104
+
102
105
The basic usage of the Mech Client is as follows:
103
106
104
107
```bash
105
-
mechx interact <prompt><agent_id>
108
+
mechx interact <prompt>--agent_id <agent_id>
106
109
```
107
110
108
111
where agent with `<agent_id>` will process `<prompt>` with the default options. Each chain has its own set of Mech agents. You can find the agent IDs for each chain on the [Mech Hub](https://aimechs.autonolas.network/registry) or on the [Mech repository](https://github.com/valory-xyz/mech?tab=readme-ov-file#examples-of-deployed-mechs).
@@ -141,7 +144,7 @@ Some useful options:
141
144
Example of a request specifying a key file and tool:
142
145
143
146
```bash
144
-
mechx interact "write a short poem" 6 --key ~/ethereum_private_key.txt --tool openai-gpt-3.5-turbo --chain-config gnosis --confirm on-chain
147
+
mechx interact "write a short poem"--agent_id 6 --key ~/ethereum_private_key.txt --tool openai-gpt-3.5-turbo --chain-config gnosis --confirm on-chain
145
148
```
146
149
147
150
You will see an output like this:
@@ -156,6 +159,17 @@ Data arrived: https://gateway.autonolas.tech/ipfs/f01701220a462120d5bb03f406fa5e
156
159
Data from agent: {'requestId': 100407405856633966395081711430940962809568685031934329025999216833965518452765, 'result': "In a world of chaos and strife,\nThere's beauty in the simplest of life.\nA gentle breeze whispers through the trees,\nAnd birds sing melodies with ease.\n\nThe sun sets in a fiery hue,\nPainting the sky in shades of blue.\nStars twinkle in the darkness above,\nGuiding us with their light and love.\n\nSo take a moment to pause and see,\nThe wonders of this world so free.\nEmbrace the joy that each day brings,\nAnd let your heart soar on gentle wings.", 'prompt': 'write a short poem', 'cost_dict': {}, 'metadata': {'model': None, 'tool': 'openai-gpt-3.5-turbo'}}
157
160
```
158
161
162
+
#### With the Mech Marketplace
163
+
164
+
With the Mech Marketplace, the basic usage of the Mech Client is as follows.
The Mech agent which corresponds to the `priority_mech_address`in`<chain_config>` will process `<prompt>` with the default options. Additionally to other options which are the same as for legacy Mechs, this usage has the following option:
171
+
172
+
`--use-offchain <bool>`: use the off-chain method to send requests to a Mech via the Mech Marketplace. Set to False in order to use the on-chain method.
159
173
160
174
### List tools available for agents
161
175
@@ -267,6 +281,8 @@ Output Schema:
267
281
268
282
### Chain configuration
269
283
284
+
#### For legacy Mechs
285
+
270
286
Default configurations fordifferent chains are storedin the file [configs/mechs.json](./mech_client/configs/mechs.json). If `--chain-config` parameter is not specified, the Mech Client will choose the first configuration on the JSON.
271
287
272
288
Additionally, you can override any configuration parameter by exporting any of the following environment variables:
@@ -359,6 +375,11 @@ This script will:
359
375
- Retrieve and display the description of a specific tool using its unique identifier.
360
376
- Retrieve and display the input and output schema of a specific tool using its unique identifier.
361
377
378
+
#### For Mechs receiving requests via the Mech Marketplace
379
+
380
+
In this case, the script is the same, except for the functionresult. When this functionhas no argument agent_id,
381
+
the request is sent to the Mech Marketplace. The target Mech to which the request is relayed should be in the chain_config file (key `priority_mech_address`).
382
+
362
383
## Developer installation
363
384
364
385
To setup the development environment for this project, clone the repository and run the following commands:
0 commit comments