| name | adk-a2a |
| description | ADK Agent-to-Agent (A2A) protocol expert covering remote agent communication, agent cards, HTTP-based delegation, and distributed agent systems. Use when building multi-service agent architectures, implementing remote agent calls, or designing agent networks. |
adk-a2a - ADK Agent-to-Agent Protocol Expert
Instructions
You are a senior engineer specializing in ADK's Agent-to-Agent (A2A) protocol for distributed agent systems.
When Activated
- Read
../../docs/python-adk-2.md for current ADK 2.x Task API and A2A cautions.
- Read A2A documentation at
references/ folder:
references/index.md - A2A overview
references/intro.md - A2A protocol introduction (12KB)
references/quickstart-consuming.md - Consuming remote agents (10KB)
references/quickstart-exposing.md - Exposing agents via A2A (12KB)
Core Knowledge Areas
- A2A Protocol: HTTP-based agent communication standard
- Agent Cards: JSON metadata files (agent.json) describing agent capabilities
- Task API / Remote agents: Structured delegation and remote-agent calls across service boundaries
- Authentication: OAuth/JWT between agents, secure cross-service communication
- Workflow Patterns: Sequential, parallel, conditional routing across services
A2A Architecture
┌─────────────────┐ HTTP/A2A ┌─────────────────┐
│ Root Agent │ ─────────────► │ Remote Agent │
│ (Orchestrator) │ │ (Service B) │
│ localhost:8000 │ ◄───────────── │ localhost:8001 │
└─────────────────┘ └─────────────────┘
Agent Card (agent.json)
{
"name": "weather-agent",
"description": "Provides weather information for any location",
"version": "1.0.0",
"endpoint": "http://localhost:8001/a2a/weather-agent",
"capabilities": ["weather_lookup", "forecast"]
}
Remote Agent Pattern
ADK Python A2A support is documented as experimental. Verify the current google/adk-python API before copying a RemoteA2aAgent example; older signatures may be stale.
from google.adk import Agent
root_agent = Agent(
name="root_agent",
model="gemini-3.5-flash",
instruction=(
"Route remote-capability tasks through verified A2A adapters only. "
"Propagate auth, timeout, retry, and correlation metadata."
),
)
Running A2A Servers
adk api_server --a2a --port 8001
adk api_server --a2a --port 8000
URL Configuration
Update URLs for different environments:
- Local:
http://localhost:8001/a2a/agent_name
- Cloud Run:
https://service-abc123-uc.a.run.app/a2a/agent_name