Google's ADK: Code-First Python AI Agent Toolkit

Build, evaluate, and deploy modular AI agents in Python using Google's ADK—pip install google-adk for code-first logic, rich tools, multi-agent hierarchies, and deployment to Cloud Run or Vertex AI.

Define Agents and Tools Directly in Code

ADK uses a code-first approach to create testable, versionable agents. Start with a single agent by specifying name, model (e.g., gemini-2.5-flash), instructions, description, and tools like google_search:

from google.adk.agents import Agent
from google.adk.tools import google_search

root_agent = Agent(
    name="search_assistant",
    model="gemini-2.5-flash",
    instruction="You are a helpful assistant. Answer user questions using Google Search when needed.",
    description="An assistant that can search the web.",
    tools=[google_search]
)

This integrates pre-built tools, custom functions, OpenAPI specs, or MCP tools, optimized for Google ecosystem but model-agnostic. Add tool confirmation (HITL) to require explicit user approval before execution, preventing unintended actions.

Build Scalable Multi-Agent Hierarchies

Compose specialized agents into hierarchies for complex workflows. Define root and sub-agents with shared or unique tools, enabling orchestration where agents delegate tasks. Supports Agent Config for no-code agent building alongside code definitions. Recent updates include rewind to replay sessions pre-invocation, custom service registration for FastAPI servers, and AgentEngineSandboxCodeExecutor for safe code execution via Vertex AI sandbox.

Install, Evaluate, and Deploy Seamlessly

Install stable via pip install google-adk (bi-weekly releases) or dev version from git main for latest fixes. Evaluate agents with built-in metrics; deploy containerized to Cloud Run or scale on Vertex AI Agent Engine. Integrates A2A protocol for remote agent communication. Use 18.9k-starred repo's samples for patterns like skill activation via environment tools or BigQuery integration (now stable). Trade-off: Dev version risks bugs but accesses unshipped features like Parameter Manager for secret handling.

Summarized by x-ai/grok-4.1-fast via openrouter

9732 input / 1740 output tokens in 12684ms

© 2026 Edge