// Documentation
Developer Docs
Everything you need to build, deploy, and operate autonomous AI agents with AmirCrew Labs, powered by the Claude API and the Model Context Protocol (MCP).
Introduction
AmirCrew Labs provides autonomous agent infrastructure for web3 institutions, research teams, and developers. Agents connect to external systems through MCP servers, reason with the Claude API, and execute tasks inside isolated Docker sandboxes, 24/7, without human babysitting.
Three capabilities define the platform:
- Autonomous Agentic Gateway bridges agents to messaging platforms and automation systems, so chat becomes a live command surface.
- On-Chain & Document Synthesizer ingests thick whitepapers, DAO proposals, and raw transaction data into structured signal using a massive context window.
- Enterprise-Grade Security & Secrets covers credential vaulting, API key management, and encryption for continuous operation.
Quickstart
Get an autonomous agent running locally in three steps.
1. Install the CLI
npm i -g @amircrew/cli
2. Authenticate
amircrew login
The CLI opens a browser session and stores a scoped token in your OS keychain, never in plaintext.
3. Run your first agent
# create a project + scaffold an agent amircrew init my-agent cd my-agent # start the agent runtime amircrew run
→ booting autonomous agent ac-01 … ready → mcp servers: onchain, documents, telegram, secrets ✓ agent listening on http://localhost:8787
Installation
Requirements: Node.js 20+ or Python 3.11+, and Docker for sandboxed execution.
Node.js
npm i -g @amircrew/cli
Python
pip install amircrew
Docker (recommended)
docker pull ghcr.io/amircrew/runtime:latest
Authentication
All API requests authenticate with a bearer token. Create a key from the console, then export it:
export AMIRCREW_API_KEY="ac_live_••••••••••••••••"
Send it on every request:
curl https://api.amircrew.org/v1/agents \
-H "Authorization: Bearer $AMIRCREW_API_KEY"Autonomous Agents
An agent is a long-running process that reasons with Claude, calls tools exposed by MCP servers, and acts on results. Agents are declarative: you describe goals and tools, not step-by-step scripts.
import { Agent } from "@amircrew/sdk"; const agent = new Agent({ name: "treasury-monitor", model: "claude-sonnet", tools: ["onchain.read", "documents.search", "telegram.send"], schedule: "*/15 * * * *", // every 15 min }); agent.on("anomaly", async (e) => { await agent.tools.telegram.send(`⚠️ ${e.summary}`); });
Model Context Protocol
MCP is the open standard that connects agents to tools and data. AmirCrew ships four first-party servers, and you can register your own.
| Server | Tools | Purpose |
|---|---|---|
onchain | read, watch, simulate | Query balances, events, and simulate transactions across chains. |
documents | ingest, search, synthesize | Parse whitepapers, DAO proposals, and PDFs into structured output. |
telegram | send, reply, listen | Bridge agents to Telegram chats and channels. |
secrets | get, put, rotate | Read/write encrypted credentials at runtime. |
Registering a custom server
amircrew mcp add my-server --command "node ./server.js"Agentic Gateway
The gateway routes inbound messages from connected platforms to the right agent, maintains conversation
context, and streams responses back. Configure a route in amircrew.config.json:
{
"gateway": {
"routes": [
{ "source": "telegram", "agent": "treasury-monitor" }
]
}
}On-Chain & Document Synthesizer
Ingest large corpora and transaction histories, then ask questions in natural language. The synthesizer keeps a massive context window so it never loses the thread across long documents.
const result = await agent.documents.synthesize({ sources: ["proposal-412.pdf", "treasury-2025.csv"], question: "What are the top 3 risks and their on-chain evidence?", citations: true }); console.log(result.summary);
Docker Sandbox
Every agent task that executes code runs inside an ephemeral container with a read-only filesystem, no network by default, and CPU/memory limits. Enable network access per task:
await agent.exec({ cmd: "python analyze.py", sandbox: { network: false, cpu: "1", memory: "512Mi", timeout: 30000 } });
REST API
Base URL: https://api.amircrew.org/v1. All endpoints require a bearer token.
| Method | Endpoint | Description |
|---|---|---|
| GET | /agents | List all agents in the current project. |
| POST | /agents | Create a new agent. |
| GET | /agents/:id | Retrieve an agent and its current status. |
| POST | /agents/:id/run | Trigger a single agent run. |
| POST | /synthesize | Synthesize a question over provided sources. |
| GET | /runs/:id | Fetch a run's logs and results. |
| DELETE | /agents/:id | Stop and delete an agent. |
Example: create an agent
curl -X POST https://api.amircrew.org/v1/agents \ -H "Authorization: Bearer $AMIRCREW_API_KEY" \ -H "Content-Type: application/json" \ -d '{"name":"treasury-monitor","model":"claude-sonnet"}'
{
"id": "agt_9f2c1b",
"name": "treasury-monitor",
"status": "active",
"created_at": "2026-01-14T09:12:03Z"
}CLI Commands
| Command | Description |
|---|---|
amircrew login | Authenticate and store a scoped token. |
amircrew init <name> | Scaffold a new agent project. |
amircrew run | Start the local agent runtime. |
amircrew mcp add <server> | Register an MCP server. |
amircrew deploy | Deploy the agent to production. |
amircrew logs <agent> | Stream runtime logs. |
amircrew secrets set <key> | Store an encrypted secret. |
Security & Secrets
Credentials are encrypted at rest with envelope encryption and decrypted only inside the agent runtime. Secrets are never written to logs or exposed to sandboxed code unless explicitly injected.
- Envelope encryption: per-project data keys wrapped by a root key.
- Scoped tokens: keys are limited to specific agents and actions.
- Automatic rotation: rotate keys on a schedule with
amircrew secrets rotate. - Audit trail: every secret access is logged with actor, time, and agent id.
Error Codes
| Code | Meaning | Fix |
|---|---|---|
401 | Missing or invalid token. | Re-run amircrew login or check the header. |
403 | Token lacks scope for this action. | Create a key with the required scope. |
404 | Agent or run not found. | Verify the id belongs to your project. |
429 | Rate limit exceeded. | Back off and retry with exponential delay. |
sandbox_timeout | Task exceeded its time limit. | Increase timeout or optimize the task. |
Telegram Gateway
Connect an agent to Telegram in two steps.
1. Link your bot
amircrew gateway connect telegram --token "$BOT_TOKEN"2. Route messages to an agent
amircrew gateway route telegram --agent treasury-monitor --chat "@my_channel"Messages from that chat now reach the agent, and replies stream back to Telegram.
Deployment
Deploy an agent runtime to AmirCrew Cloud with a single command:
amircrew deploy --prod
Or self-host with Docker:
docker run -d --name ac-runtime \ -e AMIRCREW_API_KEY=$AMIRCREW_API_KEY \ -p 8787:8787 \ ghcr.io/amircrew/runtime:latest
FAQ
Which model does AmirCrew use?
Agents run on the Claude API by default; the model is configurable per agent.
Do I need Docker?
Docker is required for full sandbox isolation. Without it, code runs in-process with reduced isolation.
Can I bring my own MCP servers?
Yes. Register any MCP-compatible server with amircrew mcp add.
Is there a rate limit?
Default limits are per-plan; exceeded limits return 429. Contact us for enterprise quotas.