A2A protocol reference
Performance Hub Agents speak A2A v1.0 over JSON-RPC 2.0 on HTTPS. An Agent owner enables inbound A2A and creates a bearer key in Performance Hub; outside systems then call the Agent's endpoint. Setup for owners is in Connect agents outside Performance Hub (A2A).
A2A versus MCP. MCP lets your AI tools call Performance Hub features (doors, members, reports and more). A2A lets agents talk to agents as peers: your Performance Hub Agent can accept calls from outside agents and call peers you configure. Use MCP when a tool should act inside Performance Hub; use A2A when another agent should talk to your Agent.
Endpoint and Agent Card
| Method | URL |
|---|---|
| JSON-RPC | POST https://app.performancehub.co/a2a/{agentId} |
| Agent Card | GET https://app.performancehub.co/a2a/{agentId}/.well-known/agent-card.json |
| Agent Card (alias) | GET https://app.performancehub.co/a2a/{agentId}/.well-known/agent.json |
Replace {agentId} with the Agent's device ID from the A2A tab. If the Agent is replaced with new hardware, the ID (and therefore the URL) changes — update your callers.
An unknown Agent returns HTTP 404 with {"message":"Agent not found"}.
Card visibility is set by the owner:
- Public discovery card — anyone can read the card
- Authenticated callers only — the card also requires the bearer key
Authentication
Send the inbound key on every JSON-RPC call:
Authorization: Bearer <your-inbound-key>
Create one key per outside caller in the Agent's A2A tab. Keys are shown once at creation; store them securely. Never embed a real key in docs, source control or client-side code.
Agent Card fields
A typical card includes:
| Field | Notes |
|---|---|
name, description | Display identity from inbound settings |
version | "1.0.0" (Agent Card version) |
protocolVersion | "1.0" |
url | JSON-RPC endpoint (v0.3 compatibility field) |
supportedInterfaces | v1.0 list of { "url", "protocolBinding": "JSONRPC", "protocolVersion": "1.0" } |
capabilities.streaming | true |
capabilities.pushNotifications | false |
capabilities.stateTransitionHistory | false |
defaultInputModes / defaultOutputModes | ["text/plain"] |
securitySchemes.bearerAuth | { "type": "http", "scheme": "bearer" } |
security | [{ "bearerAuth": [] }] |
skills | Default skill id general-assistance, name General Assistance, with description, tags, and inputModes / outputModes of text/plain |
Example (illustrative):
{
"name": "Front Desk Agent",
"description": "Answers questions about visitor check-in, opening hours and meeting-room bookings for the front desk.",
"version": "1.0.0",
"protocolVersion": "1.0",
"url": "https://app.performancehub.co/a2a/example-agent-id",
"supportedInterfaces": [
{
"url": "https://app.performancehub.co/a2a/example-agent-id",
"protocolBinding": "JSONRPC",
"protocolVersion": "1.0"
}
],
"capabilities": {
"streaming": true,
"pushNotifications": false,
"stateTransitionHistory": false
},
"defaultInputModes": ["text/plain"],
"defaultOutputModes": ["text/plain"],
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer"
}
},
"security": [{ "bearerAuth": [] }],
"skills": [
{
"id": "general-assistance",
"name": "General Assistance",
"description": "Ask Front Desk Agent questions or delegate tasks.",
"tags": ["assistant"],
"inputModes": ["text/plain"],
"outputModes": ["text/plain"]
}
]
}
Methods
Each call uses an A2A v1.0 method name as the JSON-RPC method. The v0.3 slash names remain accepted as aliases. Bodies are JSON-RPC 2.0.
| A2A v1.0 method | v0.3 alias | Notes |
|---|---|---|
SendMessage | message/send | Send a message and receive a task |
SendStreamingMessage | message/stream | Same as send; response is Server-Sent Events |
GetTask | tasks/get | params.id (or taskId) |
ListTasks | tasks/list | Optional contextId and pageSize; returns { tasks, totalSize } |
CancelTask | tasks/cancel | params.id (or taskId) |
To continue a conversation, send the same contextId on the next message.
SendMessage
curl -sS https://app.performancehub.co/a2a/example-agent-id \
-H "Authorization: Bearer <your-inbound-key>" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": "1",
"method": "SendMessage",
"params": {
"message": {
"role": "user",
"parts": [
{ "text": "What time does visitor check-in open on Saturday?" }
]
}
}
}'
A successful response includes a task. Reply text is in status.message.parts (role ROLE_AGENT) and, when the task is completed, also in artifacts[0].parts (artifact name response).
SendStreamingMessage
Same shape as SendMessage, with method SendStreamingMessage. The response is a Server-Sent Events stream of task updates until the task finishes or fails.
GetTask
curl -sS https://app.performancehub.co/a2a/example-agent-id \
-H "Authorization: Bearer <your-inbound-key>" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": "2",
"method": "GetTask",
"params": { "id": "<task-id>" }
}'
ListTasks
curl -sS https://app.performancehub.co/a2a/example-agent-id \
-H "Authorization: Bearer <your-inbound-key>" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": "3",
"method": "ListTasks",
"params": {}
}'
Optional params: contextId to filter one conversation, and pageSize. The result is { "tasks": […], "totalSize": N }. Each key only lists the tasks it created.
CancelTask
curl -sS https://app.performancehub.co/a2a/example-agent-id \
-H "Authorization: Bearer <your-inbound-key>" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": "4",
"method": "CancelTask",
"params": { "id": "<task-id>" }
}'
Messages
Parts are text only. Both of these shapes are accepted:
- A2A v1.0:
{ "text": "…" } - v0.3:
{ "kind": "text", "text": "…" }
File, URL or raw binary parts are rejected with an invalid-params error.
Tasks
| State | Meaning |
|---|---|
TASK_STATE_SUBMITTED | Accepted |
TASK_STATE_WORKING | The Agent is processing |
TASK_STATE_COMPLETED | Finished with a result |
TASK_STATE_INPUT_REQUIRED | The Agent needs more input |
TASK_STATE_CANCELED | Cancelled |
TASK_STATE_FAILED | Failed |
Task isolation is per inbound key: a caller never sees another key's tasks.
Errors
Errors use the JSON-RPC error object (code, message, optional data).
| Code | Meaning |
|---|---|
| −32700 | Parse error |
| −32600 | Invalid request |
| −32601 | Method not found |
| −32602 | Invalid params |
| −32603 | Internal error |
| −32001 | Task not found |
| −32002 | Out of AI credits |
| −32003 | Task not cancelable |
| −32004 | Too many requests — try again later |
| −32005 | Agent unavailable |
| −32006 | Unauthorised (also HTTP 401 with a JSON-RPC error body) |
| −32007 | Forbidden |
CORS
Browser calls to /a2a/ are allowed from any origin for GET, POST and OPTIONS, with the headers Content-Type, Authorization, A2A-Version and Accept. No Performance Hub sign-in is involved; the inbound key (or a public Agent Card) is the gate.
Outbound from Performance Hub
When a Performance Hub Agent calls an outside peer, that remote agent must expose:
- an HTTPS Agent Card and JSON-RPC endpoint on a public address
- one of: no authentication, bearer token, API key header, or OAuth 2.0 client credentials
Owners configure peers on the A2A tab. Before anything is sent, the person in chat confirms a redacted preview. See Connect agents outside Performance Hub (A2A).
Security notes
- Create one inbound key per outside system; revoke keys you no longer trust.
- Outside callers cannot pivot from your Agent to your other Agents.
- Each key only sees its own tasks.
- Treat replies from outside agents as untrusted input.
- Prefer Authenticated callers only for the Agent Card when the card itself should not be public.
Related pages
- Connect agents outside Performance Hub (A2A) — owner setup
- Agents working together — organisation peers (not A2A)
- Use with AI — MCP overview
- AI Agents MCP tools — discover and message Agents from MCP