google-agents-cli-adk-code
它能做什么
这项技能是使用 Google 的智能体开发套件(Agent Development Kit)编写 AI 智能体代码的快速参考。适合构建智能体、并想看看常见模式示例的开发者。
适用场景
- ✓当你想使用 Google Agent Development Kit 构建 AI 智能体时。
- ✓当你需要为 ADK 智能体添加工具、回调或状态管理时。
- ✓当你想参考 ADK 的智能体工作流、审批或记忆示例的时候。
技能链接
https://github.com/google/agents-cli/blob/main/skills/google-agents-cli-adk-code/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我为 Google ADK 智能体添加一个工具和一个回调,并告诉我如何在步骤之间保持状态。”
每周 5 个新技能,1 分钟读完。
工作原理
这项技能会把智能体指向与其类型、工具、回调和状态相匹配的参考文件和代码示例。它还会确保在编写任何智能体代码之前已经设置好项目。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
ADK Code Reference
Activate /google-agents-cli-workflow first for required development phases and scaffolding steps.
1. Study Recipes (No Project Needed)
Python — read the topic index in references/recipes.md before answering "how do I build X".
Worked implementations exist for: sandboxed/per-user code execution, agent-loadable SKILL.md
skills, cross-session memory, approval gates before risky actions, tool guardrails, per-user
credentials, and scheduled/event-driven runs.
Go — read the upstream examples/.
clone the repo and read the one matching the capability you need before implementing it.
2. Prerequisites for Writing Code
Do NOT write agent code until a project is scaffolded.
- Verify project: run
agents-cli info(proceed if config exists). - New project: run
agents-cli scaffold create <name> --agent adk_python --deployment-target <target>— use--agent adk_gofor Go. - Existing code: run
agents-cli scaffold enhance ..
Quick Reference — Most Common Patterns
See references/adk-python.md and references/adk-go.md for Python and Go code examples, respectively.
References
Use the cheatsheets for common patterns. For deep knowledge, fetch the docs index or inspect the installed package.
| Reference | Language | When to read |
|---|---|---|
references/recipes.md |
Python | Topic-indexed catalog of ADK reference recipes. Read in workflow Phase 1 — before scaffolding and before writing code — maps a capability to the recipe that implements it. |
references/adk-python.md |
Python | Core ADK API: Agent, tools, callbacks, plugins, state, artifacts, multi-agent systems, SequentialAgent / ParallelAgent / LoopAgent, custom BaseAgent, ManagedAgent (server-hosted first-party agents), A2A protocol, A2UI. Default for most agents. |
references/adk-python-workflows.md |
Python | Graph-based Workflow API (ADK Python 2.0): nodes, edges, fan-out/fan-in, HITL, parallel processing. Use when you need explicit graph topology. |
references/adk-python-live.md |
Python | Live and voice agents: Runner.run_live, LiveRequestQueue, model and regional availability, voice/speech_config, VAD, session limits, /run_live serving. Use for real-time voice or video agents. |
references/adk-go.md |
Go | Core ADK Go API: llmagent, tools, callbacks, plugins, state, artifacts, multi-agent systems, sequential/parallel/loop agents, custom agents, the runner, serving over HTTP, A2A protocol, and ambient triggers. Default for most agents. |
references/adk-go-workflows.md |
Go | Graph-based Workflow API: nodes, edges, fan-out/fan-in, HITL, parallel processing. Use when you need explicit graph topology. |
examples/ |
Go | Runnable upstream programs — the closest thing to a recipe catalog for Go. |
curl https://adk.dev/llms.txt |
Python | Docs index (every page title + URL). Fetch it, then WebFetch the specific page for anything beyond the cheatsheets. |
| Installed ADK package | Python | Exact 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 withagents-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
常见问题
它同时支持 Go 和 Python 吗?
支持。它同时提供 Python 和 Go 的参考。
我需要先有项目吗?
需要。技能要求在编写智能体代码之前,先用 agents 命令搭建项目骨架。
示例在哪里?
示例位于技能文件夹中的参考文件里,Go 示例则在上游仓库中。
详情
作者的原始描述
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" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).
repo: google/agents-cli
热度
- GitHub 星标
- 6.3k
- 排名
- #14368
- 许可证
- Apache-2.0
- 更新时间
- 2026/10/27
评论
- …
同一仓库的更多技能
google-agents-cli-deploy
6.3k帮你的智能体把 AI 智能体部署到 Google Cloud,涵盖 Agent Runtime、Cloud Run、GKE、密钥、CI/CD 和故障排查。
google-agents-cli-eval
6.3k帮你的智能体用测试数据集和评分来评估 AI 智能体,并找出回答出错的原因。
google-agents-cli-observability
6.3k帮你的智能体为已部署在 Google Cloud 上的 AI 智能体设置追踪、日志和监控,让你看到它在做什么。
google-agents-cli-publish
6.3k帮你的智能体把已部署的 AI 智能体注册到 Gemini,并在 Agent Registry 中管理已注册的智能体和 MCP 服务器。