Package: mech-client
mech-clientBasic client to interact with a mechWarningThis is a hacky alpha version of the client - don't rely on it as production software.Installationpipinstallmech-clientThen, set a websocket endpoint for Gnosis RPC like so:exportWEBSOCKET_ENDPOINT=<YOURENDPOINT>CLI:Usage:mechx[OPTIONS]COMMAND[ARGS]...Command-linetoolforinteractingwithmechs.

Options:--versionShowtheversionandexit.--helpShowthismessageandexit.

Commands:interactInteractwithamechspecifyingapromptandtool.prompt-to-ipfsUploadapromptandtooltoIPFSasmetadata.push-to-ipfsUploadafiletoIPFS.Usage:First, create a private key in fileethereum_private_key.txtwith this command:aeagenerate-keyethereumEnsure the private key carries funds on Gnosis Chain.Second, run the following command to instruct the mech with<prompt>and<agent_id>:mechxinteract<prompt><agent_id>The command will prompt you with all available tools for the agent and you can select which tool you want to useSelect prompting tool
|--------------------------------------------------|
| ID | Tool                                        |
|--------------------------------------------------|
| 0  | openai-text-davinci-002                     |
| ...| ...                                         |
|--------------------------------------------------|
Tool ID >If you are aware about the tools that are provided by an agent you can directly provide tool as a command line argumentmechxinteract<prompt><agent_id>--tool<tool>If you already have a funded key file on locally you can provide path the key using--keyflag.mechxinteract<prompt><agent_id>--key<key_file>Example output:mechxinteract"write a short poem"3--key~/gnosis_key--toolopenai-text-davinci-003
Promptuploaded:https://gateway.autonolas.tech/ipfs/f01701220ad773628911d12e28f005e3f249e990d684e5dba07542259195602f9afed30bf
Transactionsent:https://gnosisscan.io/tx/0x0d9209e32e965a820b9e80accfcd71ea3b1174b9758dd251c2e627a60ec426a5
Createdon-chainrequestwithID111240237160304797537720810617416341148235899500021985333360197012735240803849Dataarrived:https://gateway.autonolas.tech/ipfs/bafybeifk2h35ncszlze7t64rpblfo45rezc33xzbya3cjiyumtaioyat3e
Datafromagent:{'requestId':111240237160304797537720810617416341148235899500021985333360197012735240803849,'result':"\n\nI am brave and I'm strong\nI don't hide away my song\nI am here and I'm proud\nMy voice will be heard loud!"}By default the client will wait for data to arrive from on-chain using the websocket subscription and off-chain using the ACN and show you the result which arrives first. You can specify the type of confirmation you want using--confirmflag like thismechxinteract"write a short poem"3--key~/gnosis_key--toolopenai-text-davinci-003--confirmon-chain
Promptuploaded:https://gateway.autonolas.tech/ipfs/f017012205e37f761221a8ba4005e91c36b94153e9432b8888ff2acae6b101dd5a5de6768
Transactionsent:https://gnosisscan.io/tx/0xf1ef63f617717bbb8deb09699af99aa39f10155d33796de2fd7eb61c9c1458b6
Createdon-chainrequestwithID81653153529124597849081567361606842861262371002932574194580478443414142139857Dataarrived:https://gateway.autonolas.tech/ipfs/f0170122069b55e077430a00f3cbc3b069347e901396f978ff160eb2b0a947872be1848b7
Datafromagent:{'requestId':81653153529124597849081567361606842861262371002932574194580478443414142139857,'result':"\n\nA summer breeze, so sweet,\nA gentle reminder of summer's heat.\nThe sky so blue, no cloud in sight,\nA perfect day, a wondrous sight."}Release guide:Bump versions inpyproject.tomlandmech_client/__init__.pypoetry lockrm -rf distautonomy packages sync --update-packagesmake eject-packagesthenpoetry publish --build --username=<username> --password=<password>.