The Agent-to-Agent (A2A) protocol lets one autonomous agent discover another agent’s capabilities and delegate work over JSON-RPC. On Ferrite, the agent-ready package projects an A2A v0.3.0 Agent Card at GET /.well-known/agent-card.json and answers JSON-RPC requests at POST /a2a directly from your declared Surface operations, routing skill calls into the exact same domain handlers that serve your HTTP and MCP routes. Applications built with the Agent SDK can also expose an A2A face directly over their embedded agent loop.
Publish the Agent Card and /a2a endpoint
Install agent-ready and dispatch requests through agent_ready::well_known::handle_h (or mount agent_ready::a2a_face directly when supplying a durable TaskStore):
ferrite add agent-ready
Every Operation declared in your Surface appears as a skill in GET /.well-known/agent-card.json with preferredTransport: "JSONRPC" and url pointing to https://<your-host>/a2a.
A remote agent invokes one of your declared skills by sending a message/send JSON-RPC request containing a data part:
{
"jsonrpc": "2.0",
"id": "req-1",
"method": "message/send",
"params": {
"message": {
"role": "user",
"messageId": "msg-1",
"parts": [
{
"kind": "data",
"data": {
"skill": "get_quote",
"arguments": { "tag": "systems" }
}
}
]
}
}
}
If a caller sends a message without a data part naming a skill, the face responds with the list of available skills and the expected invocation shape (or leaves the task in input-required when a TaskStore is configured).
Stateless mode vs durable TaskStore mode
agent_ready::a2a_face supports two execution modes depending on whether your application needs multi-turn task inspection and cancellation:
- Stateless mode (
a2a_face::handle/NoTasks).message/sendexecutes the skill and answers immediately with an agentMessage. Callingtasks/getortasks/cancelreturns A2ATaskNotFoundError(-32001). This is the default when wired throughwell_known::handle_h. - Durable task mode (
a2a_face::handle_with+TaskStore). Everymessage/sendcreates or continues a storedTaskthat the caller can inspect viatasks/getand cancel viatasks/cancel. Each save uses compare-and-set on the loaded version so a concurrent cancel cannot silently overwrite a completion. If a process stops while a task isworking,load_reconciledreconciles expired claim leases (defaultDEFAULT_LEASE_MS = 60_000ms) tofailedso replays read the recorded failure instead of executing the skill twice.
Security and caller isolation
- Bind
TaskStorekeys to the authenticated caller. YourTaskStoreimplementation must namespace every task ID under the verified caller identity before passing the store toa2a_face::handle_with. One caller attempting to read, continue, or cancel another caller’staskIdreceivesTaskNotFoundError(-32001). - Share authorization across HTTP, MCP, and A2A. Skill execution calls your application’s own handler closure. Enforce the same bearer-token, tenant, role, and ownership checks inside that handler so A2A never bypasses rules applied to browser or MCP requests.
- No implicit notifications. A2A defines no client notifications; a JSON-RPC request without an
idstill receives a response withid: null.
Protocol limits and unsupported features
The A2A face advertises its capabilities accurately on the Agent Card and returns typed A2A JSON-RPC errors for unsupported operations:
| Boundary | Behavior |
|---|---|
| Protocol version | A2A 0.3.0 (preferredTransport: "JSONRPC") |
| Request body cap | MAX_BODY_BYTES = 64 KiB (larger bodies are rejected because messages persist in task history) |
| Task history cap | HISTORY_LIMIT = 50 entries per task (oldest dropped first) |
Streaming (message/stream, tasks/resubscribe) | Advertised off; answers UnsupportedOperationError (-32004) |
| Push notifications | Advertised off; answers PushNotificationNotSupportedError (-32003) |
| Authenticated extended card | Not configured; answers AuthenticatedExtendedCardNotConfiguredError (-32007) |
Verify locally
Start your application with ferrite dev and inspect the Agent Card and a live JSON-RPC call:
curl -s http://127.0.0.1:8787/.well-known/agent-card.json | jq '{name, protocolVersion, url, capabilities, skills: [.skills[].id]}'
curl -s -X POST http://127.0.0.1:8787/a2a \
-H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":"1","method":"message/send","params":{"message":{"role":"user","messageId":"m1","parts":[{"kind":"text","text":"list skills"}]}}}' | jq .
Next steps
- Expose an embedded durable agent over HTTP, MCP, ACP, and A2A in Agent API.
- Connect an editor to an agent where the client owns the filesystem with Agent Client Protocol (ACP).
- Validate your Agent Card and A2A endpoint automatically with Verify agent readiness.