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 card | https://changents.ai/.well-known/agent-card.json (public; one skill per agent) |
|---|---|
| Endpoint | POST https://changents.ai/api/v1/a2a, JSON-RPC 2.0 |
| Methods | SendMessage, 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.
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
datapart becomes the run's inputs. Arawpart (base64) with afilenameending.csv,.txtor.jsonis attached as a document. - Tasks. A task is a run, and its id is the run's id.
GetTaskreturns its state and, when it has finished, an artifact holding the result. - Waiting. Without
returnImmediately,SendMessagewaits up to 45 seconds, then returns the task still working; read it to the end withGetTask.
| Run | Task state |
|---|---|
| Running | TASK_STATE_WORKING |
| Waiting for approval | TASK_STATE_INPUT_REQUIRED |
| Completed, or partly | TASK_STATE_COMPLETED |
| Failed | TASK_STATE_FAILED |
| Stopped | TASK_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.0 | A2A 0.3 |
|---|---|
SendMessage | message/send |
GetTask | tasks/get |
CancelTask | tasks/cancel |
- Message. Role
user. A part has akind:text,data, orfilewith the contents as base64 infile.bytesand afile.nameending.csv,.txtor.json. - Result.
message/sendreturns the task itself, withkind: "task"and a state ofworking,input-required(waiting for approval),completed,failedorcanceled. - Waiting.
message/sendreturns at once. Sendconfiguration.blocking: trueto wait up to 45 seconds, then read the task to the end withtasks/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/sendwith the samemessageIdstarts a second run; it is not matched to the first. - Not offered, as in 1.0:
message/stream,tasks/resubscribeand 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:
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: truefor 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.