Google ADK
google / adk-python
Google 的代码优先 Python agent 工具包:把工具、会话、记忆、评测与部署放进同一套抽象,可用 Gemini 或其它模型。Google’s code-first Python agent toolkit, bringing tools, sessions, memory, evaluation and deployment into one abstraction, usable with Gemini or other models.
为什么选Why choose it
- 官方维护,文档与样例完整,适合从单 agent 走到多 agent 编排。Sessions, memory and evaluation are part of the toolkit.
- 工具体系与 Google 生态(Vertex AI、Gemini)衔接紧,鉴权与部署路径清楚。Works with Gemini and other providers.
- 同一套代码可本地跑、可上 Cloud Run,原型到上线的落差小。Code-first rather than a visual builder.
不适合Not for
不是低代码拖拽平台,要写 Python。You need a non-Python runtime.
部分托管与评测能力绑定 Google Cloud,换云要自己接。You want a fully hosted agent platform with no deployment work.
框架抽象较完整,深度定制前先读源码,别把黑盒当标准。框架抽象较完整,深度定制前先读源码,别把黑盒当标准。
最小上手Minimum setup
- pip install google-adk,按 quickstart 建一个带单个 tool 的 agent。Run the official sample with one tool.
- 用 adk web 本地跑一轮,观察 tool call、session 与事件流。Add a session and test a multi-turn task.
- 再把 agent 拆成 sub-agents,确认路由、状态与错误处理。Run the built-in evaluation on three cases.
依赖与成本Dependencies and cost
Python 3.10+;Gemini API key 或其它模型接入;部署到 Cloud Run 需要 GCP 配置。Check runtime, model weights and external service dependencies in the README.
许可与使用边界License and usage boundaries
Apache-2.0;示例数据、第三方工具与 Google 托管服务各自条款。Code is Apache-2.0; model weights, training data and generated content may have separate terms — check each before commercial use.
开源不等于可商用:GPL / AGPL 有传染性;代码许可、模型许可、生成内容许可要分开看。上线前读仓库 LICENSE 与模型卡,必要时让法务确认。Open source is not automatically commercial-use friendly: GPL / AGPL are copyleft; code, model and output licenses are separate. Read the LICENSE and model card before launch, and involve legal when needed.
替代与相邻Alternatives and neighbors
- LangGraph — 生产可用Production,把 agent 写成有状态图:节点、边、检查点、人工确认与回滚都能显式表达。Write an agent as a stateful graph: nodes, edges, checkpoints, human approval and rollback are explicit.
- OpenAI Agents SDK — 先试这个Start here,轻量的 agent 运行时:agent、handoff、guardrail、trace 四个核心概念。A lightweight agent runtime with four core ideas: agents, handoffs, guardrails and traces.
- Pydantic AI — 轻量Lightweight,用 Pydantic 的类型系统写 agent:输入、输出、工具参数都强类型校验。Write agents with Pydantic’s type system: inputs, outputs and tool arguments are strongly validated.
下一步Next steps
- 打开 GitHub,先读 README、LICENSE、最近 release 与 issue。Open GitHub and read the README, LICENSE, latest release and issues first.
- 按“部署依赖 / 显存 / 数据 / 网络 / 权限”列一张上手清单。Make an onboarding checklist for deployment dependencies, VRAM, data, network and permissions.
- 用一个小样本跑通,再决定是否进生产;不要直接上生产数据。Run a small sample first, then decide on production; never start with production data.
GitHub 仓库 ↗GitHub repository ↗ 文档 ↗Docs ↗ 加入对比Add to compare