*** Build your own Retail Product Agent ***
Today we will spotlight a starter Retail Agent-to-Agent use-case:
Two agents, one conversation.
Client Agent (Google Gemini)
Retail Product Agent (public API)
Ask a product question → receive a list of recommended retail products.
Later we can invite 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 Product API.
- UI returns a list of recommended products for the shopper.
- Video recorded with my personal
GOOGLE_API_KEY
and API credentials. - Code is public on GitHub https://github.com/ucare9091/product_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, returns a list of products. (Most bugs lived here.) |
Spin up the UI
```bash
cd demo/ui
uv run main.py # UI now on :12000