No project description provided
Project description
Mech Server
A CLI to create, deploy and manage Mechs — AI agents that execute tasks on-chain for payment — on the Olas Marketplace.
Note: The codebase uses the term service (from the underlying Open Autonomy framework) interchangeably with AI agent.
Quick Start
poetry install
poetry run mech setup -c <chain> # first-time setup; prompts for RPC URL and wallet funding
# edit ~/.operate-mech/.env and set your API keys
poetry run mech run -c <chain> # run via Docker
poetry run mech stop -c <chain> # stop when done
Supported Chains
| Chain | Native | OLAS Token | USDC Token | Nevermined |
|---|---|---|---|---|
| Gnosis | ✅ | ✅ | ❌ | ✅ |
| Base | ✅ | ✅ | ❌ | ✅ |
| Polygon | ✅ | ✅ | ✅ | ✅ |
| Optimism | ✅ | ✅ | ❌ | ✅ |
The mech payment type is selected at deployment time via the MECH_TYPE env variable.
Requirements
- Python
>=3.10, <3.12 - Poetry
- Docker Engine + Docker Compose
- Tendermint
==0.34.19(only for--devmode)
Commands
| Command | Description |
|---|---|
mech setup -c <chain> |
Full first-time setup: agent build, mech deployment, env config, key setup, metadata generation, IPFS publish, and on-chain update |
mech run -c <chain> |
Run the mech AI agent via Docker |
mech run -c <chain> --dev |
Dev mode: push local packages to IPFS, then run on host (no Docker) |
mech stop -c <chain> |
Stop a running mech AI agent |
mech deploy-mech -c <chain> |
Deploy a mech on the marketplace (runs automatically during setup) |
mech push-metadata |
Generate metadata.json from packages and publish to IPFS |
mech update-metadata |
Update the metadata hash on-chain via Safe transaction |
mech add-tool <author> <name> |
Scaffold a new mech tool |
What mech setup does
mech setup runs the following steps in order:
- Agent build — creates the AI agent via
olas-operate-middleware(skipped if already set up) - Mech deployment — deploys a mech on the marketplace (skipped if already deployed)
- Env configuration — writes
~/.operate-mech/.envwith required variables - Private key setup — configures operator and agent keys
- Metadata generation — generates
metadata.jsonfrom package definitions - IPFS publish — pushes metadata to IPFS
- On-chain update — updates the metadata hash on-chain via Safe transaction
Adding a tool
poetry run mech add-tool <author> <tool_name> -d "My tool description"
Implement the tool in ~/.operate-mech/packages/<author>/customs/<tool_name>/<tool_name>.py, then publish and register on-chain:
poetry run mech push-metadata
poetry run mech update-metadata
See the documentation for the full tool creation, publishing, and on-chain registration workflow.
Documentation
Find the full tutorial (Hello World, creating and publishing tools, sending requests) at stack.olas.network.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mech_server-0.5.0.tar.gz.
File metadata
- Download URL: mech_server-0.5.0.tar.gz
- Upload date:
- Size: 38.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4cab68488344f17659370e22f117eb2ce01e4a268e20c5428ff094b407e8643
|
|
| MD5 |
c443a02452b6f4018c5b7ac9ad4053e5
|
|
| BLAKE2b-256 |
5f15354ef62b5743b58d11a9bfb81fe76552cee25632454f625e3dbd1485f9bc
|
File details
Details for the file mech_server-0.5.0-py3-none-any.whl.
File metadata
- Download URL: mech_server-0.5.0-py3-none-any.whl
- Upload date:
- Size: 64.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da28d2695c5586dc2eefb53d0436a51e4faaa0e0ae387d9f1846c4a21937cc30
|
|
| MD5 |
2f258bd43b6e67b200e342d1703fbeb3
|
|
| BLAKE2b-256 |
4cdb0f8833aa5c45580b3fff6f46f80e0545ac768a3d497de996a281d5e3d857
|