A2A protocol defines a standardized way for AI agents to interact, enabling them to exchange messages, negotiate tasks, and share information effectively.
This protocol is designed to facilitate collaboration between agents, allowing them to work together towards common goals.
The A2A client is an application or another agent that connects to the A2A server to interact with the agents hosted on it. The client can send messages, assign tasks, and receive responses from the agents.
It serves as the interface through which users or other applications can communicate with the agents in the A2A ecosystem.
The A2A server hosts agents and manages their interactions. It provides an HTTP endpoint for clients to connect and communicate with the agents it hosts.
It receives requests and manages task execution.
Each agent has an JSON metadata document that contains essential information about the agent, such as its name, capabilities, and current status. The Agent Card serves as a reference for other agents when interacting with it.
The Agent Card is accessible at the standard endpoint: /.well-known/agent.json
A stateful unit of work initiated by an agent, with a unique ID and defined lifecycle.
A single turn of communication between a client and an agent, containing content and a role ("user" or "agent").
The fundamental content container used within Messages and Artifacts. A Part holds one of: text content, a file reference (URL or inline bytes), or structured data.
A tangible output generated by an agent during a task (for example, a document, image, or structured data).
Agents can interact through various mechanisms, including:
- Request/Response (Polling): Clients send a request and the server responds. For long-running tasks, the client periodically polls the server for updates.
- Streaming with Server-Sent Events (SSE): Clients initiate a stream to receive real-time, incremental results or status updates from the server over an open HTTP connection.
- Push Notifications: For very long-running tasks or disconnected scenarios, the server can actively send asynchronous notifications to a client-provided webhook when significant task updates occur.
The Agent executer is responsible for executing tasks assigned to an agent. It processes the instructions provided in the task, utilizes any necessary artifacts, and produces the expected outcomes. The executer also handles communication with other agents to coordinate efforts and share results.