AI Agents path

🤖 Using AI & AI Agents

Chapter 22 of 24

🤝 Chapter 22: Agent-to-Agent (A2A) Protocol

Agents talking to agents across systems; agent cards, executor, artifacts

Agent-to-Agent (A2A) is a protocol for agents to talk to other agents across organizations and tech stacks. An agent card describes the agent (name, description, skills, endpoint, version). The executor sends chat context to the remote agent; that agent uses its own LLM and tools and returns an artifact (result + description). An event queue keeps connections alive for long tasks. So one travel agent can call an airline agent, a hotel agent, and a car-rental agent, each with its own model and tools, then combine the results.

A2A conversation flow

User → Travel Agent (A2A client): "Book full trip to Honolulu"
Travel Agent parses request, decides to call other agents via A2A
→ Airline Agent (different org)
→ Hotel Agent
→ Car Agent
Each agent has its own LLM + tools; returns an artifact (result + description)
Travel Agent combines artifacts → one reply to user

A2A: agents talking to agents

Travel Agent (orchestrator)
Airline Agent
+
Hotel Agent
+
Car Rental Agent

A2A pieces

  • Agent card — Name, description, skills, endpoint, version.
  • Executor — Sends chat context to the remote agent; remote agent uses its own LLM and tools.
  • Artifact — Result + description returned when the subtask is done.
  • Event queue — Keeps connection alive for long-running tasks.

Example: Full trip booking

User: "Book a full trip to Honolulu — flight, hotel, car." The travel agent (A2A client) delegates to airline, hotel, and car-rental agents. Each does its job and returns an artifact. The travel agent compiles a single response for the user.