Agent Development Kit (ADK) Documentation

repository·main·Indexed 23 days ago

https://github.com/google/adk-docs

A modular, code-first, and model-agnostic framework for building, evaluating, and deploying AI agents. ADK supports multiple programming languages, including Python, TypeScript, Go, Java, and Kotlin. The documentation provides guides on implementing Agent-to-Agent (A2A) delegation patterns, deploying agents to Cloud Run, integrating with AlloyDB for vector search, and using CLI tools such as adk web, adk run, and adk api_server.

Tokens
407.8K
Snippets
786
Records
1.3K
Agent score
80%

What's inside Agent Development Kit (ADK)

  1. Overview of Agent Development Kit (ADK)

    main
    Agent Development Kit (ADK) is an open-source, code-first toolkit designed for building, evaluating, and deploying sophisticated AI agents. It is a modular framework that is model-agnostic and deployment-agnostic, though it is optimized for Gemini and the Google ecosystem. ADK allows developers to treat agent development like traditional software development, enabling the creation of everything from simple task-based agents to complex multi-agent orchestrations.
  2. Overview of the ADK Framework capabilities

    main

    The Agent Development Kit (ADK) is a framework designed to scale agent development from simple implementations to complex enterprise systems. It supports a progressive development path:

    1. Initial Development: Build agents using prompts and tool calls.
    2. Advanced Orchestration: Scale to multi-agent orchestration and graph-based workflows.
    3. Optimization: Implement performance evaluation.
    4. Enterprise Deployment: Deploy to enterprise services for high scalability, reliability, and throughput.
  3. Overview of ADK Gemini Live API Toolkit

    main

    The ADK Gemini Live API Toolkit enables low-latency, bidirectional voice and video interaction for AI agents by integrating the Gemini Live API.

    Key capabilities include:

    • Natural Voice Conversations: Supports human-like voice interaction, including user interruptions.
    • Multimodal Streaming: Agents can process text, audio, and video inputs and provide both text and audio outputs.
    • Real-time Interaction: Designed for low-latency communication suitable for interactive applications like visual shopping assistants or real-time monitoring tools.
  4. Overview of ADK Evaluation Criteria

    main

    ADK provides several evaluation criteria to assess agent performance across different dimensions such as tool usage, response quality, safety, and task success. Criteria are categorized by whether they require reference-based data, custom rubrics, or an LLM-as-a-judge. Some criteria also support user simulation for multi-turn evaluations.

    CriterionDescriptionReference-BasedRequires RubricsLLM-as-a-JudgeSupports User Simulation
    tool_trajectory_avg_scoreExact match of tool call trajectoryYesNoNoNo
    response_match_scoreROUGE-1 similarity to reference responseYesNoNoNo
    final_response_match_v2LLM-judged semantic match to reference responseYesNoYesNo
    rubric_based_final_response_quality_v1LLM-judged final response quality based on custom rubricsNoYesYesYes
    rubric_based_tool_use_quality_v1LLM-judged tool usage quality based on custom rubricsNoYesYesYes
    rubric_based_multi_turn_trajectory_quality_v1LLM-judged multi-turn trajectory quality based on custom rubricsNoYesYesYes
    hallucinations_v1LLM-judged groundedness of agent response against contextNoNoYesYes
    safety_v1Safety/harmlessness of agent responseNoNoYesYes
    per_turn_user_simulator_quality_v1LLM-judged user simulator qualityNoNoYesYes
    multi_turn_task_success_v1Evaluates if agent achieves goal(s) of conversationNoNoYesYes
    multi_turn_trajectory_quality_v1Evaluates the overall trajectory of the conversationNoNoYesYes
    multi_turn_tool_use_quality_v1Evaluates function calls made during a conversationNoNoYesYes
  5. Overview of Go Snippets Tooling components

    main

    The Go Snippets Tooling manages the lifecycle of Go examples in examples/go/. It consists of:

    • runner.sh: The primary script for building and running snippets.
    • files_to_test.txt: The configuration file containing the list of snippets to be validated.
    • check_go_snippets.sh: A PR check script that validates that all .go files in the repository are registered in files_to_test.txt.
    • runner_test.sh: Unit tests for the runner.sh script.
  6. Overview of BigQuery Agent Analytics Plugin

    main

    The BigQuery Agent Analytics (BQAA) plugin for ADK provides in-depth agent behavior analysis by capturing and logging operational events directly into Google BigQuery. It uses the BigQuery Storage Write API for high-throughput, asynchronous logging, making it suitable for high-volume debugging and real-time monitoring.

    Key capabilities include:

    • Auto Schema Upgrade: Safely adds new columns to existing tables.
    • Tool Provenance: Tracks the origin of tool calls (e.g., LOCAL, MCP, SUB_AGENT, A2A, TRANSFER_AGENT, TRANSFER_A2A).
    • HITL Event Tracing: Dedicated tracing for human-in-the-loop interactions (credential requests, confirmations, etc.).
    • ADK 2.0 Support: Traces multi-agent workflows including AGENT_TRANSFER, AGENT_STATE_CHECKPOINT, EVENT_COMPACTION, and TOOL_PAUSED.
    • Automatic View Creation: Generates flat, query-friendly BigQuery views for different event types.
    • Distributed Tracing: Supports OpenTelemetry-style trace_id and span_id to allow joining BigQuery rows with Cloud Trace traces.
  7. Introduction to ADK with Agent2Agent (A2A) Protocol

    main

    The Agent Development Kit (ADK) supports the Agent2Agent (A2A) Protocol, enabling the construction of complex multi-agent systems. Using A2A, agents can collaborate, communicate, and interact securely and efficiently across different environments.

    ADK's A2A implementation supports the following languages:

    • Python
    • Go
    • Java (Experimental)

    To build a multi-agent system, you can implement two primary patterns:

    1. Exposing an Agent: Making your agent available so that other agents can discover and use it via the A2A protocol.
    2. Consuming an Agent: Enabling your agent to call and utilize the capabilities of a remote agent using the A2A protocol.
  8. Access the Agent Development Kit (ADK) API references

    main

    The Agent Development Kit (ADK) provides language-specific and interface-specific API documentation. Use the following links to access the full technical specifications for your preferred development environment or interface:

    Language-Specific APIs

    Interfaces and Configuration

    • CLI: Documentation for all valid command-line options and subcommands. View CLI Docs
    • Agent Config (YAML): Full syntax reference for configuring ADK using YAML files. View Agent Config reference
    • REST API: Details on endpoints, request/response formats, and the ADK web server. View REST API Docs
  9. Grounding agents with data in ADK

    main

    Grounding is the process of connecting AI agents to external information sources to ensure responses are accurate, current, and verifiable. Using grounding helps reduce hallucinations by providing answers backed by reliable sources.

    ADK provides three primary grounding approaches:

    1. Google Search Grounding: Connects agents to real-time web information (e.g., news, weather, or recent facts) to supplement the model's training data.
    2. Grounding with Search: Connects agents to private enterprise data and indexed organizational documents for queries requiring proprietary information.
    3. Agentic RAG: Enables agents to reason about search strategies, dynamically constructing queries and filters using systems like Agent Retrieval or Knowledge Engine.
  10. Build graph-based agent workflows

    main

    ADK allows you to define agent logic as a graph of execution nodes and edges. This approach provides more control, predictability, and reliability than purely prompt-based agents by explicitly mapping out routing logic in code. Nodes can encapsulate code functions, AI-powered agents, Tools, or human input tasks.

    Supported in:

    • Python v2.0.0
    • Go v2.0.0
  11. Key capabilities of the ADK ecosystem

    main

    Beyond basic agent construction, ADK provides a full development lifecycle suite:

    • Integrated Developer Tooling: Includes a CLI and a Developer UI for running agents, inspecting execution steps (events and state changes), debugging, and visualizing agent definitions.
    • Native Streaming Support: Supports bidirectional streaming (text and audio) via the ADK Gemini Live API Toolkit, integrating with the Gemini Live API or Agent Platform.
    • Built-in Agent Evaluation: Tools to create multi-turn evaluation datasets and run evaluations locally via CLI or the Dev UI to measure agent quality.
    • Broad LLM Support: While optimized for Gemini, the BaseLlm interface allows for integration with various LLMs, including open-source or fine-tuned models.
    • Artifact Management: Uses ArtifactService and context methods to allow agents to manage versioned files like images or documents during execution.
  12. Use Agents CLI to build ADK agents

    main
    The Agents CLI is a developer tool designed to accelerate the lifecycle of Agent Development Kit (ADK) agents. It allows you to move from an initial idea to a fully coded agent by providing workflows for scaffolding, building, testing, evaluating, and deploying agents within your preferred AI-enabled developer environment.