Agent-to-Agent (A2A) server in Elastic Agent Builder

The Agent-to-Agent (A2A) server enables external A2A clients, such as other agent frameworks, to communicate with Elastic Agent Builder agents.

Returns the agent card for a specific agent. The agent card is the agent's metadata, including its capabilities. The agentId is a path parameter that corresponds to your agent IDs:

GET /api/agent_builder/a2a/{agentId}.json
		

Execute A2A protocol (POST)

Interact with agents following the A2A protocol specification:

POST /api/agent_builder/a2a/{agentId}
		
Important

Both A2A endpoints require API key authentication. Refer to Create a read-only client key for a limited key example. For more information about the A2A protocol, refer to the A2A protocol specification.

By default, message/send waits until the agent finishes, then returns the complete agent message in a single response.

In 9.2 through 9.5, message/stream isn't supported. Refer to Limitations and known issues.

In 9.4, non-blocking requests require version 9.4.5 or later. On earlier versions, configuration.blocking: false is ignored and the request waits for the complete response.

To get a response without waiting for the agent to finish, call message/send with configuration.blocking set to false. The response is a task. Poll it with tasks/get until it reaches a final state, then read status.message, which contains the agent's response or, if the task failed, the error. For the task states, refer to the A2A protocol specification.

Call the message/stream method to receive the response as a stream of server-sent events. The agent card reports streaming support by setting capabilities.streaming to true.

The stream uses the A2A streaming events. Artifact updates contain the agent's response text, and status updates in the working state report progress, such as tool calls. The final status update is completed, failed, or input-required.

The input-required state means the agent is waiting for a response to a prompt, which A2A clients can't send. Refer to Human-in-the-loop prompts require an interactive conversation.

If the client disconnects before the stream ends, the agent stops.