Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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

  1. Define the agent — Create an LlmAgent (or Agent) with a clear name, model, instruction, and description. Keep the instruction focused on one job.
  2. Author tools — Write plain Python functions with type hints and docstrings, or wrap existing APIs with FunctionTool. Validate all inputs before side effects.
  3. Compose multi-agent systems — For complex workflows, split responsibility across sub-agents and use SequentialAgent, ParallelAgent, or LoopAgent for deterministic orchestration, or delegate via sub_agents for LLM-driven routing.
  4. Wire up session and state — Choose a SessionService (in-memory for dev, DatabaseSessionService or Vertex AI-managed for production) and use session.state for conversation-scoped data.
  5. Add memory (optional) — Configure a MemoryService for cross-session recall when the agent needs to remember facts between separate conversations.
  6. Handle artifacts (optional) — Configure an ArtifactService when the agent generates or receives files, images, or other binary outputs.
  7. Run locally — Use adk web, adk run, or the Runner API to exercise the agent against a Session.
  8. Evaluate — Write .evalset.json test cases and run adk eval to check tool-call trajectories and response quality against regressions.
  9. 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 LlmAgent for 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_order before answering order questions"), and escalation behavior ("if you cannot resolve the issue, transfer to human_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 FunctionTool for custom Python logic, AgentTool to 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
Полный SKILL.md на GitHub

Установить 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), без исполняемых скриптов.

Похожие скиллы

Сравнить google-adk с