A2A Protocol
MateClaw can expose enabled agents through an A2A JSON-RPC endpoint and can call other A2A peers from agent tools.
Configuration
yaml
mateclaw:
a2a:
enabled: true
base-url: https://your-public-host
call-timeout-ms: 120000
max-tasks: 1000
task-ttl-seconds: 3600base-url is required for production deployments. If it is empty, MateClaw derives the Agent Card URL from the incoming request, which depends on proxy headers being correct.
Inbound
GET /.well-known/agent-card.jsonand anonymousGET /api/a2a/cardreturn the public minimal card withoutskills.- Authenticated
GET /api/a2a/cardreturns enabled agents inskills[]; use the agent id asmessage.metadata.skillId. POST /api/a2arequires an existing MateClaw Bearer token and supportsmessage/send,message/stream,tasks/get, andtasks/cancel.
Outbound Tool
Agents can call call_a2a_agent with:
json
{
"url": "https://peer.example.com/api/a2a",
"headers": {
"Authorization": "Bearer token"
},
"stream": false
}Outbound calls reject private or reserved network targets by default, do not follow redirects, cap response size, and poll tasks/get when a blocking send returns an in-progress task.
