Skip to main content
Agents can collaborate to perform complex tasks by communicating with each other. A2A solves the problem of Agents not being able to communicate with each other because each Agent has its own unique API.
a2a-actors

Source: A2A Protocol
The A2A Protocol defines standard specifications for Agent communication and message formatting, enabling seamless interoperability between different AI agents.

Highlights

  • Agents can self-discover each other via an Agent Card.
  • Supports both immediate responses and long-running tasks.
  • Defines security and authentication mechanisms.
  • Multiple transport protocols supported: JSON-RPC, gRPC, and HTTP + REST.

Key Concepts

The A2A protocol is comprehensive, and we will cover the most important concepts here.

Agent Discovery: The Agent Card

Every Agent must expose an Agent Card, a JSON object that describes the Agentโ€™s identity, capabilities, skills, service endpoint URL, and how clients should authenticate and interact with it. It is recommended to expose the Agent Card at the endpoint https://{server_url}/.well-known/agent-card.json

Protocol Methods

  1. message/send
  2. message/stream
  3. tasks/get
  4. tasks/list

A2A with Agentor

Agentor provides built-in A2A support, making it effortless to create agents that can discover, communicate, and collaborate with other A2A-compatible agents.

Key Features

  • Agent Discovery: Automatic agent card generation at /.well-known/agent-card.json describing agent capabilities, skills, and endpoints
  • Standard Communication: JSON-RPC based messaging with support for both streaming and non-streaming responses
  • Rich Interactions: Built-in support for tasks, status updates, and artifact sharing between agents
The following example shows how to create an Agent and serve it as an A2A-compatible Agent.
from agentor import Agentor

agent = Agentor(
    name="Weather Agent",
    model="gpt-5",
    tools=["get_weather"],
)

# Serve agent with A2A protocol enabled automatically
agent.serve(port=8000)
# Agent card available at: http://localhost:8000/.well-known/agent-card.json
Any agent served with agent.serve() automatically becomes A2A-compatible with standardized endpoints for message sending, streaming, and task management.