Appearance
💠 Google ADK (Agent Development Kit)
Google ADK (Agent Development Kit) is a production-grade, enterprise agentic framework designed by Google. It facilitates building, orchestrating, and scaling multi-agent architectures leveraging Vertex AI and Gemini models.
For developer assistant tools, see the [Google Antigravity Reference Guide](./Google Antigravity.md).
📊 Tool Datasheet
| Metric | Details |
|---|---|
| Tool Name | Google ADK (Agent Development Kit) |
| Category | Enterprise Agentic Orchestration Framework |
| Purpose | Building production-grade, lightweight, and tool-equipped agent topologies natively optimized for Google Gemini models. |
| Developer | Google Cloud / DeepMind |
| Backend Models | gemini-2.0-flash, gemini-2.0-pro, Vertex AI endpoints |
| Core Languages | Python |
🛠️ Capabilities
- Native Gemini Tuning: Seamless, low-latency integration with Gemini's native function calling, system instructions, and JSON schemas.
- Role-Based Agent Instantiation: Simple, lightweight agent structures mapping system prompts, active tools, and LLM backends.
- Dynamic Function Tooling: Easily convert Python functions with standard type hints and docstrings into active toolsets.
- Orchestrator-Worker Topologies: Standard patterns for nesting routers (Architects) that decompose tasks and dispatch them to worker agents (Scribes, Deployers).
🆚 Framework Comparisons
To choose the right tool for your agentic codebase, consider these architectural trade-offs:
| Framework | Routing Model | State Management | Best Use Case |
|---|---|---|---|
| Google ADK | Router-directed / Sequential | Lightweight local context | Production Vertex AI deployments, enterprise Gemini tasks |
| CrewAI | Role-playing / Sequential | In-memory shared memory pools | Quick prototyping of collaborative human-specialist teams |
| LangGraph | Graph State Machine | Persistent Database Checkpointers | Complex cyclical pipelines, human-in-the-loop approvals |
🧭 Step-by-Step Tutorial & Setup
This tutorial guides you through installing the Google ADK, defining a primary architect router, and routing a task to a writer agent.
1. Environment Setup
Install the Google ADK package and setup credentials:
bash
conda activate ai_dev
uv pip install google-adkSet up your Google Cloud authentication:
bash
export GEMINI_API_KEY="your_gemini_key_here"2. Write the Orchestrator Script
Create a Python file named adk_orchestrator.py: Path: ~/AI_BOOTCAMP/labs/adk_agent/adk_orchestrator.py
python
from google.adk.agents import Agent
# 1. Define custom tools for the Architect
def generate_sections(topic: str) -> list[str]:
"""Generates outline section headers for a topic.
Args:
topic: The title or topic of the report.
"""
return ["Introduction", f"Current state of {topic}", "Conclusions"]
# 2. Instantiate the Architect Agent
architect = Agent(
name="Architect",
model="gemini-2.0-flash",
instruction="""You are the lead architect agent.
Your role is to:
1. Parse the topic.
2. Generate an outline using the generate_sections tool.
3. Delegate the compilation steps to worker agents.""",
tools=[generate_sections]
)
# 3. Instantiate the Scribe Agent (Worker)
scribe = Agent(
name="Scribe",
model="gemini-2.0-flash",
instruction="""You are a technical content editor.
Your role is to write clean, formatted markdown copy for the sections generated by the Architect."""
)
if __name__ == "__main__":
print("--- Google ADK Agent Loop Active ---")
# Architect processes prompt using tools
response = architect.chat("Create an outline for a RAG evaluation guide")
print(response)💡 Sample Ideation to Test
Try these ideas to expand your Google ADK integration:
- Evaluator/Critic Feedback Loop: Add a third
Evaluatoragent that interceptsScribeoutputs, runs validation checks, and returns suggestions until quality conditions are met. - Vertex AI Vector Search Integration: Create a tool that queries Google Cloud Vertex AI Vector Search and injects retrieved context directly into the
Architectprompt context.