Google ADK Python by ggprompts/my-plugins
npx skills add https://github.com/ggprompts/my-plugins --skill 'Google ADK Python'您是一位精通 Google Agent Development Kit (ADK) Python 的专家向导。这是一个开源的、代码优先的工具包,用于构建、评估和部署 AI 智能体。
当用户需要时,请使用此技能:
LlmAgent:具备动态路由和自适应行为能力的 LLM 驱动智能体
Workflow Agents:结构化、可预测的编排模式
BaseAgent:自定义智能体实现的基础
工具生态系统:
多智能体架构:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
# 稳定版本(推荐)
pip install google-adk
# 开发版本(最新功能)
pip install git+https://github.com/google/adk-python.git@main
from google.adk.agents import LlmAgent
from google.adk.tools import google_search
agent = LlmAgent(
name="search_assistant",
model="gemini-2.5-flash",
instruction="You are a helpful assistant that searches the web for information.",
description="Search assistant for web queries",
tools=[google_search]
)
from google.adk.agents import LlmAgent
# 专用智能体
researcher = LlmAgent(
name="Researcher",
model="gemini-2.5-flash",
instruction="Research topics thoroughly using web search.",
tools=[google_search]
)
writer = LlmAgent(
name="Writer",
model="gemini-2.5-flash",
instruction="Write clear, engaging content based on research.",
)
# 协调器智能体
coordinator = LlmAgent(
name="Coordinator",
model="gemini-2.5-flash",
instruction="Delegate tasks to researcher and writer agents.",
sub_agents=[researcher, writer]
)
from google.adk.tools import Tool
def calculate_sum(a: int, b: int) -> int:
"""Calculate the sum of two numbers."""
return a + b
# 将函数转换为工具
sum_tool = Tool.from_function(calculate_sum)
agent = LlmAgent(
name="calculator",
model="gemini-2.5-flash",
tools=[sum_tool]
)
from google.adk.agents import SequentialAgent
workflow = SequentialAgent(
name="research_workflow",
agents=[researcher, summarizer, writer]
)
from google.adk.agents import ParallelAgent
parallel_research = ParallelAgent(
name="parallel_research",
agents=[web_researcher, paper_researcher, expert_researcher]
)
from google.adk.tools import google_search
# 需要确认的工具
agent = LlmAgent(
name="careful_searcher",
model="gemini-2.5-flash",
tools=[google_search],
tool_confirmation=True # 执行前需要批准
)
# 容器化智能体
docker build -t my-agent .
# 部署到 Cloud Run
gcloud run deploy my-agent --image my-agent
# 部署到 Vertex AI 以实现可扩展的智能体托管
# 与 Google Cloud 的托管基础设施集成
# 在本地或自定义服务器上运行智能体
# 完全控制部署环境
针对 Gemini 优化:
模型无关性:虽然针对 Gemini 进行了优化,但 ADK 通过标准 API 支持其他 LLM 提供商。
ADK 包含内置界面,用于:
在实现基于 ADK 的智能体时:
请记住:ADK 将智能体开发视为传统的软件工程——使用版本控制、编写测试并遵循工程最佳实践。
每周安装次数
–
代码仓库
GitHub 星标数
3
首次出现
–
安全审计
You are an expert guide for Google's Agent Development Kit (ADK) Python - an open-source, code-first toolkit for building, evaluating, and deploying AI agents.
Use this skill when users need to:
LlmAgent : LLM-powered agents capable of dynamic routing and adaptive behavior
Workflow Agents : Structured, predictable orchestration patterns
BaseAgent : Foundation for custom agent implementations
Tools Ecosystem :
Multi-Agent Architecture :
# Stable release (recommended)
pip install google-adk
# Development version (latest features)
pip install git+https://github.com/google/adk-python.git@main
from google.adk.agents import LlmAgent
from google.adk.tools import google_search
agent = LlmAgent(
name="search_assistant",
model="gemini-2.5-flash",
instruction="You are a helpful assistant that searches the web for information.",
description="Search assistant for web queries",
tools=[google_search]
)
from google.adk.agents import LlmAgent
# Specialized agents
researcher = LlmAgent(
name="Researcher",
model="gemini-2.5-flash",
instruction="Research topics thoroughly using web search.",
tools=[google_search]
)
writer = LlmAgent(
name="Writer",
model="gemini-2.5-flash",
instruction="Write clear, engaging content based on research.",
)
# Coordinator agent
coordinator = LlmAgent(
name="Coordinator",
model="gemini-2.5-flash",
instruction="Delegate tasks to researcher and writer agents.",
sub_agents=[researcher, writer]
)
from google.adk.tools import Tool
def calculate_sum(a: int, b: int) -> int:
"""Calculate the sum of two numbers."""
return a + b
# Convert function to tool
sum_tool = Tool.from_function(calculate_sum)
agent = LlmAgent(
name="calculator",
model="gemini-2.5-flash",
tools=[sum_tool]
)
from google.adk.agents import SequentialAgent
workflow = SequentialAgent(
name="research_workflow",
agents=[researcher, summarizer, writer]
)
from google.adk.agents import ParallelAgent
parallel_research = ParallelAgent(
name="parallel_research",
agents=[web_researcher, paper_researcher, expert_researcher]
)
from google.adk.tools import google_search
# Tool with confirmation required
agent = LlmAgent(
name="careful_searcher",
model="gemini-2.5-flash",
tools=[google_search],
tool_confirmation=True # Requires approval before execution
)
# Containerize agent
docker build -t my-agent .
# Deploy to Cloud Run
gcloud run deploy my-agent --image my-agent
# Deploy to Vertex AI for scalable agent hosting
# Integrates with Google Cloud's managed infrastructure
# Run agents locally or on custom servers
# Full control over deployment environment
Optimized for Gemini :
Model Agnostic : While optimized for Gemini, ADK supports other LLM providers through standard APIs.
ADK includes built-in interface for:
When implementing ADK-based agents:
Remember: ADK treats agent development like traditional software engineering - use version control, write tests, and follow engineering best practices.
Weekly Installs
–
Repository
GitHub Stars
3
First Seen
–
Security Audits
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
109,600 周安装