Skip to main content
Every deployed agent speaks A2A, the protocol agents use to call each other. Another agent finds yours from its public Agent Card, then sends it messages over JSON-RPC and gets back tasks it can stream, look up and cancel. Onecortex implements A2A 1.0, and 0.3 for clients that have not moved yet.

The endpoints

The first is the A2A URL an A2A client is given. The second is the Agent Card, which needs no key. Every call carries an API key as a bearer token:
Create a key under API keys in the dashboard. It is shown once, when you create it. See API keys.

Call it

a2a_call.py
Output

Versions

The A2A-Version header picks the version, for the card and for every call: A method name from the other version is unknown (-32601). SubscribeToTask, ListTasks, push notifications and the extended card are not supported and answer -32004.

Messages, contexts and tasks

  • The message’s text parts, joined with newlines, are your agent’s prompt. A file or URL part is refused with -32005, because agents take text. The message’s metadata, and the request’s, reach your agent as params.
  • contextId is your agent’s session. Leave it out on the first message and one is generated and returned; send it back to continue the conversation, and your agent remembers.
  • Each message creates a task. SendMessage waits until the run ends or pauses, and returns the task with the reply as one text artifact named reply. SendStreamingMessage sends the task first, then a working status update for each tool call and step, the reply’s text as artifact updates as it arrives, and a final status update.
  • GetTask returns a task for seven days after it last changed. A task whose run was lost part way, for example when Onecortex restarted, reads as failed: The run was interrupted. Send the message again.
  • CancelTask cancels a working or paused task and stops its run. A task that already finished is refused with -32002.

Pauses

A run your agent pauses for a person, as in Human in the loop, leaves the task in TASK_STATE_INPUT_REQUIRED. Its status message carries the question as text and the full interrupts as a data part:
Continue the task by sending a message with its taskId:
  • A text part answers a task waiting on one question: the text is the answer.
  • A data part holding a resume answers any number, each answer shaped as your agent’s schema asks:
The same task then completes. A message naming a task that is not waiting for input is refused with -32004.

The Agent Card

Other agents discover yours by reading its card, without a key. Onecortex builds it from your agent and the card: block of its agent.yml:
agent.yml
The card says that the agent exists, and its name, description and skills. It never names your organization, repository, framework or region. It changes when a deploy changes agent.yml. A deleted, suspended or never deployed agent’s card is 404, the same as an agent that does not exist. The card is also served at https://api.onecortex.io/v1/agents/{agentId}/.well-known/agent-card.json, for clients that resolve the well known path next to the A2A URL rather than under it. An A2A client can sign in instead of using a key, the same way as an MCP client: it names the agent’s A2A URL as the resource when it asks for a token, the person allows it, and the token calls this one agent.

Errors

Refusals of the call itself keep their HTTP status, with a JSON-RPC error body, so a client can tell a retry from a mistake: A method’s own error is a 200 with a JSON-RPC error: -32001 for a task that does not exist, or belongs to another organization, and the codes above. A run that fails ends its task in TASK_STATE_FAILED, with the message from Errors.

Limits

A2A calls share your organization’s and agent’s invoke limits. The card is limited to 60 requests a minute per address.
Last modified on September 30, 2026