Advent of Agents - Days 1-4 + Day 8: Zero to Production AI Agents
Source: Google Cloud Advent of Agents Season 1 β December 2025 (Winter Holiday Edition)
25 days. Zero to Production-Ready AI Agents on Google Cloud. Every day < 5 min to try.
Table of Contents
- Day 1: Launch Initiative
- Day 2: Hello World with YAML
- Day 3: Gemini 3 + ADK
- Day 4: Source-Based Deployment
- Day 8: Effective Context Management with ADK Layers
Day 1: Launch Initiative
Original: adventofagents.com/2025/12/01 | Summary: 25 days. Zero to Production-Ready AI Agents on Google Cloud.
Advent of Agents 2025 starts NOW!
Every day until Christmas:
- β‘ One feature, < 5 min to try
- π» Copy-paste commands that actually work
- π Links to docs
From quickstart agents to multi-agent orchestration. From local dev to production deployment.
What we are covering:
- Gemini 3: Context engineering, Computer Use, Live API, and advanced patterns
- Google ADK: The Agent Development Kit (Python)
- Vertex AI Agent Engine: Deploy an Agent in minutes
- The Agent Starter Pack: E2E production-ready templates
π Recommended Reading: Introduction to Agents whitepaper β released as part of the 5 Days of Agents with Kaggle.
Day 2: Hello World with YAML
Original: adventofagents.com/2025/12/02 | Summary: Build your first AI agent with Gemini 3 in under 5 minutes without writing a single line of code.
- 4 lines of text = 1 working AI agent.
- No coding. Just YAML.
- A working AI agent powered by Gemini 3
- Google Search integration
What you get with 4 lines of YAML:
- A working AI agent powered by Gemini 3
- Google Search integration
- Ready to deploy
- Zero programming knowledge needed
Once you have your YAML agent, you can add:
- Built-in tools (
google_search,code_execution) - Custom Python tools (when you're ready)
- Sub-agents for complex workflows
- Multi-agent orchestration
Code & Commands
uvx --from google-adk adk create --type=config my_agent
uvx --from google-adk adk web my_agent/
Resources
- ADK Config Agents Documentation
- Tutorial: AI Agent with Google Search (YAML) (~2 mins)
- Tutorial: Multi-agent app with MCP (YAML)
- Third Party MCP Tools in ADK
Day 3: Gemini 3 + ADK
Original: adventofagents.com/2025/12/03 | Summary: Build a powerful AI Agent using Gemini 3 and ADK with native support for Google Search grounding, computer use, and real-time streaming.
Gemini 3 is Google's most intelligent model yet. In just a few minutes, you can build a powerful AI Agent using Gemini 3 and ADK with native, day-one support for its most advanced capabilities.
What you get with ADK and Gemini 3:
- Google Search grounding: Native access to real-time web data
- Computer use: Agents that navigate and interact with UIs
- Live API: Real-time streaming for voice and video agents
- Native observability: Full visibility into Gemini calls, tool use, and agent reasoning
1. Setup the project
One liner with Agent Starter Pack:
uvx agent-starter-pack create -y --api-key <YOUR_GEMINI_API_KEY> my_agent
or Using ADK CLI:
uv init
uv add google-adk
uv add google-genai
export GOOGLE_API_KEY="YOUR_API_KEY"
source .venv/bin/activate
adk create my_agent
2. Download sample and run locally
curl 'https://raw.githubusercontent.com/GoogleCloudPlatform/devrel-demos/refs/heads/main/ai-ml/agent-labs/gemini-3-pro-agent-demo/my_agent/agent.py' > my_agent/agent.py
adk web
Minimal agent.py from the demo:
from google.adk.agents import Agent
from google.adk.tools import google_search
root_agent = Agent(
name="search_agent",
model="gemini-3-pro-preview",
description="A helpful assistant that can search Google.",
instruction="""You are a helpful assistant with access to Google Search.
If the user asks a question that requires current information or facts, use the 'google_search' tool.
Always cite your sources implicitly by providing the answer clearly based on the search results.
""",
tools=[google_search]
)
Resources
- Build an AI Agent with Gemini 3 (Video)
- Gemini 3 Agent Demo (GitHub)
- ADK Google Search Tool Docs
- Gemini 3 Announcement
Day 4: Source-Based Deployment
Original: adventofagents.com/2025/12/04 | Summary: Deploy your agents directly from source code with Agent Engine - no more serialization headaches.
Agent Engine now supports source-based deployment. Your source code deploys directly to production, eliminating common deployment friction.
No more dealing with:
- Pickle errors
- Serialization nightmares
- Module path headaches
What runs locally now runs in production.
Get started with Agent Starter Pack:
For a new project:
uvx agent-starter-pack create my-agent -a adk_base -d agent_engine
cd my-agent && make deploy
Already have an ADK agent? Use enhance:
uvx agent-starter-pack enhance --d agent_engine
Then trigger the deployment with:
make deploy
Resources
Day 8: Effective Context Management with ADK Layers
Original: adventofagents.com/2025/12/08 | Summary: ADK Context design thesis: context as a compiled view
Stop stuffing spaghetti context into your agent's LLM.
The "append-everything" strategy is a one-way ticket to latency spirals and "lost in the middle" hallucinations. Google ADK shifts the paradigm by treating context as a compiled view (not a giant string).
Instead of shoveling raw history into the window, ADK uses a pipeline of processors to dynamically filter, compact, and format a clean "working context" derived from a structured, durable session state.
Real engineering requires granular control, not just a bigger context window.
ADK's tiered architecture separates storage from presentation, allowing you to externalize massive files as Artifacts (using a handle pattern) and retrieve long-term data via searchable Memory only when strictly necessary.
ADK operationalizes Context Caching by enforcing a clear separation between "Static Instructions" (invariant policies and schemas) and "Turn Instructions" (dynamic, controller-owned steering).
As described in Day 3 of our Kaggle 5 Day intensive course, Agents are largely "context management". This is how you do it.
Code: Static Context Policy + Context Caching
# An Example of Static Context Policy
from google.adk.apps import App
from google.adk.agents import Agent
from google.adk.agents.context_cache_config import ContextCacheConfig
STATIC_POLICY_HEADER = """You are a strict policy assistant for internal compliance Q&A.
Follow this exact JSON schema in every response:
{"answer": str, "citations": [str], "confidence": float}
Safety:
- Never provide medical or legal advice; refuse with a brief explanation.
- Never invent policy numbers or sections; ask for the missing reference.
Style:
- Use short sentences.
- Prefer active voice.
- If uncertain, say so and request the missing input.
Tools:
- search: use for public web facts.
- bq: use for internal policy tables (read-only).
"""
agent = Agent(
name="policy_agent",
static_instruction=STATIC_POLICY_HEADER,
instruction="Default: be concise and include at most two citations."
)
app = App(
name="policy_qa_app",
context_cache_config=ContextCacheConfig(
ttl_seconds=3600, # cache the header for 1 hour
cache_intervals=5, # force a refresh every 5 requests (guardrail)
min_tokens=1000 # only cache if header is βworth itβ
),
root_agent=agent
)
Code: Runtime controller generating turn instructions
from dataclasses import dataclass
from typing import Optional, Tuple
@dataclass
class SteeringInputs:
goal: str
style: str = "concise"
max_cites: int = 2
tenant_hint: Optional[str] = None
corrective: Optional[str] = None
confidence_range: Tuple[float, float] = (0.6, 0.9)
def build_turn_instruction(s: SteeringInputs) -> str:
parts = [
f"Goal: {s.goal}",
f"Style: {s.style}",
(
"Constraints: "
f"include at most {s.max_cites} citations; "
"refuse medical/legal advice; "
"if info is missing, ask one targeted question; "
f"return 'confidence' between {s.confidence_range[0]} and {s.confidence_range[1]}."
)
]
if s.tenant_hint:
parts.append(f"Tenant: {s.tenant_hint}")
if s.corrective:
parts.append(f"Correction: {s.corrective}")
return "\n".join(parts)
def chat(session_id: str, user_message: str, ui_style: str | None = None):
intent = route_intent(user_message)
goal = INTENT_TO_GOAL.get(intent, f"Answer the user: {user_message[:120]}")
style = ui_style or get_flag(session_id, "style", default="concise")
max_cites = get_flag(session_id, "max_citations", default=2)
tenant_hint = get_tenant_hint(session_id)
corrective = get_last_validation_error(session_id)
turn_instruction = build_turn_instruction(
SteeringInputs(
goal=goal,
style=style,
max_cites=max_cites,
tenant_hint=tenant_hint,
corrective=(f"Your last reply failed validation: {corrective}. Fix it this turn." if corrective else None)
)
)
agent.instruction = turn_instruction
response = agent.run(user_message=user_message)
validate_and_record(session_id, response)
return response
Resources
- Architecting efficient context-aware multi-agent framework for production
- ADK Context Documentation
- The ADK Prompting Pattern: Static vs. Turn Instructions
- Context Engineering: Sessions & Memory | Kaggle
- 8-min NotebookLM summary of ADK context management
What's Next?
This combines Days 1-4 + 8. Full Season 1 is 25 days: observability, MCP, Live API, A2A, A2UI, Gemini Enterprise, security, durable execution with Restate, and finale.
Follow for the rest, and bookmark adventofagents.com for the permanent archive.

Top comments (0)