A2A Protocol Overview

The Agent-to-Agent (A2A) protocol enables AI agents to communicate and collaborate across different systems and vendors.

Core Concepts

Agents

An agent is any service that implements the A2A protocol. Agents can:

  • Receive and process messages
  • Return responses with results or artifacts
  • Manage long-running tasks
  • Stream partial results

AgentCard

Every A2A agent must expose an AgentCard — a JSON document describing the agent's identity and capabilities. The AgentCard is served at:

{agent-base-url}/.well-known/agent-card.json

Messages

Communication happens through messages. Each message contains:

  • A unique messageId (UUID)
  • A role (user or agent)
  • One or more parts (text, files, or data)

Tasks

Long-running operations are tracked as tasks. Tasks have:

  • A unique id
  • A state (submitted, working, completed, failed, etc.)
  • Optional artifacts with results

Protocol Flow

1. Discovery   →  Client fetches /.well-known/agent-card.json
2. Message Send →  Client sends via message/send or message/stream
3. Processing  →  Agent processes and updates task state
4. Response    →  Agent returns result or streams updates

JSON-RPC 2.0

All A2A communication uses JSON-RPC 2.0 over HTTP. The standard envelope:

{
  "jsonrpc": "2.0",
  "method": "message/send",
  "id": "1",
  "params": { ... }
}

Specification