The core gateway serves A2A over gRPC and HTTP/JSON-RPC on the controller's API listener (port 8083 by default). Both transports use the same Session authorization, durable tasks, history, and runtime lifecycle.
Each Agent has a discoverable HTTP endpoint:
| Operation | Path |
|---|---|
| Read the Agent Card | GET /agents/{namespace}/{name}/.well-known/agent-card.json |
| Call JSON-RPC, including streaming | POST /agents/{namespace}/{name} |
The URL selects the Agent; HTTP requests do not need a tenant. gRPC requests use
the standard A2A tenant field (namespace/name), advertised only on the card's
gRPC interface. If an HTTP request supplies a tenant, it must match its URL.
The message contextId is the Session ID;
omitting both context and task IDs creates a new conversation. Retrying that first
message with the same message ID reuses the conversation. Task-only requests resolve
the conversation from the globally unique task ID.
There is no deployment-wide Agent Card because the gateway serves multiple agents.
Cards and JSON-RPC calls require the same authentication as the core API. A
validated X-Share-Token supplements the authenticated user's access to its
session: shares permit only card/task reads and subscriptions. Sending messages,
cancellation, and lifecycle mutations are denied. Cards are not publicly cached.
The card comes from the Agent's latest successful revision (or the shared
session's pinned revision) and advertises
JSON-RPC first, followed by gRPC, both with protocolVersion: "1.0". When the
gateway adds a protocol version, it must keep serving and advertising 1.0
alongside it. The card retains runtime extensions while reporting
the gateway's streaming capabilities. JSON-RPC uses the pinned upstream A2A v1
SDK and supports SendMessage, SendStreamingMessage, GetTask, ListTasks,
CancelTask, SubscribeToTask, and GetExtendedAgentCard. These are the v1
method names for the operations older clients called message/send,
message/stream, tasks/get, tasks/list, tasks/cancel, and
tasks/resubscribe.
The card advertises capabilities.pushNotifications: true. See
A2A push notifications for registration, callbacks,
and delivery guarantees.
Set config.gateway.publicUrl in Helm (the controller’s gateway.publicUrl) to
the externally reachable gateway base URL when exposing agents outside the
cluster. Its default is the controller's cluster Service URL. HTTP interfaces
append /agents/{namespace}/{name} to this base, preserving any deployment prefix.
An ingress using a prefix must strip that prefix before forwarding to the core
listener. Forward streaming responses without buffering.
For example, with the default insecure authentication mode:
curl -H 'X-User-Id: alice' \
'https://kagent.example/agents/kagent/assistant/.well-known/agent-card.json'Use the returned JSON-RPC interface URL with an A2A v1 client, supplying the
credentials required by the deployment on discovery and subsequent requests.
Send A2A-Version: 1.0 as an HTTP header or gRPC metadata on A2A calls. The
upstream Go A2A client supplies it automatically. The gateway interprets an
omitted or empty version as 0.3 and rejects it because the gateway serves
1.0. Unsupported versions return JSON-RPC error -32009 or gRPC status
FAILED_PRECONDITION with reason VERSION_NOT_SUPPORTED.
For example, the initial JSON-RPC send body is:
{
"jsonrpc": "2.0",
"id": "request-1",
"method": "SendMessage",
"params": {
"message": {
"messageId": "message-1",
"role": "ROLE_USER",
"parts": [{"text": "Hello"}]
}
}
}Send it to /agents/kagent/assistant. Save the returned task's contextId for
subsequent messages. The Go client exposes A2A().ForAgent(ctx, agentRef);
ForSession(ctx, id) resolves the Agent and supplies that session's context.