A2A defines the communication elements between agents. The AI Gateway runtime surfaces data tied to these elements in log output and OpenTelemetry spans for a2a Agents.
|
Element
|
Description
|
Purpose
|
|
Agent Card
|
A JSON metadata document describing an agent’s identity, capabilities, endpoint, skills, and authentication requirements.
|
Enables clients to discover agents and understand how to interact with them.
|
|
Task
|
A stateful unit of work initiated by an agent, with a unique ID and defined lifecycle.
|
Tracks long-running operations and supports multi-turn interactions.
|
|
Message
|
A single turn of communication between a client and an agent, containing content and a role (user or agent).
|
Conveys instructions, context, questions, answers, or status updates that are not formal artifacts.
|
|
Part
|
The fundamental content container (for example, TextPart, FilePart, DataPart) used within messages and artifacts.
|
Provides flexibility for agents to exchange different content types within messages and artifacts.
|
|
Artifact
|
A tangible output generated by an agent during a task (for example, a document, image, or structured data).
|
Carries the concrete output of a task in a structured, retrievable form.
|
A2A traffic is auto-detected per request and non-A2A traffic passes through without overhead.
Detection anchors to the end of the request path, so any prefix added by the route is ignored. For example, both /v1/message:send and /api/agents/v1/message:send match SendMessage:
|
HTTP method
|
Path suffix
|
A2A operation
|
Canonical method
|
POST
|
/v1/message:send
|
SendMessage
|
message/send
|
POST
|
/v1/message:stream
|
SendStreamingMessage
|
message/stream
|
GET
|
/.well-known/agent-card.json
|
GetAgentCard
|
agent/getCard
|
GET
|
/v1/extendedAgentCard
|
GetExtendedAgentCard
|
agent/getExtendedAgentCard
|
GET
|
/v1/tasks/{id}
|
GetTask
|
tasks/get
|
GET
|
/v1/tasks
|
ListTasks
|
tasks/list
|
POST
|
/v1/tasks/{id}:cancel
|
CancelTask
|
tasks/cancel
|
POST
|
/v1/tasks/{id}:subscribe
|
SubscribeToTask
|
tasks/resubscribe
|
POST
|
/v1/tasks
|
ListTasks
|
tasks/list
|
The canonical method name is what appears in OpenTelemetry span attributes and log output.
Detected by the "jsonrpc" field in the request body, combined with a recognized A2A method name or an A2A-Version request header. Recognized methods include message/send, message/stream, tasks/get, tasks/list, tasks/cancel, tasks/resubscribe, the tasks/pushNotificationConfig/* family, and agent/getExtendedAgentCard.
A request carrying an A2A-Version header is treated as JSON-RPC even if the method isn’t in the recognized list. When an unknown method is accepted this way, the method field in log output is recorded as "unknown" to bound metric cardinality. The OpenTelemetry span’s kong.a2a.operation attribute still receives the actual method name.
When an upstream agent returns an agent card, the runtime rewrites the url field, and any additionalInterfaces[].url fields, to the AI Gateway address. A2A clients then discover the gateway as the canonical endpoint instead of contacting the upstream directly. The rewrite uses X-Forwarded-* headers to construct the correct scheme, host, and port when the gateway is deployed behind a load balancer or reverse proxy.