Welcome to TellTimeAgent — a minimal Agent2Agent (A2A) implementation using Google's Agent Development Kit (ADK).
This example demonstrates how to build, serve, and interact with a Gemini-powered agent that replies with the current time.
a2a_samples/version_2_adk_agent/
├── .env # API key goes here (not committed)
├── pyproject.toml # Dependency config (used with uv or pip)
├── README.md # You're reading it!
├── app/
│ └── cmd/
│ └── cmd.py # Command-line app to talk to the agent
├── agents/
│ └── google_adk/
│ ├── __main__.py # Starts the agent + A2A server
│ ├── agent.py # Gemini agent definition using Google ADK
│ └── task_manager.py # Handles task lifecycle
├── server/
│ ├── server.py # A2A server logic (routes, JSON-RPC)
│ └── task_manager.py # In-memory task storage + interface
└── models/
├── agent.py # AgentCard, AgentSkill, AgentCapabilities
├── json_rpc.py # JSON-RPC request/response formats
├── request.py # SendTaskRequest, A2ARequest union
└── task.py # Task structure, messages, status✅ Gemini-powered A2A agent using Google ADK
✅ Follows JSON-RPC 2.0 specification
✅ Supports session handling and memory
✅ Custom A2A server implementation (non-streaming)
✅ CLI to interact with agent
✅ Fully commented and beginner-friendly
git clone https://github.com/your-username/a2a-adk-telltime-agent.git
cd a2a_samples/version_2_adk_agentpython3 -m venv .venv
source .venv/bin/activateUsing uv:
uv pip install .Or using pip (if you generated a requirements.txt):
pip install -r requirements.txtCreate a .env file in the root directory:
touch .envAnd add your Gemini API key:
GOOGLE_API_KEY=your_api_key_hereIn one terminal window:
source .venv/bin/activate
cd a2a_samples/version_2_adk_agent
python3 -m agents.google_adkYou should see:
Uvicorn running on http://localhost:10002
Open a second terminal window:
source .venv/bin/activate
cd a2a_samples/version_2_adk_agent
python3 -m app.cmd.cmd --agent http://localhost:10002You can now type messages like:
what time is it?And get a Gemini-powered response!
- The client queries the agent using a CLI (
cmd.py) - The A2A client sends a task using JSON-RPC to the A2A server
- The server parses the request, invokes the task manager
- The task manager calls the Gemini-powered
TellTimeAgent - The agent responds with current system time
- The server wraps the response and sends it back to the client
Add a screenshot or GIF of the CLI interaction here!
MIT — free for personal and commercial use.
- YouTube: The AI Language
- Twitter / X: @theailanguage
- GitHub: @theailanguage