a2a-rs-server.
Enabling A2A
A2A is disabled by default. Enable it with the--enable-a2a flag or AURA_ENABLE_A2A environment variable:
/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):
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>'"(A2Ainvalid_params) - No header and no default:
"no agent configuration available"(A2Ainvalid_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 onlocalhost:8080.
Agent card
Health check
REST — send a message
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-Versionis optional — when present on/a2a/v1/rpcrequests, the version is validated. An unsupported value returns-32009 Version not supported. REST endpoints do not enforce the header.messageIdandroleare required on theMessageobject — malformed bodies return-32602 Invalid params.- Text-only parts — the executor only accepts
textparts;fileanddataparts return an error. - Tasks are stored in the
a2a-rs-serverin-memoryTaskStorefor the lifetime of the process. UseGET /a2a/v1/tasks/{id}orGetTaskto poll aftermessage:sendreturns. - Request headers passed to
/a2a/v1/message:sendare forwarded to the agent’s MCP connections (sameheaders_from_requestmechanism as the OpenAI-compatible endpoint). This includesx-aura-model. x-aura-modelis an Aura extension, not part of the A2A spec. It selects the agent configuration when multiple configs are loaded — see Model selection.

