Agent 开发框架

google/adk-python|代码优先的Python AI Agent开发框架

google/adk-python

Google开源的代码优先Python框架,用于构建、评估、编排并部署AI Agent与工作流。

获取与使用

需要部署

按官方资料自行安装或部署

使用难度待核验
国内可用性待核验

2026-11-09 更新 · 本站尚未实测

项目介绍

Agent 开发框架 · 2026-11-09 更新 · 本站尚未实测

Agent Development Kit(ADK)是 Google 开源的、代码优先(code-first)的 Python 框架,README 将其定位为“building, evaluating, and deploying sophisticated AI agents with flexibility and control”。它把软件开发原则引入 Agent 创建,专注于简化 Agent 工作流的构建、部署与编排,从简单任务覆盖到复杂系统。

需要说明的是,ADK 是开发框架,而不是现成可导入的 Agent 或工作流文件。使用者需要编写 Python 代码,定义 Agent 与 Workflow,再通过命令行工具在本地运行或部署。README 提到 ADK 针对 Gemini 做了优化,但同时声明自身 model-agnostic、deployment-agnostic,并与其他框架兼容。

核心能力

点击能力名称查看输入、输出和原文依据。

  • 工作流运行时(Workflow Runtime):基于图的执行引擎,可组合确定性的 Agent 应用流程,支持路由、扇出/汇聚、循环、重试、状态管理、动态节点、人在环(human-in-the-loop)与嵌套工作流。
  • Task API:结构化的 Agent 间任务委派,支持多轮任务模式、单轮受控输出、混合委派模式、人在环,以及将任务 Agent 作为工作流节点。
  • 模块化多 Agent 系统:将多个专用 Agent 组合成可扩展的层级结构。
  • 丰富工具生态:可使用预置工具、自定义函数、OpenAPI 规范、MCP 工具,或接入已有工具。
  • 代码优先开发:在 Python 中直接定义 Agent 逻辑、工具与编排,便于测试和版本管理。
  • Agent Config:README 提到可在不写代码的情况下构建 Agent,具体用法需参考官方文档。
  • 工具确认(HITL):可用显式确认与自定义输入来约束工具执行。
  • 随处部署:README 称可容器化部署到 Cloud Run,或通过 Vertex AI Agent Engine 扩展。

实际应用场景

适用场景

适合需要用代码精细控制 Agent 行为的开发者与小团队,例如:把多个专职 Agent 组织成层级系统;用图结构编排带分支、循环、重试的确定性流程;为 Agent 接入函数、OpenAPI 或 MCP 工具;在关键工具调用前加入人工确认;以及需要在本地调试、评估后再部署的工程化项目。

如果只需要开箱即用的成品助手、或希望以零代码方式配置,本项目不一定匹配,需评估 Agent Config 能否满足。

安装与接入

前置要求:Python 3.11+(README 明确)。稳定版推荐使用 pip 安装:

pip install google-adk

README 还给出可选的依赖约束文件用法(以 Python 3.11 为例,先下载 constraints 文件再安装),以及可选集成包:

pip install "google-adk[extensions]"

如需未发布到 PyPI 的最新提交,可安装开发版:

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

README 提示开发版可能包含实验性改动或缺陷,主要用于测试新变化。

本地运行使用 adk 命令,README 示例为 adk run path/to/my_agent(交互式 CLI)和 adk web path/to/agents_dir(开发网页 UI)。评估可通过 adk eval 运行仓库自带评估样例。部署可用 adk deploy docker --with_ui <agent-folder> 或 adk deploy cloud_run --with_ui <agent-folder>。这些命令需要按 README 原文参数填写,具体环境变量(如示例中的 GOOGLE_GENAI_USE_ENTERPRISE)含义请以官方文档为准。

README 的快速开始示例使用模型 gemini-3.5-flash;该模型名称、可用性及计费方式待向 Google 官方核验。MCP 配置与服务端配置文件未在采集资料中获取,接入细节待核验。

使用条件与限制

是否需要部署
需自行准备运行环境,具体要求见正文
是否需要注册
账号和认证要求见正文;未明确说明的项目仍待核验
是否需要 API Key
待核验
费用与额度
费用边界见正文,项目许可不代表模型或托管服务免费
所需权限
待核验
许可证与服务条款
待核验

权限费用与限制

  • 仓库代码以 Apache 2.0 许可证开源,但开源不代表托管服务、第三方模型或云部署免费。
  • 部署到 Cloud Run 或 Vertex AI Agent Engine 属于 Google Cloud 服务,费用、配额、权限与地域需向 Google Cloud 官方核验。
  • 模型调用(如 Gemini)需相应 API Key 或云项目授权,费用与可用地区需向官方核验;README 未列出完整的模型支持清单,是否支持国内模型待核验。
  • README 声称 model-agnostic、deployment-agnostic,但未给出具体的第三方模型接入步骤与适配验证结果。
  • 工具确认(HITL)可降低误执行风险,但不构成对 Agent 行为的完整安全保证。
  • 本次采集未获取到仓库归档或停止维护的声明;项目状态以仓库页面为准。

国内使用情况

网友核验 用户经验分享

与站长实测独立,不代表官方认证或本站已实测。

我要核验
0 位参与者0 份有效分项记录

最近核验:暂无有效核验。参与人数按当前项目有效身份去重;不同核验项分别统计,不合并成用户总结果。仅统计审核通过且未过期的记录。

分项统计、有效期与样本量
核验项目有效人数成功 / 部分 / 失败 / 无法判断成功率最近核验 / 有效期
官方网站访问00 / 0 / 0 / 0样本不足暂无 / 7 天
GitHub 仓库访问00 / 0 / 0 / 0样本不足暂无 / 7 天
安装与运行00 / 0 / 0 / 0样本不足暂无 / 30 天
官方服务国内连接 / MCP 连接00 / 0 / 0 / 0样本不足暂无 / 30 天
国内网络情况00 / 0 / 0 / 0样本不足暂无 / 7 天
国内模型兼容性00 / 0 / 0 / 0样本不足暂无 / 30 天
自定义 API00 / 0 / 0 / 0样本不足暂无 / 30 天
海外服务依赖
00 / 0 / 0 / 0样本不足暂无 / 30 天
海外账号要求
00 / 0 / 0 / 0样本不足暂无 / 30 天
中文界面
00 / 0 / 0 / 0样本不足暂无 / 30 天
客户端兼容性00 / 0 / 0 / 0样本不足暂无 / 30 天
账号及费用信息
00 / 0 / 0 / 0样本不足暂无 / 30 天

成功率 = 成功 ÷(成功 + 部分成功 + 失败);无法判断不计入分母。至少 5 份可判断结果才显示成功率。账号、费用、海外依赖与语言等事实项,成功表示核查结论与资料吻合,具体观察另行统计;不表示免费或没有海外依赖。不同网络、客户端和版本的结果不能直接等同。

最近有效核验

暂无审核通过且未过期的网友核验。欢迎提交真实使用记录。

查看全部有效核验 →

国内实测状态:国内可用性待核验。协议兼容和官方资料说明不等于国内网络可用。

官方网站访问
尚未实测 待核验
GitHub 仓库访问
尚未实测 待核验
官方服务国内连接
尚未实测 待核验
国内网络情况
尚未实测 待核验
国内模型兼容性
尚未实测 待核验
自定义 API
尚未实测 待核验
海外服务依赖
尚未实测 待核验
海外账号要求
尚未实测 待核验
中文界面
尚未实测 待核验
国内最后核验时间
尚未实测

许可与国内使用

仓库 LICENSE 为 Apache License 2.0,README 亦声明本项目采用 Apache 2.0。该许可证适用于仓库代码;商业模块、托管服务(如 Google Cloud 相关服务)和第三方模型分别适用各自的条款,需单独核验。

国内使用方面,资料未说明大陆网络环境下安装 PyPI 包、访问 Google Cloud 或调用 Gemini 的可用性与合规性,也未给出国内模型或国内云平台的适配说明,相关情况均待核验。域名为 google.github.io / adk.dev 不代表服务部署地域。

项目资料与来源

官方网站 ↗

GitHub 仓库 ↗

官方文档 ↗

字段依据与待核验事项

access:来源确认 · You can install the latest stable version of ADK using `pip`:

project_type:来源确认 · An open-source, code-first Python framework for building, evaluating, and deploying sophisticated AI agents with flexibility and control.

原始 README(折叠技术参考)
# Agent Development Kit (ADK) 2.0

[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)
[![PyPI version](https://img.shields.io/pypi/v/google-adk.svg)](https://pypi.org/project/google-adk/)
[![Python versions](https://img.shields.io/pypi/pyversions/google-adk.svg)](https://pypi.org/project/google-adk/)
[![PyPI downloads](https://static.pepy.tech/badge/google-adk/month)](https://pepy.tech/project/google-adk)
[![Continuous Integration](https://github.com/google/adk-python/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/google/adk-python/actions/workflows/continuous-integration.yml)
[![Docs](https://img.shields.io/badge/docs-latest-blue.svg)](https://adk.dev/)
[![r/agentdevelopmentkit](https://img.shields.io/badge/Reddit-r%2Fagentdevelopmentkit-FF4500?style=flat&logo=reddit&logoColor=white)](https://www.reddit.com/r/agentdevelopmentkit/)
<a href="https://codewiki.google/github.com/google/adk-python"><img src="https://www.gstatic.com/_/boq-sdlc-agents-ui/_/r/Mvosg4klCA4.svg" alt="Ask Code Wiki" height="20"></a>

<h2 align="center">
  <img src="https://raw.githubusercontent.com/google/adk-python/main/assets/agent-development-kit.png" width="256"/>
</h2>
<h3 align="center">
  An open-source, code-first Python framework for building, evaluating, and deploying sophisticated AI agents with flexibility and control.
</h3>
<h3 align="center">
  Important Links:
  <a href="https://adk.dev/">Docs</a>,
  <a href="https://github.com/google/adk-recipes">Samples</a> &
  <a href="https://github.com/google/adk-web">ADK Web</a>.
</h3>
<h3 align="center">
  ADK in other languages:
  <a href="https://github.com/google/adk-java">ADK Java</a>,
  <a href="https://github.com/google/adk-kotlin">ADK Kotlin</a>,
  <a href="https://github.com/google/adk-go">ADK Go</a> &
  <a href="https://github.com/google/adk-js">ADK Typescript</a>.
</h3>

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.

## ✨ Key Features

- **Workflow Runtime**: A graph-based execution engine for composing
  deterministic execution flows for agentic apps, with support for routing,
  fan-out/fan-in, loops, retry, state management, dynamic nodes,
  human-in-the-loop, and nested workflows.

- **Task API**: Structured agent-to-agent delegation with multi-turn task
  mode, single-turn controlled output, mixed delegation patterns,
  human-in-the-loop, and task agents as workflow nodes.

- **Modular Multi-Agent Systems**: Design scalable applications by composing
  multiple specialized agents into flexible hierarchies.

- **Rich Tool Ecosystem**: Utilize pre-built tools, custom functions,
  OpenAPI specs, MCP tools or integrate existing tools to give agents diverse
  capabilities, all for tight integration with the Google ecosystem.

- **Code-First Development**: Define agent logic, tools, and orchestration
  directly in Python for ultimate flexibility, testability, and versioning.

- **Agent Config**: Build agents without code. Check out the
  [Agent Config](https://adk.dev/agents/config/) feature.

- **Tool Confirmation**: A [tool confirmation flow (HITL)](https://adk.dev/tools-custom/confirmation/) that can guard tool execution with explicit confirmation and custom input.

- **Deploy Anywhere**: Easily containerize and deploy agents on Cloud Run or
  scale seamlessly with Vertex AI Agent Engine.

## 🚀 Installation

### Stable Release (Recommended)

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

```bash
pip install google-adk
```

**Requirements:** Python 3.11+.

For transitive dependency protection, we recommend installing with our companion
constraints files (for python 3.11 to 3.15).

Choose the constraints file matching your Python version:

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

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

```bash
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:

```bash
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

```python
from google.adk import Agent

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

### Workflow

```python
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

```bash
# 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](https://raw.githubusercontent.com/google/adk-python/main/assets/adk-web-dev-ui.png)](https://youtu.be/TEjqk0eeNy8)

[![Watch on YouTube](https://img.shields.io/badge/YouTube-Watch%20ADK%20Web%20Demo-FF0000?style=flat&logo=youtube&logoColor=white)](https://youtu.be/TEjqk0eeNy8)

### Evaluate Agents

Run the bundled evaluation sample from the repo root:

```bash
adk eval \
    contributing/samples/evaluation/home_automation_agent \
    contributing/samples/evaluation/basic_criteria/home_automation.evalset.json \
    --config_file_path contributing/samples/evaluation/basic_criteria/eval_config.json
```

### 🚀 Deployment Options

Deploying the Agent Locally with Docker Container:

```bash
adk deploy docker --with_ui <agent-folder>
```

Deploying the Agent in Google Cloud (Cloud Run)

```bash
adk deploy cloud_run --with_ui <agent-folder>
```

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

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

## 📚 Documentation

- **Getting Started**: https://adk.dev/
- **Guides**: See
  [`docs/guides/`](https://github.com/google/adk-python/tree/main/docs/guides)
  for task-oriented walkthroughs of agents, tools, events, plugins, and
  workflows.
- **Samples**: See
  [`contributing/samples/`](https://github.com/google/adk-python/tree/main/contributing/samples)
  for runnable example agents.

## 🤝 Contributing

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

- [General contribution guideline and flow](https://adk.dev/community/contributing-guide/).
- [Code Contributing Guidelines](./CONTRIBUTING.md) to get started.

## Community Repo

We have the [adk-python-community repo](https://github.com/google/adk-python-community) 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](https://adk.dev/llms.txt) and [llms-full.txt](https://adk.dev/llms-full.txt) files published on the ADK documentation site can be used as context for an LLM. The former is a summarized version, while the latter contains the full documentation for LLMs with a large context window.

## Community Events

- [Completed] ADK's 1st community meeting on Wednesday, October 15, 2025. Remember to [join our group](https://groups.google.com/g/adk-community) to get access to the [recording](https://drive.google.com/file/d/1rpXDq5NSH8-MyMeYI6_5pZ3Lhn0X9BQf/view), and [deck](https://docs.google.com/presentation/d/1_b8LG4xaiadbUUDzyNiapSFyxanc9ZgFdw7JQ6zmZ9Q/edit?slide=id.g384e60cdaca_0_658&resourcekey=0-tjFFv0VBQhpXBPCkZr0NOg#slide=id.g384e60cdaca_0_658).

## 📄 License

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

______________________________________________________________________

*Happy Agent Building!*
历史前置条件说明(补充参考)

Python 3.11+;通过 pip 安装 google-adk;调用 Gemini 等模型需相应 API Key 或 Google Cloud 授权;部署到 Cloud Run / Vertex AI Agent Engine 需 Google Cloud 账号与权限,费用与配额待核验;MCP 配置与第三方模型接入方式待核验。

项目来源与清单版权许可

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

整理来源:https://github.com/slavakurilyak/awesome-ai-agents

清单版权与许可:

MIT License

Copyright (c) 2024 Slava Kurilyak

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.