Skip to main content
This module wires the A2A RC 1.0 protocol into the Aura web server via a2a-rs-server.

Enabling A2A

A2A is disabled by default. Enable it with the --enable-a2a flag or AURA_ENABLE_A2A environment variable:
When disabled, the A2A endpoints (/a2a/v1/*, /.well-known/agent-card.json) are not mounted and return 404.

Endpoints

message:send — immediate return

AuraRequestHandler forces return_immediately = true on every message:send request. The HTTP response returns as soon as the task is queued in Working state, without waiting for the agent to finish. Poll GET /a2a/v1/tasks/{id} or subscribe via message:stream / tasks/{id}:subscribe to track completion.

Agent card URL (AURA_SERVER_URL)

The agent card’s supportedInterfaces[].url fields must be absolute (per the A2A spec). A2A clients read these URLs from the card and pass them straight to their HTTP layer, which rejects relative paths — so a client that fetches the card successfully will still fail on message:send if the advertised URLs are relative. Aura builds the interface URLs from a single canonical origin, configured via: When AURA_SERVER_URL is unset, the origin is derived from the bind host/port, with a wildcard bind (0.0.0.0 / ::) mapped to 127.0.0.1. That default is fine for local development but wrong whenever the server is reached at a different address than it binds — behind a reverse proxy, load balancer, Kubernetes Service/Ingress, or when the container port is remapped. In those cases set AURA_SERVER_URL to the externally-reachable origin clients actually use (scheme + host + optional port, no path):
The card then advertises absolute endpoints under that origin:
A trailing slash on AURA_SERVER_URL is trimmed before the paths are appended.

Model selection (x-aura-model)

When the server is started with multiple agent configs (e.g. --config agent-a.toml --config agent-b.toml), A2A clients can target a specific agent by sending the x-aura-model request header. This mirrors the model field in the OpenAI-compatible /v1/chat/completions endpoint. The error message when no config matches:
  • Header provided: "no agent configuration found for model '<name>'" (A2A invalid_params)
  • No header and no default: "no agent configuration available" (A2A invalid_params)
x-aura-model is not part of the A2A spec — it is an Aura extension. Like all request headers, it is also forwarded to the agent’s MCP connections via the headers_from_request mechanism.

Testing with curl

Assumes the server is running on localhost:8080.

Agent card

Health check


REST — send a message

The response is a task object in Working state. Grab the id field for follow-up calls.

REST — get a task by ID

REST — list tasks

REST — cancel a task


JSON-RPC — send a message

JSON-RPC — get a task

JSON-RPC — cancel a task


Notes

  • A2A-Version is optional — when present on /a2a/v1/rpc requests, the version is validated. An unsupported value returns -32009 Version not supported. REST endpoints do not enforce the header.
  • messageId and role are required on the Message object — malformed bodies return -32602 Invalid params.
  • Text-only parts — the executor only accepts text parts; file and data parts return an error.
  • Tasks are stored in the a2a-rs-server in-memory TaskStore for the lifetime of the process. Use GET /a2a/v1/tasks/{id} or GetTask to poll after message:send returns.
  • Request headers passed to /a2a/v1/message:send are forwarded to the agent’s MCP connections (same headers_from_request mechanism as the OpenAI-compatible endpoint). This includes x-aura-model.
  • x-aura-model is an Aura extension, not part of the A2A spec. It selects the agent configuration when multiple configs are loaded — see Model selection.