Skip to content

💠 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

MetricDetails
Tool NameGoogle ADK (Agent Development Kit)
CategoryEnterprise Agentic Orchestration Framework
PurposeBuilding production-grade, lightweight, and tool-equipped agent topologies natively optimized for Google Gemini models.
DeveloperGoogle Cloud / DeepMind
Backend Modelsgemini-2.0-flash, gemini-2.0-pro, Vertex AI endpoints
Core LanguagesPython

🛠️ Capabilities

  1. Native Gemini Tuning: Seamless, low-latency integration with Gemini's native function calling, system instructions, and JSON schemas.
  2. Role-Based Agent Instantiation: Simple, lightweight agent structures mapping system prompts, active tools, and LLM backends.
  3. Dynamic Function Tooling: Easily convert Python functions with standard type hints and docstrings into active toolsets.
  4. 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:

FrameworkRouting ModelState ManagementBest Use Case
Google ADKRouter-directed / SequentialLightweight local contextProduction Vertex AI deployments, enterprise Gemini tasks
CrewAIRole-playing / SequentialIn-memory shared memory poolsQuick prototyping of collaborative human-specialist teams
LangGraphGraph State MachinePersistent Database CheckpointersComplex 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-adk

Set 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:

  1. Evaluator/Critic Feedback Loop: Add a third Evaluator agent that intercepts Scribe outputs, runs validation checks, and returns suggestions until quality conditions are met.
  2. Vertex AI Vector Search Integration: Create a tool that queries Google Cloud Vertex AI Vector Search and injects retrieved context directly into the Architect prompt context.