Skip to content

Core Concepts and Components in A2A

A2A uses a set of core concepts that define how agents interact. Understand these core building blocks to develop or integrate with A2A-compliant systems.

A2A Actors showing a User, A2A Client (Client Agent), and A2A Server (Remote Agent)

Core Actors in A2A Interactions

  • User: The end user, which can be a human operator or an automated service. The user initiates a request or defines a goal that requires assistance from one or more AI agents.
  • A2A Client (Client Agent): An application, service, or another AI agent that acts on behalf of the user. The client initiates communication using the A2A protocol.
  • A2A Server (Remote Agent): An AI agent or agentic system that exposes an HTTP endpoint implementing the A2A protocol. It receives requests from clients, processes tasks, and returns results or status updates. To the client, the remote agent is an opaque (black-box) system: its internal workings, memory, and tools stay hidden.

Fundamental Communication Elements

The following table describes the fundamental communication elements in A2A:

Element Description Key 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 securely and effectively.
Task A stateful unit of work initiated by an agent, with a unique ID and defined lifecycle. Facilitates tracking of long-running operations and enables multi-turn interactions and collaboration.
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 necessarily formal artifacts.
Part 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. Provides flexibility for agents to exchange various 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). Delivers the concrete results of an agent's work, ensuring structured and retrievable outputs.

Interaction Mechanisms

The A2A Protocol supports several interaction patterns. Each fits a different need for responsiveness and persistence. With them, agents exchange information reliably, whatever the task's complexity or duration:

  • 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 open a stream over an open HTTP connection. They receive real-time, incremental results or status updates from the server.
  • Push Notifications: The server calls a client-provided webhook on a significant task update. This suits very long-running tasks or disconnected clients.

For more on streaming and push notifications, see Streaming & Asynchronous Operations.

Agent Cards

The Agent Card is a JSON document. It acts as a digital business card. It gives key metadata for initial discovery and interaction setup. Clients parse it to decide whether an agent fits a task, how to structure requests, and how to communicate securely. The card lists identity, service endpoint (URL), A2A capabilities, authentication requirements, and skills.

Messages and Parts

A message represents a single turn of communication between a client and an agent. It includes a role ("user" or "agent") and a unique messageId. It contains one or more Part objects, which are granular containers for the actual content. This design allows A2A to be modality independent.

The Part object is a flexible container that can hold different types of content using a oneof field structure. A Part must contain exactly one of the following content fields:

  • text: A string containing plain textual content.
  • raw: A byte array containing binary file data (inline).
  • url: A string URI referencing external file content.
  • data: A structured JSON value (e.g., object, array) for machine-readable data.

Additionally, every Part can include:

  • mediaType: The MIME type of the content (e.g., "text/plain", "image/png", "application/json").
  • filename: An optional name for the file or content.
  • metadata: A key-value map for additional context.

Artifacts

An artifact is a tangible output or concrete result that a remote agent generates during a task. Unlike general messages, artifacts are the actual deliverables. An artifact has a unique artifactId, a human-readable name, and one or more part objects. Artifacts tie closely to the task lifecycle and can be streamed to the client in increments.

Agent Response: Task or Message

The agent response can be a new Task (when the agent needs to perform a long-running operation) or a Message (when the agent can respond immediately).

For more details, see Life of a Task.

Other Important Concepts

  • Context (contextId): A server-generated identifier. Use it to group related Task objects and carry context across a series of interactions.
  • Transport and Format: A2A communication occurs over HTTP(S). JSON-RPC 2.0 is used as the payload format for all requests and responses.
  • Authentication & Authorization: A2A relies on standard web security practices. Authentication requirements are declared in the Agent Card, and credentials (e.g., OAuth tokens, API keys) are typically passed through HTTP headers, separate from the A2A protocol messages themselves. For more information, see Enterprise-Ready Features.
  • Agent Discovery: The process by which clients find Agent Cards to learn about available A2A Servers and their capabilities. For more information, see Agent Discovery.
  • Extensions: A2A allows agents to declare custom protocol extensions as part of their AgentCard. For more information, see Extensions.