用途:Google ADK Python 是谷歌开源、代码优先的工具包,用于构建、评估和部署 AI 智能体,适合需要工具调用、多智能体协作或可预测工作流的场景。
主要能力:提供 LlmAgent(由 LLM 驱动、可动态路由与委派子智能体)、Workflow 类智能体(SequentialAgent 顺序执行、ParallelAgent 并行执行、LoopAgent 循环执行)以及 BaseAgent 自定义扩展。工具生态包括预置的 google_search、code_execution,自定义 Python 函数工具,OpenAPI 规范集成,以及需人工确认的工具执行流程。支持层级式多智能体组合与协调者委派。
安装:pip install google-adk;开发版为 pip install git+https://github.com/google/adk-python.git@main。
使用方式:用 Python 定义智能体,指定 name、model、instruction、description 和 tools;可用 Tool.from_function 将函数转为工具;用 sub_agents 组合多智能体;用 SequentialAgent、ParallelAgent 组织工作流;通过 tool_confirmation=True 启用人工审批。部署可选 Cloud Run(docker build -t my-agent . 后 gcloud run deploy my-agent --image my-agent)、Vertex AI Agent Engine 或自定义基础设施。ADK 自带开发 UI,用于交互测试、调试工具调用与评估性能。
模型支持:针对 Gemini 优化(gemini-2.5-flash、gemini-2.5-pro、gemini-1.5-flash、gemini-1.5-pro),也可通过标准 API 接入其他 LLM 提供商。
适用场景:研究助手、代码助手、客户支持、内容创作、数据分析、任务自动化等。
限制:资料未提供具体收费、价格与性能数据;部署到 Google Cloud 相关服务需自行准备环境与凭据。官方资源见 https://github.com/google/adk-python 与 https://google.github.io/adk-docs/。