ACP Protocol
BeeAI Agent Communication Protocol support. Run-based execution with long-polling, JSON and text input modes.
Agent Manifest
The ACP manifest is served at the standard discovery endpoint and at the agent-specific path.
curl https://merx.exchange/.well-known/agent-manifest.json
# Or agent-specific:
curl https://merx.exchange/acp/v1/agents/merxCapabilities
| Capability | Description | Auth |
|---|---|---|
| buy_energy | Purchase delegated energy from aggregated market | API key |
| get_prices | Current energy prices from all providers | None |
| analyze_prices | Market analysis with trends and recommendations | None |
| check_balance | Account balance and on-chain resources | Optional |
| ensure_resources | Declarative resource provisioning | API key |
| create_standing_order | Server-side automation rules | API key |
Create a Run
Send input messages with contentType and content fields. Use application/json for structured actions or text/plain for natural language.
curl -X POST https://merx.exchange/acp/v1/agents/merx-tron-agent/runs \
-H "Content-Type: application/json" \
-H "X-API-Key: sk_live_..." \
-d '{
"agentId": "merx-tron-agent",
"input": [{
"role": "user",
"parts": [{
"contentType": "application/json",
"content": "{\"action\":\"get_prices\"}"
}]
}]
}'Poll Result
Poll the run status, or use ?wait=true for long-polling (up to 30s).
# Immediate response:
curl https://merx.exchange/acp/v1/runs/{runId}
# Long-polling (waits up to 30s for completion):
curl https://merx.exchange/acp/v1/runs/{runId}?wait=trueAuthentication
Pass your API key via the X-API-Key header. Read-only capabilities work without authentication. Write capabilities require a key.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /.well-known/agent-manifest.json | Agent manifest discovery |
| GET | /acp/v1/agents/merx | Agent manifest (specific) |
| POST | /acp/v1/agents/:agentId/runs | Create a run |
| GET | /acp/v1/runs/:runId | Get run status and result |
| POST | /acp/v1/runs/:runId/cancel | Cancel a running run |