🤖 Google ADK:19.6k Stars 的官方 Agent 开发套件,pip install 就能搭出多 Agent 系统
项目地址:github.com/google/adk-python | ⭐ 19.6k Stars | 🛠 Python | 📜 Apache-2.0
老实说,市面上 Agent 框架多得让人眼花。LangChain、CrewAI、AutoGPT……每个都说自己能打,但真上手了各种抽象层看得头疼。Google 最近开源了 Agent Development Kit(ADK),一个 code-first 的 Python 框架,pip install 就能用,而且直接给你一个内置的开发 UI 调试 Agent。
为什么值得关心?
ADK 跟其他框架最大的区别就一句话:它是 Google 官方出品,为 Gemini 深度优化,但不是锁死的。你可以在本地跑,也可以部署到 Cloud Run 或者 Vertex AI。框架本身体积很小,没有花里胡哨的抽象层,直接写 Python 代码定义 Agent 逻辑。
最骚的操作是它的多 Agent 系统——定义一个 coordinator Agent,挂几个 child Agent 上去,框架自动帮你做任务分发和编排。不用自己写路由逻辑。
安装
一行命令搞定:
pip install google-adk
要装额外功能扩展:
pip install "google-adk[extensions]"
上手代码
单 Agent 定义
from google.adk.agents import Agent
from google.adk.tools import google_search
root_agent = Agent(
name="search_assistant",
model="gemini-2.5-flash",
instruction="You are a helpful assistant. Answer user questions using Google Search when needed.",
description="An assistant that can search the web.",
tools=[google_search]
)
多 Agent 系统
from google.adk.agents import LlmAgent
greeter = LlmAgent(
name="greeter",
model="gemini-2.5-flash",
instruction="Greet the user warmly.",
)
task_executor = LlmAgent(
name="task_executor",
model="gemini-2.5-flash",
instruction="Execute whatever task the user asks.",
)
coordinator = LlmAgent(
name="Coordinator",
model="gemini-2.5-flash",
description="I coordinate greetings and tasks.",
sub_agents=[greeter, task_executor]
)
就这么简单——定义几个 Agent,塞进 sub_agents 列表,剩下的交给 ADK Engine 和模型自己决定谁干活。
评测 Agent
adk eval \
samples_for_testing/hello_world \
samples_for_testing/hello_world/hello_world_eval_set_001.evalset.json
A2A 协议支持
ADK 内置了 Google 的 Agent2Agent (A2A) 协议支持,不同 Agent 之间可以远程通信。如果你在搞多 Agent 协作场景,这个功能直接省掉自己写 RPC 的功夫。
总结
- Google 官方出品,
pip install google-adk即用,零配置成本 - Code-first 设计,没有多余抽象层,Python 开发者友好
- 多 Agent 编排天然支持,
sub_agents列表搞定分发 - 内置开发 UI,调试 Agent 不用猜来猜去
- A2A 协议打通跨 Agent 通信,适合生产级多 Agent 架构
别问我怎么知道的——踩过的框架坑都是泪。Google ADK 是目前最省心的选择之一。
🤖 ADK (Agent Development Kit) — Google's open-source, code-first Python toolkit for building, evaluating, and deploying sophisticated AI agents.
pip install google-adkand you're ready to build multi-agent systems in minutes.