Skip to content
andreirosu11Public

About

Training

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Advanced Agentic AI - Google ADK Demos

Training modules built with Google Agent Development Kit (ADK) covering agent patterns, MCP, A2A, evaluation, and guardrails.

AI usage is encouraged. Building multi-agent systems is hard. When you're stuck — on a concept, a bug, or an exercise — use AI tools (Claude, ChatGPT, Gemini, Copilot, etc.) to help you move forward. The goal of this course is to try things, not to struggle in silence. That said, don't just copy-paste solutions. Take the time to understand why the code works. AI can get you unstuck fast, but the learning only happens when you engage with what it gives you.

Setup

Option A: GitHub Codespaces (recommended)

The fastest way to get started — no local installation needed.

  1. Click Code → Codespaces → Create codespace on main from the GitHub repo page.

  2. Wait for the container to build (~2-3 min). Python, uv, make, and all dependencies are installed automatically.

  3. Set your GOOGLE_API_KEY:

    Role When How
    Trainer Before creating the Codespace (recommended) Go to github.com/settings/codespaces, add a secret called GOOGLE_API_KEY with your key. It will be injected automatically.
    Trainee After creation Wait a few minutes for the post-creation script to run and check the contents of the .env file carefully.
  4. Run make check to verify everything works.

Codespaces tips:

  • Phoenix UI, the ADK web UI, and other servers are accessed via forwarded ports. When a port opens, VS Code shows a notification — click "Open in Browser". You can also find them in the Ports tab at the bottom of the VS Code window.
  • Always use http://localhost:<port> in your .env (e.g., PHOENIX_ENDPOINT=http://localhost:6006/v1/traces). The *.app.github.dev URLs require authentication that tools can't provide.
  • Costs: GitHub Free includes 120 core-hours/month (60h on a 2-core machine). Stop your Codespace when not using it (Codespaces → ... → Stop). Delete it when you're done — stopped Codespaces still consume storage (15 GB free/month). Recreating one takes ~2 minutes.

Option B: Local setup

Tools Used

This course uses two command-line tools:

  • uv — A fast Python package manager. Think of it as pip + venv in one tool. uv sync installs dependencies, uv run runs scripts in the project's virtual environment. Install: curl -LsSf https://astral.sh/uv/install.sh | sh (Mac/Linux) or powershell -c "irm https://astral.sh/uv/install.ps1 | iex" (Windows).

  • make (optional) — Runs shortcuts defined in the Makefile. For example, make eval runs the evaluation instead of typing the full command. Available on Mac/Linux by default. On Windows: install via choco install make or scoop install make, or just use the full uv run commands from the READMEs instead.

Steps

  1. Install dependencies and create your .env file:
make setup
# Or manually:
uv sync
cp .env-example .env
  1. Edit .env and set your GOOGLE_API_KEY.

Modules

# Module Topic Command Make
00 s00_adk_basics ADK refresher: agents, tools, state uv run adk run exercises/s00_adk_basics
01 s01_workflow_agents Sequential, Parallel, Loop patterns uv run adk run exercises/s01_workflow_agents
02 s02_custom_agent Custom BaseAgent orchestration uv run adk run exercises/s02_custom_agent
03 s03_mcp MCP: consume & build servers uv run adk run exercises/s03_mcp
04 s04_a2a_agent Agent-to-Agent protocol uv run adk run exercises/s04_a2a_agent (start server first) make a2a-server
05 s05_eval_fundamentals Eval fundamentals: code/faithfulness graders, test design, Phoenix uv run python -m exercises.s05_eval_fundamentals.run_eval make eval
06 s06_guardrails_agent Callbacks and guardrails uv run adk run exercises/s06_guardrails_agent
07 s07_eval_mastery Eval mastery: model graders, rubrics, A/B testing, policy faithfulness uv run python -m exercises.s07_eval_mastery.run_ab_test make ab
08 s08_deploy Deploy & observe (FastAPI, Docker, Cloud Run) uv run uvicorn exercises.s08_deploy.server:app make serve
09 s09_testing_and_optimization Testing pyramid & prompt optimization uv run python -m exercises.s09_testing_and_optimization.run_comparison make compare
10 s10_drift_and_feedback Drift detection & feedback loops (capstone) uv run python -m exercises.s10_drift_and_feedback.run_drift_check make drift

Each module has its own README.md with learning goals, setup instructions, and exercises.

Model version note: This course was tested with gemini-2.5-flash. All exercises default to this model via os.getenv("MODEL", "gemini-2.5-flash"). If you use a different model, eval scores may vary. Run uv run python check_setup.py to verify your setup before starting.

Multi-model support: litellm is included as a dependency. To use a different provider, set MODEL to a LiteLLM-compatible identifier (e.g., azure/gpt-4o, anthropic/claude-sonnet-4-6, vertex_ai/gemini-2.5-flash). See the LiteLLM docs for supported providers.

Pre-flight Check

Run this once before starting to catch environment issues early:

make check
# Or: uv run python check_setup.py

Running

# See all available make targets
make help

# Web UI (all agents visible from the exercises folder)
uv run adk web exercises

# Single agent in terminal
uv run adk run exercises/<module_name>

# API server
uv run adk api_server --port 8080

Special Setup

Some modules require additional setup:

  • s04_a2a_agent: Start the A2A server first: uv run python -m exercises.s04_a2a_agent.server
  • s05_eval_fundamentals: Start Phoenix first: uv run phoenix serve (UI at http://localhost:6006). In Codespaces, open the Phoenix UI via the Ports tab (port 6006).
  • s09_testing_and_optimization: Install dev deps: uv sync --extra dev (adds pytest-asyncio, httpx). Already included in Codespaces.

About

Training

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages