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/merx

Capabilities

CapabilityDescriptionAuth
buy_energyPurchase delegated energy from aggregated marketAPI key
get_pricesCurrent energy prices from all providersNone
analyze_pricesMarket analysis with trends and recommendationsNone
check_balanceAccount balance and on-chain resourcesOptional
ensure_resourcesDeclarative resource provisioningAPI key
create_standing_orderServer-side automation rulesAPI 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=true

Authentication

Pass your API key via the X-API-Key header. Read-only capabilities work without authentication. Write capabilities require a key.

Endpoints

MethodPathDescription
GET/.well-known/agent-manifest.jsonAgent manifest discovery
GET/acp/v1/agents/merxAgent manifest (specific)
POST/acp/v1/agents/:agentId/runsCreate a run
GET/acp/v1/runs/:runIdGet run status and result
POST/acp/v1/runs/:runId/cancelCancel a running run