adk-python README

The project's README from github.com/google/adk-python. As one markdown file: README.md.

Agent Development Kit (ADK) 2.0

License PyPI version Python versions PyPI downloads Continuous Integration Docs r/agentdevelopmentkit Ask Code Wiki

An open-source, code-first Python framework for building, evaluating, and deploying sophisticated AI agents with flexibility and control.

Important Links: Docs, Samples & ADK Web.

ADK in other languages: ADK Java, ADK Kotlin, ADK Go & ADK Typescript.

Agent Development Kit (ADK) is a flexible and modular framework that applies software development principles to AI agent creation. It is designed to simplify building, deploying, and orchestrating agent workflows, from simple tasks to complex systems. While optimized for Gemini, ADK is model-agnostic, deployment-agnostic, and compatible with other frameworks.


⚠️ BREAKING CHANGES FROM 1.x

This release includes breaking changes to the agent API, event model, and session schema. Sessions generated by ADK 2.0 are readable by ADK 1.28+ (extra fields will be ignored), but are incompatible with older 1.x versions.


✨ Key Features

🚀 Installation

You can install the latest stable version of ADK using pip:

pip install google-adk

Requirements: Python 3.10+.

For transitive dependency protection, we recommend to install with our companion constraints files (for python 3.10 to 3.14).

Choose the constraints file matching your Python version:

# For example, for Python 3.10
curl -o constraints-3.10.txt https://raw.githubusercontent.com/google/adk-python/main/constraints-3.10.txt
pip install google-adk -c constraints-3.10.txt
rm constraints-3.10.txt

To install optional integrations, you can use the following command:

pip install "google-adk[extensions]"

The release cadence is roughly bi-weekly.

Development Version

Bug fixes and new features are merged into the main branch on GitHub first. If you need access to changes that haven't been included in an official PyPI release yet, you can install directly from the main branch:

pip install git+https://github.com/google/adk-python.git@main

Note: The development version is built directly from the latest code commits. While it includes the newest fixes and features, it may also contain experimental changes or bugs not present in the stable release. Use it primarily for testing upcoming changes or accessing critical fixes before they are officially released.

Quick Start

Beginner Note: ADK applications are built using two main classes: Agent (defines an AI's instructions, tools, and behavior) and Workflow (orchestrates agents and tasks in a graph-based flow).

Agent

from google.adk import Agent

root_agent = Agent(
    name="greeting_agent",
    model="gemini-2.5-flash",
    instruction="You are a helpful assistant. Greet the user warmly.",
)

Workflow

from google.adk import Agent, Workflow

generate_fruit_agent = Agent(
    name="generate_fruit_agent",
    instruction="Return the name of a random fruit. Return only the name.",
)

generate_benefit_agent = Agent(
    name="generate_benefit_agent",
    instruction="Tell me a health benefit about the specified fruit.",
)

root_agent = Workflow(
    name="root_agent",
    edges=[("START", generate_fruit_agent, generate_benefit_agent)],
)

Run Locally

# Interactive CLI
adk run path/to/my_agent

# Web UI (supports multi-agent directories or pointing directly to a single agent folder)
adk web path/to/agents_dir

Development UI

A built-in development UI to help you test, evaluate, debug, and showcase your agent(s).

ADK Web UI

Watch on YouTube

Evaluate Agents

adk eval \
    samples_for_testing/hello_world \
    samples_for_testing/hello_world/hello_world_eval_set_001.evalset.json

🚀 Deployment Options

Deploying the Agent Locally with Docker Container:

adk deploy docker --with_ui <agent-folder>

Deploying the Agent in Google Cloud (Cloud Run)

adk deploy cloud_run --with_ui <agent-folder>

You may set the following environment variables in adk command, or in a .env file instead.

adk deploy cloud_run --with_ui --env GOOGLE_GENAI_USE_ENTERPRISE=1 <agent-folder>

📚 Documentation

🤝 Contributing

We welcome contributions from the community! Whether it's bug reports, feature requests, documentation improvements, or code contributions, please see our:

Community Repo

We have the adk-python-community repo that is home to a growing ecosystem of community-contributed tools, third-party service integrations, and deployment scripts that extend the core capabilities of the ADK.

Vibe Coding

If you want to develop an agent via vibe coding the llms.txt and the llms-full.txt can be used as context to an LLM. While the former one is a summarized one and the latter one has the full information in case your LLM has a big enough context window.

Community Events

📄 License

This project is licensed under the Apache 2.0 License — see the LICENSE file for details.


Happy Agent Building!

adk-python (google/adk-python)

Searching Database…

这是什么?Agent Development Kit(ADK)是谷歌开源的、代码优先的 Python 框架,用于构建、评估和部署复杂的 AI 智能体——从简单任务到复杂的多智能体系统都可以胜任。
它是框架还是库?用它开发是什么样子的?它是一个代码优先的框架:你直接用 Python 定义智能体逻辑、工具和编排。应用由两个主要的类组装而成——Agent(指令、工具、行为)和 Workflow(基于图的智能体和任务编排)。
怎么安装并运行起来?用 pip 安装稳定版即可——需要 Python 3.10+,并且有针对 3.10–3.14 的配套约束文件来锁定传递依赖。未发布的修复版本可以直接从 main 分支安装。
我是不是只能用 Gemini,还是也能接入其他模型?没有锁定:ADK 针对 Gemini 做了优化,但与模型和部署方式无关,也兼容其他框架,所以你的智能体不会被绑定在某一家服务商上。
开始之前,版本方面有什么坑需要注意吗?有——2.0 版本对 agent API、事件模型和 session 结构做了不兼容的改动。2.0 写入的 session 可以被 ADK 1.28+ 读取,但与更早的 1.x 版本不兼容。
智能体开箱即用可以调用哪些工具?工具生态很丰富:有预置工具、你自己写的 Python 函数、由 OpenAPI 规范生成的工具,以及 MCP 工具,另外还与谷歌生态深度集成。现有工具也可以集成进来。
工作流引擎支持真正的控制流吗?支持——基于图的运行时支持路由、扇出/扇入、循环、重试、状态管理、动态节点、人工介入步骤和嵌套工作流,可以在智能体步骤之外实现确定性的执行路径。
我可以要求在工具调用执行前先由人工批准吗?可以。工具确认流程(human-in-the-loop,人工介入)通过明确的确认和自定义输入来保护工具的执行,敏感操作会等待人工批准后才运行。
每个智能体都必须用 Python 写代码吗,有没有无代码的方式?有 Agent Config 可以在不用写代码的情况下构建智能体,但 ADK 的理念是代码优先的 Python——用代码定义逻辑能带来灵活性、可测试性和版本管理。
Creator
google
Size
90.1 MB
Stars
21.9K
Age
1y
Commits · 90 Days