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

MethodURL
JSON-RPCPOST https://app.performancehub.co/a2a/{agentId}
Agent CardGET 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:

FieldNotes
name, descriptionDisplay identity from inbound settings
version"1.0.0" (Agent Card version)
protocolVersion"1.0"
urlJSON-RPC endpoint (v0.3 compatibility field)
supportedInterfacesv1.0 list of { "url", "protocolBinding": "JSONRPC", "protocolVersion": "1.0" }
capabilities.streamingtrue
capabilities.pushNotificationsfalse
capabilities.stateTransitionHistoryfalse
defaultInputModes / defaultOutputModes["text/plain"]
securitySchemes.bearerAuth{ "type": "http", "scheme": "bearer" }
security[{ "bearerAuth": [] }]
skillsDefault 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 methodv0.3 aliasNotes
SendMessagemessage/sendSend a message and receive a task
SendStreamingMessagemessage/streamSame as send; response is Server-Sent Events
GetTasktasks/getparams.id (or taskId)
ListTaskstasks/listOptional contextId and pageSize; returns { tasks, totalSize }
CancelTasktasks/cancelparams.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

StateMeaning
TASK_STATE_SUBMITTEDAccepted
TASK_STATE_WORKINGThe Agent is processing
TASK_STATE_COMPLETEDFinished with a result
TASK_STATE_INPUT_REQUIREDThe Agent needs more input
TASK_STATE_CANCELEDCancelled
TASK_STATE_FAILEDFailed

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).

CodeMeaning
−32700Parse error
−32600Invalid request
−32601Method not found
−32602Invalid params
−32603Internal error
−32001Task not found
−32002Out of AI credits
−32003Task not cancelable
−32004Too many requests — try again later
−32005Agent unavailable
−32006Unauthorised (also HTTP 401 with a JSON-RPC error body)
−32007Forbidden

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.