*** Build your own Store Location Agent ***
Today we will spotlight a starter Retail Agent-to-Agent use-case:
Two agents, one conversation.
Client Agent (Google Gemini)
Retail Store-Location Agent (public API)
Hand it a ZIP code → receive up to five nearby Kroger addresses (10-mile radius).
Later we can invite Product, Promotion, and Transaction agents to the party—the real magic of A2A is the ensemble.
What you just saw
- Gemini acts as the client; A2A routes the request to a retailer Location API.
- UI returns ≤ 5 stores for 98001 (WA), 45211 (OH), 94309 (CA).
- Video recorded with my personal
GOOGLE_API_KEY
and API credentials. - Code is public on GitHub https://github.com/ucare9091/locations_a2a: clone and run with your own keys.
3-step local setup
- Clone Google’s
a2a-samples
. - Inside
samples/a2a-adk-samples
, drop the Kroger-Agent repo. uv run main.py
→ A2A server listens onlocalhost:10001
.
File map (high-level)
File | Job |
---|---|
main.py |
Orchestrates A2A traffic; imports adk , a2a.server , a2a.types . Think of it as the dinner-planner’s notebook—every “chef” (agent) knows the menu. |
.env |
Your GOOGLE_API_KEY + Kroger client credentials. |
kroger_server.py |
Handles OAuth, calls Kroger API, trims response to top-5 addresses. (Most bugs lived here.) |
Spin up the UI
```bash
cd demo/ui
uv run main.py # UI now on :12000