GitHub - google/adk-python: An open-source, code-first Python toolkit for building, evaluating, and deploying sophisticated AI agents with flexibility and control.
Key Points
- 1The Agent Development Kit (ADK) is an open-source, code-first Python framework for building, evaluating, and deploying sophisticated AI agents by applying software development principles.
- 2It offers a rich tool ecosystem, supports modular multi-agent systems, and enables code-first logic definition, alongside features like tool confirmation and a built-in development UI.
- 3ADK is designed to be model and deployment-agnostic, though optimized for Gemini, facilitating flexible orchestration and scalable deployment on platforms like Cloud Run or Vertex AI.
The Google Agent Development Kit (ADK) for Python is an open-source, code-first framework designed for building, evaluating, and deploying sophisticated AI agents with emphasis on flexibility and control by applying software development principles. While optimized for Gemini, ADK is model-agnostic, deployment-agnostic, and compatible with other frameworks.
The core methodology of ADK centers on Code-First Development, allowing definition of agent logic, tools, and orchestration directly in Python for enhanced flexibility, testability, and versioning. Alternatively, the "Agent Config" feature facilitates agent creation without explicit code.
Key technical features and methodologies include:
- Agent Definition and Composition:
- Single Agent: Agents are defined as instances of
Agent(orLlmAgent/BaseAgent), configured with parameters such asname,model(e.g., "gemini-2.5-flash"),instruction,description, and a list oftools. For instance, illustrates a basic agent with web search capabilities. - Modular Multi-Agent Systems: ADK supports designing scalable applications by composing multiple specialized agents into flexible hierarchies. A
coordinatoragent (e.g., ) can manage and orchestratesub_agents(e.g.,greeter,task_executor) to guide their collaborative work towards accomplishing complex tasks. This allows for distributed intelligence and specialized responsibilities within an agent system.
- Single Agent: Agents are defined as instances of
- Rich Tool Ecosystem: Agents gain diverse capabilities through integration with pre-built tools (like
google_search), custom functions, OpenAPI specifications, and MCP tools, ensuring tight integration with the Google ecosystem. A "Tool Confirmation" flow introduces a Human-in-the-Loop (HITL) mechanism, requiring explicit confirmation and custom input before tool execution. - Deployment Flexibility: Agents can be easily containerized and deployed on platforms like Google Cloud Run or scaled seamlessly using Vertex AI Agent Engine.
- Evaluation and Debugging: ADK includes a built-in development UI for interactive testing, evaluation, and debugging of agents. Additionally, a command-line utility (
adk eval) supports programmatic evaluation against predefined datasets (e.g.,adk eval samples_for_testing/hello_world samples_for_testing/hello_world/hello_world_eval_set_001.evalset.json). - Agent2Agent (A2A) Protocol Integration: For remote agent-to-agent communication, ADK integrates with the A2A protocol, enabling distributed agent interactions.
- Recent Enhancements:
- Custom Service Registration: A service registry allows generic registration of custom service implementations for use in FastAPI servers.
- Rewind: Provides the ability to revert a session to a state prior to a specific invocation.
- New CodeExecutor: Introduces
AgentEngineSandboxCodeExecutorfor executing agent-generated code using the Vertex AI Code Execution Sandbox API.
Installation is primarily via pip install google-adk for stable releases, with a development version available from the GitHub main branch for early access to features and fixes. Contributions are welcomed following detailed guidelines, and the adk-python-community repository serves as a hub for community-contributed tools and integrations.