跳到正文
Skillpedia
智能体6.3k · #14368

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/google/agents-cli/blob/main/skills/google-agents-cli-adk-code/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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.

  1. Verify project: run agents-cli info (proceed if config exists).
  2. New project: run agents-cli scaffold create <name> --agent adk_python --deployment-target <target> — use --agent adk_go for Go.
  3. 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 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
常见问题

它同时支持 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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能