A2A Protocol
Status: Available since EDDI v6.0.0; conformant to A2A 1.0 in the release after 6.5 Spec: A2A Protocol — EDDI is pinned to A2A 1.0 (specification release v1.0.1) and still serves 0.3 peers and the pre-0.2
tasks/sendcall EDDI spoke until 6.5
EDDI implements the Agent-to-Agent (A2A) protocol for distributed peer-to-peer agent communication. Agents can expose their capabilities via Agent Cards, and consume remote A2A agents as tools.
Verified against the official a2a-sdk Python client (1.2.1): its 1.0 JSON-RPC transport and its 0.3 compatibility transport both resolve an EDDI Agent Card and send, stream, get and cancel tasks.
Server — Exposing Agents via A2A
Enable A2A for an Agent
Add A2A fields to your agent configuration:
{
"a2aEnabled": true,
"description": "Customer support agent specializing in order tracking",
"a2aSkills": ["order-tracking", "refund-processing"],
"workflows": ["eddi://ai.labs.workflow/workflowstore/workflows/..."]
}a2aEnabled
boolean
false
Opt-in flag for A2A discovery
description
string
"<product name> conversational AI agent" (the product name is the white-label name, "EDDI" by default)
Human-readable description for the Agent Card
a2aSkills
string[]
["chat"]
Skills advertised in the Agent Card
Endpoints
GET
/.well-known/agent-card.json
Default Agent Card (first A2A-enabled agent) — the A2A 0.3+/1.0 well-known path
Yes
GET
/.well-known/agent.json
The same card at the pre-0.3 path, kept for older peers
Yes
GET
/a2a/agents/{agentId}/.well-known/agent-card.json
Per-agent Agent Card where an SDK client given /a2a/agents/{agentId} as its base URL looks for it
Yes
GET
/a2a/agents/{agentId}/agent.json
Per-agent Agent Card (EDDI's original path)
Yes
GET
/a2a/agents
List all A2A-enabled agents
No
POST
/a2a/agents/{agentId}
JSON-RPC 2.0 endpoint
No
GET
/.well-known/capabilities?skill=…
Capability discovery
Only with eddi.a2a.capabilities.public=true
GET
/.well-known/capabilities/skills
Registered skill names
Only with eddi.a2a.capabilities.public=true
Who can call them
On a deployment with quarkus.oidc.tenant-enabled=false — the shipped default — no endpoint requires a token, so the column above says nothing there. It is still not a promise that every row returns data: eddi.a2a.enabled and eddi.a2a.capabilities.public are independent switches, and an endpoint whose switch is off answers 404 whether or not a token was sent. With authentication on, the column is the contract:
Agent Cards are anonymous by design. A peer is handed a URL and fetches
{url}/agent.jsonbefore it holds any credential for your deployment; EDDI's own client does exactly that, withapiKeyoptional. Reading a card needs the agent id, so it discloses one agent, not the roster. When authentication is on, the card carries anauthenticationblock naming the token endpoint for the JSON-RPC call that follows — see The advertised token endpoint.GET /a2a/agentsrequires authentication. It enumerates every A2A-enabled agent — name, description, skills, URL — which no part of the protocol needs, and which is strictly more than the skill-name list gated behindeddi.a2a.capabilities.public.The JSON-RPC endpoint requires authentication and an EDDI role (
eddi-useror above). Sending a message runs a conversation on your LLM budget.Capability discovery follows its flag.
eddi.a2a.capabilities.publicis the only authentication gate — no token is ever required or checked. It is not the only gate:eddi.a2a.enabledstill has to be on, and with either off the two endpoints answer 404 to everyone. With both on they are anonymous, which is what "public" means there.
The advertised token endpoint
authentication.credentials has to name a token endpoint the peer can reach, which is not always the one EDDI uses: the Helm chart points quarkus.oidc.auth-server-url at the in-cluster Keycloak Service and the auth compose profile at http://keycloak:8080. Publishing either to an outside peer dead-ends its discovery.
Set eddi.a2a.public-token-endpoint and that value is advertised verbatim. It is the endpoint, not the issuer, because the path is the provider-specific part — an issuer-shaped setting cannot express Okta's https://example.okta.com/oauth2/default/v1/token.
Left empty, EDDI derives <issuer>/protocol/openid-connect/token, taking <issuer> from:
eddi.keycloak.public.url, grafted onto the realm path fromquarkus.oidc.auth-server-url. Both shipped authenticated deployments already set it — the Helm chart requires it, since the Manager SPA cannot start a login without it — so they advertise a reachable endpoint with no new configuration. Only the origin is taken from it; the realm path stays whatever EDDI is configured against, so the two cannot drift apart.quarkus.oidc.auth-server-urlunchanged — correct whenever EDDI and its peers reach the IdP by the same name, which is the externally hosted IdP case.
That derivation assumes Keycloak.
/protocol/openid-connect/tokenis Keycloak's path, and it is what every shipped authenticated deployment runs. On any other identity provider the derived value will be wrong, so seteddi.a2a.public-token-endpointthere. Resolving the endpoint through OIDC discovery (<issuer>/.well-known/openid-configuration) would remove the assumption rather than document it, and is the right follow-up — it is not done here because it turns rendering an anonymous card into an outbound HTTP call, which needsOutboundHttp, a cache and a failure policy of its own.
Implementation note.
@PermitAllon the JAX-RS method is only half of this. Quarkus evaluates thequarkus.http.auth.permission.*path policies before declarative RBAC, so an endpoint that is not also named in apermitentry inapplication.propertiesis claimed by the/*catch-all and answers 401 regardless of its annotation. The two halves are kept in step byA2aEndpointPermissionsTest; the status codes above are asserted against a real Keycloak inui/manager/e2e/auth/a2a-discovery.spec.ts.
JSON-RPC Methods
One endpoint, POST /a2a/agents/{agentId}, serves three dialects. The method name decides the dialect, and the answer is written in the dialect it was asked in — so an A2A 1.0 client, which parses results strictly, never sees a 0.3 field, and the reverse.
Send a message, wait for the turn
SendMessage
message/send
tasks/send
Send and stream the turn (SSE)
SendStreamingMessage
message/stream
tasks/sendSubscribe
Read a task
GetTask
tasks/get
tasks/get
Cancel a task
CancelTask
tasks/cancel
tasks/cancel
List / resubscribe
ListTasks, SubscribeToTask → -32004 UnsupportedOperation
tasks/list, tasks/resubscribe → -32004
—
Push notifications
→ -32003 PushNotificationNotSupported
→ -32003
—
Extended Agent Card
GetExtendedAgentCard → -32007
agent/getAuthenticatedExtendedCard → -32007
—
A 1.0 client sends A2A-Version: 1.0; an absent header is read as 0.3, as the specification says, and a version that is neither 0.x nor 1.x is refused with -32009 VersionNotSupported.
What differs between the dialects
Task state
TASK_STATE_COMPLETED
completed
completed
Status
object: state, message, timestamp
same
same (a bare enum up to 6.5)
Role
ROLE_USER / ROLE_AGENT
user / agent
user / agent
Text part
{"text": "…"}
{"kind": "text", "text": "…"}
{"kind": "text", "type": "text", "text": "…"}
Send result
{"task": {…}}
the task, "kind": "task"
the task
Return without waiting
configuration.returnImmediately: true
configuration.blocking: false
—
A message may carry several text parts (joined with newlines) and data parts (read as JSON). A message made only of file parts is refused with -32005 ContentTypeNotSupported.
Identifiers the peer chooses — contextId, taskId, messageId, a legacy task id — are at most 256 characters (-32602 InvalidParams otherwise), and the JSON-RPC id must be a number or a string of at most 256 characters (-32600 InvalidRequest otherwise). Both are echoed in every streamed event, so an unbounded one would multiply the response by the number of chunks.
Tasks, contexts and conversations
A context is a conversation, and a task is one turn in it. A message that names no contextId opens a new conversation, and its id is the contextId the peer gets back; a later message with that contextId continues the same conversation. Task ids the server issues are <conversationId>_<random>, and every turn carries its task id in the input context ({context.a2aTaskId}, with {context.a2aContextId} next to it).
A message that names a taskId continues that task — in its conversation, under its id. A task in a terminal state takes no further messages (-32004); send a new message in the same context instead.
A pre-0.2 tasks/send keeps its old contract: the task id is the one the peer chose (params.id), and no context is invented when the peer named none. If a peer sends again under the same id while an earlier turn is still running, the id belongs to the newer send: the earlier turn's outcome answers its own caller but is not recorded over the newer task.
Task states
A task's state is how its own turn ended — never what the conversation last said.
finished normally (conversation READY or ENDED)
completed, the turn's output as the response artifact
failed (conversation ERROR)
failed, status message "The agent failed while processing the message." — no artifact, no internal detail
paused for a human approval (HITL, AWAITING_HUMAN)
input-required, the agent's pause announcement as the status message
was dropped because the conversation was paused (or became so while the message was queued)
input-required — the message was not processed; send it again once the approval is resolved
was dropped because the conversation was busy with another turn
rejected — the message was not processed
was cancelled (CancelTask, or a HITL approval cancelled)
canceled
is still running when a blocking send stops waiting (eddi.a2a.task-timeout-seconds)
working — poll GetTask
A turn's output is returned only when it carries the task's own id, so a turn that was dropped can no longer hand back the previous turn's answer (6.5 did). GetTask on an input-required task reads the conversation again: once a reviewer has approved and the resumed turn finished, the task reads completed with the answer.
CancelTask stops the task's turn — a running turn at its next task boundary, a HITL pause by cancelling the pending approval — without ending the conversation, so the context stays usable. Cancelling a task that already reached a terminal state answers -32002 TaskNotCancelable. (Up to 6.5, a cancel ended the whole conversation.)
A conversation runs one turn at a time, and cancelling stops the turn it is running. So a task queued behind another task's turn in the same context is answered -32002 too — cancelling it then would stop its sibling instead. Once the turn ahead has settled, the task can be cancelled. This queue is known per node; a cancel that reaches a node which did not submit the turn cannot see it.
Where tasks are remembered
Tasks and context bindings are kept behind IA2ATaskStore. The default implementation keeps them in two bounded caches (a2aTaskMapping, a2aTaskMapping:context): node-local on a single node, and backed by JetStream KV buckets (A2A_TASKS, A2A_CONTEXTS) when eddi.messaging.type=nats, so a task issued on one node is found on every other. Entries expire after eddi.a2a.task-ttl (default 24h). A task EDDI issued is also found without that store — after a restart, or on another node — because its id names its conversation and its turn is tagged with it: GetTask then re-derives the task from the conversation store, and a contextId EDDI issued resolves the same way. Both are scoped to the calling peer: a conversation is only used when the peer owns it. What does not survive a restart on a single node is a peer-chosen id: a legacy tasks/send id, or a contextId the peer made up. A clustered deployment needs no custom store: the NATS-backed default is shared.
Streaming
SendStreamingMessage / message/stream answer with text/event-stream. Each event is a JSON-RPC response carrying the request's id:
the task,
working;one
artifactUpdate(0.3:artifact-update) per streamed token, appended to theresponseartifact;the settled answer as a final
artifactUpdatewithappend: false,lastChunk: true— it replaces the streamed preview, because the turn's output (after templating and any non-LLM output) is the result;a
statusUpdate(0.3:status-updatewithfinal: true) with the task's final state.
A turn that outlives the stream ends it on its last known state; poll GetTask for the rest. While no event is due, the stream writes an SSE comment (: keepalive) every 15 seconds so a proxy does not drop an idle connection; SSE clients ignore comment lines.
The in-flight bound
At most eddi.a2a.max-concurrent-requests (default 64) A2A turns run at once, across all peers and agents. A send or stream beyond that is refused before any conversation is started with HTTP 503, Retry-After: 1 and a JSON-RPC error body (-32603, "Server busy: too many concurrent A2A requests. Retry shortly."). GetTask and CancelTask are never refused.
A slot is held for the turn, not the HTTP request: a returnImmediately send, a stream and a blocking send that stopped waiting keep it until the turn settles. Every slot is released at the latest task-timeout + 30 s after it was taken, so a turn that never reports back cannot leak one; a normal release cancels that timer. A cancelled turn keeps its slot until it actually stops (an in-flight LLM call is not interrupted).
Metrics: eddi_a2a_requests_total{method,dialect,outcome} (outcome=busy counts refusals), eddi_a2a_tasks_total{state} and the gauge eddi_a2a_in_flight — see Metrics.
Compatibility and deprecations
tasks/sendis deprecated and still served. Its result is now the 0.3 task shape —statusis an object, every part carrieskindas well as the oldtype— so a client that readstatusas a string must readstatus.state. EDDI's own client up to 6.5 only reads the artifacts and is unaffected./.well-known/agent.jsonand{agent}/agent.jsonare kept next to the currentagent-card.jsonpaths.The Agent Card carries both the 1.0 fields (
supportedInterfaces,securitySchemes/securityRequirementsin the 1.0 shape) and the 0.3 connection fields (url,protocolVersion: "0.3.0",preferredTransport), plus EDDI's oldauthenticationblock.versionis the EDDI version;capabilities.streamingis nowtrue.Removed: the card's
stateTransitionHistorycapability (EDDI never provided a transition history).
Example: Send a Message (A2A 1.0)
The same call in the 0.3 dialect is "method": "message/send" with "role": "user" and "parts": [{"kind": "text", "text": "…"}]; the deprecated form is "method": "tasks/send" with "params": {"id": "task-1", "message": {…}}.
Configuration Properties
eddi.a2a.enabled
true
Master toggle for all A2A endpoints
eddi.a2a.base-url
http://localhost:7070
Base URL used in Agent Card URLs
eddi.a2a.public-token-endpoint
(derived)
The token endpoint advertised in Agent Cards — see The advertised token endpoint
eddi.a2a.capabilities.public
false
Whether /.well-known/capabilities and /.well-known/capabilities/skills are served at all — see Who can call them
eddi.a2a.task-ttl
24h
How long a task/context mapping is kept (shared bucket in NATS mode)
eddi.a2a.task-timeout-seconds
systemRuntime.agentTimeoutInSeconds
How long a blocking send waits for its turn before answering working
eddi.a2a.tool-description.max-chars
1024
Client side: a peer's skill descriptions are directive-redacted and cut to this length before they reach the model, as for MCP tools
eddi.a2a.tool-schema.max-bytes / eddi.a2a.tool-schema.max-bytes-per-agent
32768 / 524288
Client side: the serialised parameter-schema bound per tool and per peer; each redaction, truncation or drop is counted in eddi_a2a_tool_schema_governed_total
While eddi.a2a.enabled=false, the card and capability endpoints answer 404, GET /a2a/agents answers 200 with an empty list, and the JSON-RPC endpoint answers HTTP 200 with a JSON-RPC "method not found" error (-32601, "A2A is disabled") — not a 404, because a JSON-RPC client reads errors from the body.
Client — Consuming Remote A2A Agents as Tools
Configure remote A2A agents in your LLM task configuration. They are discovered and merged into the tool-calling loop alongside built-in, MCP, and httpcall tools.
LLM Task Configuration
url
string
required
Base URL of the remote A2A agent
name
string
from Agent Card
Display name (used in tool naming). A blank name counts as unset
apiKey
string
—
A ${vault:...} or ${connection:...} reference, to prevent secret leakage. A raw key still works but logs a warning
timeoutMs
long
30000
Timeout for A2A operations
skillsFilter
string[]
all skills
Only expose specific skills (by id or name)
⚠️ Security: Always use vault references (
${vault:my-key}) for API keys. Raw keys trigger a runtime warning and risk leakage in configuration exports. See Secrets Vault.
How It Works
Discovery:
A2AToolProviderManagerfetches the Agent Card from{url}/agent.json, then{url}/.well-known/agent-card.json, then{url}/.well-known/agent.json— the first that answers wins. Aurlending in.jsonis fetched as the card itself.Dialect: read off the card. A JSON-RPC interface at protocol version
1.xinsupportedInterfaces→ A2A 1.0 (SendMessage, headerA2A-Version: 1.0); a0.xprotocolVersion→ 0.3 (message/send); neither — a stock EDDI up to 6.5, or any pre-0.2 peer — → the legacytasks/send.Endpoint: the configured
url. A card is authored by the peer and is not allowed to redirect the call (or change what a HITL approval fingerprint pins); only whenurlnames the card document itself is the card's interface URL used — and then only if it is on the same origin (scheme, host, port) as the card, because the configured credential is sent to that endpoint. A card naming another origin is refused. The URL is validated like any other target.Mapping: Each skill becomes a
ToolSpecificationwith amessageparameterExecution: When the LLM calls the tool, one send is made in the peer's dialect. The result is read in any of the three shapes. A task that did not complete reaches the model as such —
A2A agent task failed: …,… needs more input: …,… is still working …— never as an answer.Caching: Agent Cards are cached for 5 minutes to avoid redundant fetches, per
urlandapiKey: a card fetched with one credential — which may list skills the peer shows only to that caller — is never served to a config with another credential or none. Configs naming the sameapiKeyreference share a card.
Tool Naming
Tools are named {agentName}_{skillId}, sanitized to [a-z0-9_]. Example: support_agent_order_tracking. A card without skills gives one tool named {agentName}.
At most 64 characters, the limit OpenAI, Anthropic and Gemini put on a tool name. A longer name is cut and ends in a short hash of the whole name, so two long skill ids that share a prefix stay two tools.
Never empty. A name that sanitizing leaves empty — one written in a script other than Latin, such as
検索エージェント— becomesa2a_<hash>(a skill id:skill_<hash>), so two such agents get different tool names. Set an ASCIInameon the agent config to choose a readable one.
Network safety: a peer
urlis an outbound URL chosen by the agent's author. SSRF validation (eddi.security.ssrf-protection.enabled) is off by default; the cloud metadata endpoints are refused either way. See security.md.
Architecture
Key Files
engine/a2a/A2AModels.java
Protocol records (Agent Card, JSON-RPC, Task), dialect-neutral
engine/a2a/A2AWireFormat.java
Reads requests and writes results in each dialect (1.0, 0.3, legacy)
engine/a2a/AgentCardService.java
Generates Agent Cards from agent configs
engine/a2a/A2ATaskHandler.java
Runs tasks as conversation turns; maps conversation state to task state
engine/a2a/IA2ATaskStore.java, CachedA2ATaskStore.java
Where tasks and contexts are remembered (default: node-local cache)
engine/a2a/A2AInFlightLimiter.java
The in-flight bound
engine/a2a/RestA2AEndpoint.java
JAX-RS endpoints
modules/llm/impl/A2AToolProviderManager.java
Client-side discovery and tool execution
modules/llm/model/LlmConfiguration.java
A2AAgentConfig configuration model
configs/agents/model/AgentConfiguration.java
a2aEnabled, a2aSkills, description
Last updated
Was this helpful?