Hands-On Workshop • Ground a Gemini agent in enterprise data and the real world
Module 0 • Welcome • 00:02 – 00:04 (2 min)
Google Developer Expert
g.dev/credits/latw-bigquery-100
Point your phone camera at the code → redeem → create or pick a project with billing enabled. BigQuery and Maps Grounding Lite are pay-as-you-go; today's lab fits inside these credits many times over.
LATWDevs2026!
Module 0 • Welcome • 00:04 – 00:05 (1 min)
Google Developer Expert
One Gemini agent • Two managed MCP servers • Zero hand-written API clients
Live demo: an ADK agent chains BigQuery SQL with Google Maps lookups (source: Google Cloud announcement, Dec 10 2025).
Module 0 • Welcome • 00:05 – 00:06 (1 min)
Google Developer Expert
Everything you need is one QR away; the codelab has all commands and prompts
Full step-by-step lab: setup scripts, agent code, and every prompt we will run today.
Maps Grounding Lite and BigQuery need billing enabled. Redeem your event credit code, then create a project.
This deck, the verbatim facilitator script, and the copy-paste prompt sheet.
Google Developer Expert
Google Developer Expert — AI & ML
ML Scientist — PayPal
Module 0 • Welcome • 00:07 – 00:08 (1 min)
Google Developer Expert
console.cloud.google.com → Activate Cloud Shell (top bar)
git clone https://github.com/google/mcp.git
cd mcp/examples/launchmybakery && ./setup/setup_env.sh
./setup/setup_bigquery.sh
The two setup scripts take ~3-5 min. Kick them off now, then look up — I'll explain what everything is while your project provisions itself.
# Verify auth + project
gcloud auth list
export PROJECT_ID=$(gcloud config get project)
# Get the code
git clone https://github.com/google/mcp.git
cd mcp/examples/launchmybakery
# Kick off BOTH setup scripts
./setup/setup_env.sh
./setup/setup_bigquery.sh
Module 1 • Concepts • 00:08 – 00:10 (2 min)
Google Developer Expert
Module 1 • Concepts • 00:10 – 00:11 (1 min)
Google Developer Expert
Module 1 • Concepts • 00:11 – 00:13 (2 min)
Google Developer Expert
Build the definition up piece by piece — press → to reveal each part
Gemini 3.5 Flash — the reasoning brain. Alone, it only predicts text.
A system prompt that defines the goal, persona, and rules of the game.
Functions the model may call to act on the world — query BigQuery, search Maps.
Reason → pick a tool → act → observe result → reason again, until the goal is met.
Module 1 • Concepts • 00:13 – 00:14 (1 min)
Google Developer Expert
The reasoning model. Our .env sets GOOGLE_GENAI_USE_VERTEXAI=1, so ADK calls it through your project's Vertex AI endpoint.
Google's open-source framework for building agents: LlmAgent, tool wiring, sessions, and a built-in web UI for debugging.
The open standard (started by Anthropic) that lets any agent discover and call tools on any server — one protocol instead of N custom integrations.
Module 1 • Concepts • 00:14 – 00:15 (1 min)
Google Developer Expert
root_agent = LlmAgent(
model='gemini-3.5-flash',
name='root_agent',
instruction=f"""
Help the user answer questions by strategically
combining insights from two sources:
1. **BigQuery toolset:** Access demographic (inc.
foot traffic index), product pricing, and
historical sales data in the mcp_bakery
dataset. Do not use any other dataset.
Run all query jobs from project id: {PROJECT_ID}.
2. **Maps Toolset:** Use this for real-world
location analysis, finding competition/places
and calculating necessary travel routes.
Include a hyperlink to an interactive map in
your response where appropriate.
""",
tools=[maps_toolset, bigquery_toolset]
)
The three control surfaces:
model — Which Gemini does the thinkinginstruction — The agent's job description — notice it scopes the data AND names the projecttools — Two MCP toolsets = every tool from both servers
Module 1 • Concepts • 00:15 – 00:17 (2 min)
Google Developer Expert
The 'USB-C for AI' — Anthropic's open standard, adopted across the industry
Module 1 • Concepts • 00:17 – 00:18 (1 min)
Google Developer Expert
And the transport that carries it — today that's Streamable HTTP
ADK's web UI — the app the user chats with.
An MCP client inside the host keeps a dedicated connection per server.
BigQuery & Maps servers expose a catalog of named, typed tools.
Stdio for local servers; Streamable HTTP for remote, Google-hosted ones — what we use today.
Module 1 • Concepts • 00:18 – 00:20 (2 min)
Google Developer Expert
No local servers to install, patch, or secure. You point your client at a globally-consistent endpoint.
🔍 Click diagram to enlarge full-screen
Module 1 • Concepts • 00:20 – 00:21 (1 min)
Google Developer Expert
The agent discovers these itself; column descriptions become its documentation
list_dataset_idsWhat datasets exist in this project?list_table_idsWhat tables are in mcp_bakery?get_dataset_infoMetadata about a datasetget_table_infoSchema + column descriptions for a tableexecute_sqlRun any SQL — including AI.FORECASTexecute_sql_readonlySame, but mutations blocked by design
Module 1 • Concepts • 00:21 – 00:22 (1 min)
Google Developer Expert
Trusted geospatial grounding with required Google Maps attribution
search_placesFind places + AI summaries + Maps linkscompute_routesDistance & duration between two pointslookup_weatherCurrent conditions & forecastsresolve_namesFree-text address/place -> Place IDresolve_maps_urlsGoogle Maps URL -> Place ID
Module 1 • Concepts • 00:22 – 00:23 (1 min)
Google Developer Expert
Both toolsets use StreamableHTTPConnectionParams; only the header differs.
# --- Maps: API key header ---
MCPToolset(
connection_params=StreamableHTTPConnectionParams(
url="https://mapstools.googleapis.com/mcp",
headers={"X-Goog-Api-Key": maps_api_key},
timeout=30.0, sse_read_timeout=300.0))
# --- BigQuery: OAuth bearer from ADC ---
credentials, project_id = google.auth.default(
scopes=["https://www.googleapis.com/auth/bigquery"])
credentials.refresh(
google.auth.transport.requests.Request())
HEADERS_WITH_OAUTH = {
"Authorization": f"Bearer {credentials.token}",
"x-goog-user-project": project_id}
MCPToolset(
connection_params=StreamableHTTPConnectionParams(
url="https://bigquery.googleapis.com/mcp",
headers=HEADERS_WITH_OAUTH,
timeout=30.0, sse_read_timeout=300.0))
Module 1 • Concepts • 00:23 – 00:25 (2 min)
Google Developer Expert
Watch how one conversation walks down the decision funnel, switching tools
Module 1 • Concepts • 00:25 – 00:26 (1 min)
Google Developer Expert
Trace one request end to end:
🔍 Click diagram to enlarge full-screen
Module 1 • Concepts • 00:26 – 00:27 (1 min)
Google Developer Expert
Module 1 • Concepts • 00:27 – 00:28 (1 min)
Google Developer Expert
The demo uses your personal credentials for speed. Before this pattern ships, layer on:
Module 2 • Lab A: Setup • 00:28 – 00:29 (1 min)
Google Developer Expert
Part A: finish provisioning • Part B: run the agent • Part C: the full journey
Module 2 • Lab A: Setup • 00:29 – 00:31 (2 min)
Google Developer Expert
Confirm you're authenticated and the repo is cloned.
gcloud auth list
gcloud config get project
export PROJECT_ID=$(gcloud config get project)
git clone https://github.com/google/mcp.git
cd mcp/examples/launchmybakery
# Required so ADK can call BigQuery via MCP
gcloud auth application-default login
🔍 Click screenshot to zoom
Module 2 • Lab A: Setup • 00:31 – 00:33 (2 min)
Google Developer Expert
Press → to walk through the provisioning you kicked off at minute 5
Enables APIs: aiplatform, apikeys, mapstools, bigquery — plus the MCP endpoints (gcloud beta services mcp enable).
Creates a Maps API key restricted to mapstools.googleapis.com and writes .env (VERTEXAI flag, project, key).
Creates a Cloud Storage bucket and uploads the 4 CSVs (demographics, prices, sales, foot traffic).
Creates dataset mcp_bakery and 4 tables — each column carrying a description the agent will read.
Module 2 • Lab A: Setup • 00:33 – 00:35 (2 min)
Google Developer Expert
BigQuery console: mcp_bakery dataset with its 4 tables (Click to zoom)
Module 2 • Lab A: Setup • 00:35 – 00:38 (3 min)
Google Developer Expert
Isolate the install, then install ADK with MCP support.
python3 -m venv .venv
source .venv/bin/activate
# The [mcp] extra = MCP client support
pip install "google-adk[mcp]"
# adk web scans the current dir for agents
cd adk_agent/
Module 3 • Lab B: Run It • 00:38 – 00:40 (2 min)
Google Developer Expert
Cloud Shell Editor showing the launchmybakery layout (Click to zoom)
Module 3 • Lab B: Run It • 00:40 – 00:43 (3 min)
Google Developer Expert
Start the dev server, then open it through Web Preview.
adk web --allow_origins \
'regex:https://.*\.cloudshell\.dev'
# Then in Cloud Shell:
# Web Preview (top right)
# → Change port → 8000
# → Change and Preview
🔍 Click screenshot to zoom
Module 3 • Lab B: Run It • 00:43 – 00:46 (3 min)
Google Developer Expert
ADK web: execute_sql finds the top morning-traffic zip (Click to zoom)
Module 3 • Lab B: Run It • 00:46 – 00:49 (3 min)
Google Developer Expert
ADK web: Maps search_places scans 90403 for bakeries (Click to zoom)
Module 3 • Lab B: Run It • 00:49 – 00:52 (3 min)
Google Developer Expert
Three more prompts — predict the tool before you run each (answers in the codelab)
Module 3 • Lab B: Run It • 00:52 – 00:54 (2 min)
Google Developer Expert
# agent.py — edit the instruction, e.g.:
"Position the brand as budget-friendly
and always cite the source table."
# save → adk web reloads → re-ask Q3
# Ask about the weather on opening day
"Weather in 90403 this Saturday?"
→ Maps lookup_weather
# Safety: force read-only SQL
# MCPToolset(tool_filter=['execute_sql_readonly'])
# or an IAM deny on execute_sql
Module 3 • Lab B: Run It • 00:54 – 00:57 (3 min)
Google Developer Expert
Hit a wall? It's almost certainly one of these:
Module 4 • Wrap-Up • 00:57 – 00:59 (2 min)
Google Developer Expert
Stop the server (Ctrl+C), then run cleanup from the repo root.
# Ctrl+C to stop adk web, then:
cd ~/mcp/examples/launchmybakery
chmod +x cleanup/cleanup_env.sh
./cleanup/cleanup_env.sh
# Deletes: mcp_bakery dataset,
# the staging bucket, and the API key.
Module 4 • Wrap-Up • 00:59 – 01:02 (3 min)
Google Developer Expert
Everything today reduces to four moves you can reuse for any agent + any data.
An LLM alone hallucinates business facts. Ground it in your warehouse and live Maps data.
A single ADK LlmAgent + MCP toolsets reasons across BigQuery AND Maps — no glue code.
get_table_info feeds column descriptions to the model. Documented data = smarter agent.
Managed MCP servers bring IAM, audit logs, read-only SQL, and Model Armor. Ship with guardrails.
Module 4 • Wrap-Up • 01:02 – 01:04 (2 min)
Google Developer Expert
Move off adk web: containerize and ship to Cloud Run or Agent Engine, with a service-account identity.
Live now: GCE & GKE. Rolling out: Spanner, AlloyDB, Cloud Run, Developer Knowledge — full list: google/mcp on GitHub.
Point the agent at YOUR dataset: write rich column descriptions, scope the instruction, start with execute_sql_readonly.
You built it: one grounded agent over your data and the real world
Google Developer Expert
Questions & live troubleshooting.
The codelab stays free — take it, fork it, teach it.
Codelab
adk-mcp-bigquery-maps
Connect on LinkedIn
in/rabimba-karanjai
Slides & Runbook
GDE-ML-Artifacts
Appendix • Reference • Reference Slide
Google Developer Expert
export PROJECT_ID=$(gcloud config get project)
git clone https://github.com/google/mcp.git
cd mcp/examples/launchmybakery
gcloud auth application-default login
./setup/setup_env.sh
./setup/setup_bigquery.sh
python3 -m venv .venv && source .venv/bin/activate
pip install "google-adk[mcp]"
cd adk_agent/
adk web --allow_origins \
'regex:https://.*\.cloudshell\.dev'
# later, from the repo root:
cd ~/mcp/examples/launchmybakery
chmod +x cleanup/cleanup_env.sh
./cleanup/cleanup_env.sh