google-agents-cli-adk-code

作者: google

This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management", or needs ADK (Agent Development Kit) Python API patterns and code examples. Part of the Google ADK skills suite. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, and state management. Do NOT use for creating new projects (use google-agents-cli-scaffold) or deployment...

npx skills add https://github.com/google/agents-cli --skill google-agents-cli-adk-code

ADK Code Reference

Before using this skill, activate /google-agents-cli-workflow first — it contains the required development phases and scaffolding steps.

Prerequisites

  1. Run agents-cli info — if it shows project config, skip to the reference below
  2. If no project exists: run agents-cli scaffold create <name>
  3. If user has existing code: run agents-cli scaffold enhance .

Do NOT write agent code until a project is scaffolded.

Python only for now. This reference currently covers the Python ADK SDK. Support for other languages is coming soon.

Quick Reference — Most Common Patterns

from google.adk.agents import Agent

def get_weather(city: str) -> dict:
    """Get current weather for a city."""
    return {"city": city, "temp": "22°C", "condition": "sunny"}

root_agent = Agent(
    name="my_agent",
    model="gemini-flash-latest",
    instruction="You are a helpful assistant that ...",
    tools=[get_weather],
)

References

The first two are cheatsheets for common patterns; for broad or deep knowledge, go to the source (docs index or installed package).

ReferenceWhen to read
references/adk-python.mdCore ADK API: Agent, tools, callbacks, plugins, state, artifacts, multi-agent systems, SequentialAgent / ParallelAgent / LoopAgent, custom BaseAgent. Default for most agents.
references/adk-workflows.mdGraph-based Workflow API (ADK 2.0): nodes, edges, fan-out/fan-in, HITL, parallel processing. Use when you need explicit graph topology.
curl https://adk.dev/llms.txtDocs index (every page title + URL). Fetch it, then WebFetch the specific page for anything beyond the cheatsheets.
Installed ADK packageExact signatures and symbols — inspect the source (see "Inspecting ADK Source Code" in references/adk-python.md).

Related Skills

  • /google-agents-cli-workflow — Development workflow, coding guidelines, and operational rules
  • /google-agents-cli-scaffold — Project creation and enhancement with agents-cli scaffold create / scaffold enhance
  • /google-agents-cli-eval — Evaluation methodology, dataset schema, and the eval-fix loop
  • /google-agents-cli-deploy — Deployment targets, CI/CD pipelines, and production workflows

来自 google 的更多技能

google-agents-cli-eval
google
当用户想要“运行评估”、“评估我的ADK代理”、“编写评估数据集”、“分析评估失败”、“比较评估结果”、“优化代理”,或需要关于Agent平台评估方法论和质量飞轮的指导时,应使用此技能。涵盖评估指标、数据集模式、LLM作为评判的评分以及常见失败原因。请勿用于API代码模式(使用google-agents-cli-adk-code)、部署(使用google-agents-cli-deploy)或项目脚手架(使用...)。
developmenttestingdata-analysis
google-agents-cli-workflow
google
当用户想要“开发一个代理”、“使用ADK构建代理”、“本地运行代理”、“调试代理代码”、“测试代理”、“部署代理”、“发布代理”、“监控代理”,或需要ADK(代理开发工具包)开发生命周期和编码指南时,应使用此技能。构建ADK代理的入口点。始终处于激活状态——提供完整的工作流程(脚手架、构建、评估、部署、发布、观察)、代码保留规则、模型选择指南以及...
developmentdevopstesting
google-agents-cli-deploy
google
当用户想要“部署代理”、“部署我的ADK代理”、“设置CI/CD”、“配置密钥”、“排查部署问题”,或需要关于Agent Runtime、Cloud Run或GKE部署目标的指导时,应使用此技能。涵盖部署工作流、服务账号、回滚和生产基础设施。属于Google ADK(代理开发工具包)技能套件的一部分。请勿用于API代码模式(应使用google-agents-cli-adk-code)、评估(应使用google-agents-cli-eval)或...
developmentdevops
google-agents-cli-scaffold
google
This skill should be used when the user wants to "create an agent project", "start a new ADK project", "build me a new agent", "add CI/CD to my project", "add deployment", "enhance my project", or "upgrade my project". Part of the Google ADK (Agent Development Kit) skills suite. Covers `agents-cli scaffold create`, `scaffold enhance`, and `scaffold upgrade` commands, template options, deployment targets, and the prototype-first workflow. Do NOT use for writing agent code (use...
developmentdevops
google-agents-cli-observability
google
当用户想要“设置追踪”、“监控我的ADK代理”、“配置日志记录”、“添加可观测性”、“调试生产流量”,或需要关于监控已部署的ADK(代理开发工具包)代理的指导时,应使用此技能。涵盖Cloud Trace、提示-响应日志记录、BigQuery代理分析、第三方集成(AgentOps、Phoenix、MLflow等)以及故障排除。属于Google ADK(代理开发工具包)技能套件的一部分。请勿用于部署设置(请使用...
developmentdevopsapi
google-agents-cli-publish
google
当用户想要“发布代理”、“发布我的ADK代理”、“向Gemini Enterprise注册代理”、“发布到Gemini Enterprise”,或需要关于agents-cli publish gemini-enterprise命令的指导时,应使用此技能。涵盖ADK与A2A注册模式、编程和交互式使用、标志参考、从部署元数据自动检测以及故障排除。属于Google ADK(代理开发工具包)技能套件的一部分。请勿用于部署(请使用...
developmentdevopsapi