Welcome to TellTimeAgent and the Multi-Agent demo — a minimal Agent2Agent (A2A) implementation using Google's Agent Development Kit (ADK).
This example demonstrates how to build, serve, and interact with three A2A agents:
- TellTimeAgent – replies with the current time.
- GreetingAgent – fetches the time and generates a poetic greeting.
- OrchestratorAgent – routes requests to the appropriate child agent.
All of them work together seamlessly via A2A discovery and JSON-RPC.
version_3_multi_agent/
├── .env # Your GOOGLE_API_KEY (not committed)
├── pyproject.toml # Dependency config
├── README.md # You are reading it!
├── app/
│ └── cmd/
│ └── cmd.py # CLI to interact with the OrchestratorAgent
├── agents/
│ ├── tell_time_agent/
│ │ ├── __main__.py # Starts TellTimeAgent server
│ │ ├── agent.py # Gemini-based time agent
│ │ └── task_manager.py # In-memory task handler for TellTimeAgent
│ ├── greeting_agent/
│ │ ├── __main__.py # Starts GreetingAgent server
│ │ ├── agent.py # Orchestrator that calls TellTimeAgent + LLM greeting
│ │ └── task_manager.py # Task handler for GreetingAgent
│ └── host_agent/
│ ├── entry.py # CLI to start OrchestratorAgent server
│ ├── orchestrator.py # LLM router + TaskManager for OrchestratorAgent
│ └── agent_connect.py # Helper to call child A2A agents
├── server/
│ ├── server.py # A2A JSON-RPC server implementation
│ └── task_manager.py # Base in-memory task manager interface
└── utilities/
├── discovery.py # Finds agents via `agent_registry.json`
└── agent_registry.json # List of child-agent URLs (one per line)-
Clone & navigate
git clone https://github.com/theailanguage/a2a_samples.git cd a2a_samples/version_3_multi_agent -
Create & activate a venv
python3 -m venv .venv source .venv/bin/activate -
Install dependencies
Using
uv:uv pip install .Or with pip directly:
pip install . -
Set your API key
Create
.envat the project root:echo "GOOGLE_API_KEY=your_api_key_here" > .env
Start the TellTimeAgent
python3 -m agents.tell_time_agent \
--host localhost --port 10000Start the GreetingAgent
python3 -m agents.greeting_agent \
--host localhost --port 10001Start the Orchestrator (Host) Agent
python3 -m agents.host_agent.entry \
--host localhost --port 10002Launch the CLI (cmd.py)
python3 -m app.cmd.cmd --agent http://localhost:10002Try it out!
> What time is it?
Agent says: The current time is: 2025-05-05 14:23:10
> Greet me
Agent says: Good afternoon, friend! The golden sun dips low...- Discovery: OrchestratorAgent reads
utilities/agent_registry.json, fetches each agent’s/.well-known/agent.json. - Routing: Based on intent, the Orchestrator’s LLM calls its tools:
list_agents()→ lists child-agent namesdelegate_task(agent_name, message)→ forwards tasks
- Child Agents:
- TellTimeAgent returns the current time.
- GreetingAgent calls TellTimeAgent then crafts a poetic greeting.
- JSON-RPC: All communication uses A2A JSON-RPC 2.0 over HTTP via Starlette & Uvicorn.
- A2A GitHub: https://github.com/google/A2A
- Google ADK: https://github.com/google/agent-development-kit