End-to-end template for the Arize @ Google Cloud Partnerships Hackathon track: a small Google ADK agent (pattern from google/adk-samples personalized-shopping), OpenInference instrumentation for ADK, phoenix.otel.register for Phoenix Cloud tracing, and Gemini CLI MCP config for @arizeai/phoenix-mcp.
This repo uses a tiny in-memory catalog so you can run locally in minutes (no PyTorch, Pyserini, or multi-gigabyte product downloads). The agent still exposes the same search / click tools and a shopping-focused system prompt derived from the upstream sample.
- Python 3.10–3.12
- uv
- Google auth for Gemini: either
GOOGLE_API_KEYor Vertex (gcloud auth application-default login+ project/location) - Phoenix Cloud API key (Phoenix)
- Clone and install
cd gemini-hackathon
cp .env.example .env
# Edit .env: PHOENIX_API_KEY, PHOENIX_COLLECTOR_ENDPOINT (Hostname with /s/...), and either GOOGLE_API_KEY or Vertex settings.
uv sync- Run a traced shopping turn
make run MESSAGE='Find a floral dress in size M'- Open Phoenix — project name defaults to
PHOENIX_PROJECT_NAME(gemini-hackathon). Confirm LLM and tool spans appear. - (Optional) ADK CLI
make run-adk
# Find a floral dress in size MThis path also loads .env and initializes Phoenix tracing.
Phoenix MCP runs inside Gemini CLI, not inside the Python ADK process. After traces are flowing from make run, you can inspect the same Phoenix space from the CLI. Setup patterns and clients are covered in Phoenix MCP server.
- Configure MCP — Ensure
[.gemini/settings.json](.gemini/settings.json)in this repo (or~/.gemini/settings.json) includes thephoenixserver with@arizeai/phoenix-mcp@latest. Set--baseUrlto your Phoenix space hostname (same idea asPHOENIX_COLLECTOR_ENDPOINT:https://app.phoenix.arize.com/s/your-space) and set--apiKeyto your Phoenix API key (px_live_...), or keep keys only in env if your CLI supports that pattern. - Export your API key in the shell that launches Gemini CLI (if the MCP server reads it from the environment):
export PHOENIX_API_KEY=...- Start Gemini CLI from the repo root (or merge the
mcpServersblock into your global Gemini config). Restart the CLI if you just changed MCP settings. - Agent queries Phoenix via MCP (runtime superpower) — With
@arizeai/phoenix-mcpconfigured, the assistant gets tools over your Phoenix workspace (traces, sessions, experiments, prompts, datasets, and more). Try prompts such as:
- “In Phoenix, show me the last 3 traces in my gemini-hackathon project.”
- “In Phoenix, summarize my latest experiment results.”
- “In Phoenix, create a prompt that classifies user intent.” Additional ideas (sessions, annotation configs, datasets): Using the Phoenix MCP server.
- (Optional) The same file defines Phoenix Docs MCP (
phoenix-docs) for in-IDE Phoenix documentation.
More context: Phoenix docs.
| Path | Purpose |
|---|---|
README.md |
This quickstart |
.env.example |
PHOENIX_, GOOGLE_, optional GEMINI_MODEL |
.gemini/settings.json |
Phoenix MCP + Phoenix Docs MCP |
agent/main.py |
One-shot CLI run with tracing |
agent/instrumentation.py |
[phoenix.otel.register(..., auto_instrument=True)](https://arize.com/docs/phoenix/integrations/python/google-adk/google-adk-tracing) |
agent/shopping_demo/ |
ADK root_agent, prompt, tools, mini webshop |
Makefile |
make setup, make run, make run-adk |
Agent structure and prompts are adapted from Google ADK Samples — personalized-shopping (Apache-2.0). Replace shopping_demo/mini_webshop.py with the full WebShop stack when you need the original fidelity.
Apache-2.0 — see LICENSE.