google-adk
БесплатноБез исполняемых скриптовНе проверенBest practices for building AI agents with Google's Agent Development Kit (ADK) in Python, covering agent design, tools, sessions, memory, artifacts…
от Mindrally★ 323 звезды на GitHubОб этом скилле
Google Agent Development Kit (ADK)
This skill covers building production-grade AI agents with Google's Agent Development Kit (ADK) for Python, including agent composition, tool design, session/state/memory management, artifacts, evaluation, and deployment.
Workflow for Building an ADK Agent
- Define the agent — Create an
LlmAgent(orAgent) with a clearname,model,instruction, anddescription. Keep the instruction focused on one job. - Author tools — Write plain Python functions with type hints and docstrings, or wrap existing APIs with
FunctionTool. Validate all inputs before side effects. - Compose multi-agent systems — For complex workflows, split responsibility across sub-agents and use
SequentialAgent,ParallelAgent, orLoopAgentfor deterministic orchestration, or delegate viasub_agentsfor LLM-driven routing. - Wire up session and state — Choose a
SessionService(in-memory for dev,DatabaseSessionServiceor Vertex AI-managed for production) and usesession.statefor conversation-scoped data. - Add memory (optional) — Configure a
MemoryServicefor cross-session recall when the agent needs to remember facts between separate conversations. - Handle artifacts (optional) — Configure an
ArtifactServicewhen the agent generates or receives files, images, or other binary outputs. - Run locally — Use
adk web,adk run, or theRunnerAPI to exercise the agent against aSession. - Evaluate — Write
.evalset.jsontest cases and runadk evalto check tool-call trajectories and response quality against regressions. - Deploy — Package the agent for Vertex AI Agent Engine, Cloud Run, or GKE, and separate dev/staging/prod configuration.
Agent Design
- Keep each agent focused on a single clear goal, persona, and tool set — avoid one agent that tries to do everything.
- Use
LlmAgentfor flexible, reasoning-driven behavior and workflow agents (SequentialAgent,ParallelAgent,LoopAgent) for deterministic orchestration that doesn't need an LLM to decide the next step. - Write instructions that define task boundaries, tool-use rules ("always call
lookup_orderbefore answering order questions"), and escalation behavior ("if you cannot resolve the issue, transfer tohuman_handoff_agent"). - Split multi-agent systems by responsibility (e.g., a "triage" agent, a "billing" agent, a "technical support" agent) rather than by implementation convenience.
- Keep the model name configurable (environment variable or config file) so it can be swapped across
gemini-2.0-flash,gemini-2.5-pro, or other supported models without code changes. - Use
output_schema(a Pydantic model) when the agent's final response must be structured data consumed by other code.
Tools
- Give tools narrow, typed inputs and outputs — a single function should do one thing, with a docstring the LLM uses to decide when to call it.
- Validate tool arguments before performing any side effect (writes, external calls, payments).
- Keep secrets, credentials, and privileged API keys out of agent instructions and prompts; inject them at the tool implementation layer instead.
- Handle tool errors explicitly and return actionable failure messages (e.g.,
{"status": "error", "message": "order_id not found"}) rather than raising unhandled exceptions that break the agent loop. - Be aware of ADK tool limitations — some built-in tools (e.g.,
google_search,code_execution) cannot be combined with other tools on the same agent; delegate to a dedicated sub-agent instead. - Prefer
FunctionToolfor custom Python logic,AgentToolto let one agent call another agent as a tool, and built-in tools (google_search,BuiltInCodeExecutor) only when their constraints fit the use case.
Example: Defining an Agent with Tools
from google.adk.agents import Agent
from google.adk.tools import FunctionTool
from google.adk.runners import InMemoryRunner
from google.genai import types
def get_order_status(order_id: str) -> dict:
"""Look up the current status of a customer order.
Args:
order_id: The unique identifier of the order, e.g. "ord-12345".
Returns:
A dict with 'status' ('found' or 'error') and either 'state'
and 'updated_at', or an error 'message'.
"""
if not order_id or not order_id.startswith("ord-"):
return {"status": "error", "message": "invalid order_id format"}
# In production this would call a real order service.
orders = {"ord-12345": {"state": "shipped", "updated_at": "2026-08-30T10:00:00Z"}}
order = orders.get(order_id)
if order is None:
return {"status": "error", "message": f"no order found for {order_id}"}
return {"status": "found", **order}
root_agent = Agent(
name="order_support_agent",
model="gemini-2.0-flash",
description="Answers customer questions about order status.",
instruction=(
"You help customers check their ord
Установить google-adk в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл google-adk?
Best practices for building AI agents with Google's Agent Development Kit (ADK) in Python, covering agent design, tools, sessions, memory, artifacts, evaluation, and deployment. Use when building LLM agents or multi-agent systems with ADK, defining ADK tools, wiring up sessions/state/memory, working with ADK artifacts, writing agent evals, or deploying ADK agents to Vertex AI Agent Engine or Cloud Run.
Как установить скилл google-adk?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл google-adk запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic