Skip to content
Back to the app

Agent-to-Agent (A2A) ​

CHANGENTS.AI speaks the open Agent-to-Agent protocol, version 1.0, in both directions: another vendor's agent can send work to your agents, and your agents can call an outside agent you register.

Other agents calling yours ​

Agent cardhttps://changents.ai/.well-known/agent-card.json (public; one skill per agent)
EndpointPOST https://changents.ai/api/v1/a2a, JSON-RPC 2.0
MethodsSendMessage, GetTask, CancelTask

Use a key with the a2a scope: on /developer, choose Create A2A Key. Like an MCP key, it is never granted by default and reaches nothing else.

bash
curl https://changents.ai/api/v1/a2a \
  -H "Authorization: Bearer cgnt_sk_<clientId>.<secret>" -H "Content-Type: application/json" \
  -d '{ "jsonrpc": "2.0", "id": 1, "method": "SendMessage",
        "params": { "message": { "messageId": "m-1", "role": "ROLE_USER",
                                 "metadata": { "agentType": "cf_iso20022_address" },
                                 "parts": [{ "text": "Check these addresses." }] },
                    "configuration": { "returnImmediately": true } } }'
  • Which agent. Name it in metadata.agentType, using a skill id from the agent card.
  • Parts. Text parts are the instruction. A data part becomes the run's inputs. A raw part (base64) with a filename ending .csv, .txt or .json is attached as a document.
  • Tasks. A task is a run, and its id is the run's id. GetTask returns its state and, when it has finished, an artifact holding the result.
  • Waiting. Without returnImmediately, SendMessage waits up to 45 seconds, then returns the task still working; read it to the end with GetTask.
RunTask state
RunningTASK_STATE_WORKING
Waiting for approvalTASK_STATE_INPUT_REQUIRED
Completed, or partlyTASK_STATE_COMPLETED
FailedTASK_STATE_FAILED
StoppedTASK_STATE_CANCELED

A task waiting for approval needs nothing from the calling agent: a person in your organisation approves the step in CHANGENTS.AI. Runs are counted, approval steps and your retention policy apply, and a key sees only its owner's tasks, exactly as for the MCP server.

Not offered: streaming, push notifications, follow-up messages to a task, and files by URL. Each is refused with the protocol's own error (-32004, -32003, -32005).

Clients on A2A 0.3 ​

The same endpoint also answers the A2A 0.3 method names, for clients that have not moved to 1.0. A call is answered in the version it was made in; the runs, limits and rules are the same.

A2A 1.0A2A 0.3
SendMessagemessage/send
GetTasktasks/get
CancelTasktasks/cancel
  • Message. Role user. A part has a kind: text, data, or file with the contents as base64 in file.bytes and a file.name ending .csv, .txt or .json.
  • Result. message/send returns the task itself, with kind: "task" and a state of working, input-required (waiting for approval), completed, failed or canceled.
  • Waiting. message/send returns at once. Send configuration.blocking: true to wait up to 45 seconds, then read the task to the end with tasks/get.
  • Agent card. A 0.3 client that is given the endpoint as the agent's address finds the card at https://changents.ai/api/v1/a2a/.well-known/agent-card.json. The card lists both versions.
  • Sending twice. A repeated message/send with the same messageId starts a second run; it is not matched to the first.
  • Not offered, as in 1.0: message/stream, tasks/resubscribe and push notification settings.

Your agents calling an outside agent ​

An organisation admin registers each outside agent with the address of its agent card and, if it needs one, a token:

bash
curl -X POST https://changents.ai/api/orgs/<slug>/a2a-agents \
  -H "Authorization: Bearer <admin session token>" -H "Content-Type: application/json" \
  -d '{ "name": "rates", "cardUrl": "https://agents.example/.well-known/agent-card.json",
        "token": "<their token>", "readOnly": false }'

GET /api/orgs/{slug}/a2a-agents lists them (never the token), PATCH …/{id} changes enabled or readOnly, and DELETE …/{id} removes one. An organisation may register up to 10.

Each registered agent becomes a tool, a2a_<name>, for your agents' steps that use connected systems. The safeguards:

  • Approval. Sending work to an outside agent is a side effect, so each call waits for a person's approval, unless you set readOnly: true for an agent that only answers questions. Approve while the run is at that step, which waits about a minute. A call approved later is not sent: the approval is recorded as failed, with the reason, and in the audit trail.
  • Where it connects. The card must be served over https, and its interface must be on the card's own host. Requests go through the same outbound checks as every other tool.
  • What comes back is treated as untrusted content: it is information for the step, never instructions to your agent.

Served from this deployment. No page view leaves it.