Skip to content
ADK Code Reference

ADK Code Reference Skill

Google's skill for writing agent code with the Agent Development Kit (ADK) in Python or Go: agent types, tools, callbacks, state, multi-agent orchestration, the graph Workflow API and a catalogue of reference recipes, used with agents-cli.

GitHub Docs
Development
Released
Apache-2.0

Install

Install with the skills CLI

One command for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf and dozens of other agents. Needs Node.js; the skill is fetched straight from google/agents-cli.

$ npx skills add google/agents-cli --skill google-agents-cli-adk-code

Run it in a terminal. The CLI finds the agents installed on your machine, asks which ones to add the skill to, and whether to install it into the folder you ran it from or for all your projects.

Other ways to install

Copy the whole skill folder — SKILL.md and any scripts or references beside it — into ~/.claude/skills/google-agents-cli-adk-code/, where Claude Code picks it up in every project. Only git is needed.

tmp=$(mktemp -d) && \
  git clone --depth 1 --branch main https://github.com/google/agents-cli.git "$tmp" && \
  mkdir -p ~/.claude/skills && \
  cp -R "$tmp"/skills/google-agents-cli-adk-code ~/.claude/skills/google-agents-cli-adk-code

No scripts or references next to it? Saving the SKILL.md alone as ~/.claude/skills/google-agents-cli-adk-code/SKILL.md works too.

Using another agent? Its personal skills folder
Codex
~/.agents/skills/
Cursor
~/.cursor/skills/
GitHub Copilot
~/.copilot/skills/
Gemini CLI
~/.gemini/skills/
Windsurf
~/.codeium/windsurf/skills/
OpenCode
~/.config/opencode/skills/

About

  • Recipe index for code execution, memory, approval gates, guardrails and scheduled runs
  • Python and Go cheatsheets for agents, tools, callbacks, state and A2A
  • Graph Workflow API references for fan-out, fan-in and human-in-the-loop
  • Live and voice agent reference for run_live, VAD and speech config
  • Refuses to write agent code until a project is scaffolded with agents-cli

The ADK Code Reference is one of the skills that ship with Google's agents-cli, the command-line tool for building, evaluating and deploying agents with the Agent Development Kit. This one covers the coding step. It activates when you ask the agent to write agent code, build an agent with ADK, add a tool, create a callback or manage state, and it explicitly hands scaffolding and deployment to its sibling skills.

It works as a router to detailed references rather than a long inline tutorial. For Python, adk-python.md covers the core API (Agent, tools, callbacks, plugins, state, artifacts, SequentialAgent, ParallelAgent and LoopAgent, custom agents, server-hosted ManagedAgent, the A2A protocol and A2UI). adk-python-workflows.md covers the graph-based Workflow API in ADK Python 2.0 with nodes, edges, fan-out, fan-in and human-in-the-loop steps, and adk-python-live.md covers real-time voice and video agents. Go gets matching references for llmagent, the runner, HTTP serving and workflows, plus a pointer to the upstream adk-go examples.

Before answering any "how do I build X" question, the agent reads a topic-indexed catalogue of worked recipes: sandboxed and per-user code execution, agent-loadable SKILL.md skills, cross-session memory, approval gates before risky actions, tool guardrails, per-user credentials and scheduled or event-driven runs. For anything beyond the cheatsheets it fetches the adk.dev/llms.txt docs index or inspects the installed package source.

The skill sets one firm rule: no agent code until a project exists. It checks with agents-cli info, routes new projects through the google-agents-cli-workflow skill to agree a spec first, and runs agents-cli scaffold enhance . on existing code. It requires agents-cli, installed with uv tool install google-agents-cli. Apache-2.0.

SKILL.md

The instructions your agent loads, as published by Google.

SKILL.md
name
google-agents-cli-adk-code
description
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).
metadata
author: Google license: Apache-2.0 version: 1.13.0 requires: bins: - agents-cli install: "uv tool install google-agents-cli"

ADK Code Reference

Activate /google-agents-cli-workflow first.

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/`](https://github.com/google/adk-go/tree/main/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. No project: load /google-agents-cli-workflow and agree the spec with the user (its Phase 0) before you scaffold.
  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.

ReferenceLanguageWhen to read
references/recipes.mdPythonTopic-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.mdPythonCore 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.mdPythonGraph-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.mdPythonLive 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.mdGoCore 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.mdGoGraph-based Workflow API: nodes, edges, fan-out/fan-in, HITL, parallel processing. Use when you need explicit graph topology.
`examples/`GoRunnable upstream programs — the closest thing to a recipe catalog for Go.
curl https://adk.dev/llms.txtPythonDocs index (every page title + URL). Fetch it, then WebFetch the specific page for anything beyond the cheatsheets.
Installed ADK packagePythonExact signatures and symbols — inspect the source (see "Inspecting ADK Source Code" in references/adk-python.md).
  • /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
Install
Featured

Build crash-safe AI agents on AgentKit and step.ai — durable tool calls, human-in-the-loop approval, realtime progress, and when not to reach for an agent loop at all.

VoltAgent's official conventions skill — when to reach for an agent versus a workflow, the expected project layout, and the core snippets for agents, workflows, memory and servers.

Featured

Temporal's official skill for building durable workflows — SDK patterns across seven languages, plus the determinism rules that decide whether a workflow survives a replay.

Browse all skills →