$npx -y skills add google/agents-cli --skill google-agents-cli-adk-codegoogle-agents-cli-adk-code is an agent skill published from google/agents-cli, installable through the skills CLI.
| 1 | # ADK Code Reference |
| 2 | |
| 3 | > **Before using this skill**, activate `/google-agents-cli-workflow` first — it contains the required development phases and scaffolding steps. |
| 4 | |
| 5 | ## Prerequisites |
| 6 | |
| 7 | 1. Run `agents-cli info` — if it shows project config, skip to the reference below |
| 8 | 2. If no project exists: run `agents-cli scaffold create <name>` |
| 9 | 3. If user has existing code: run `agents-cli scaffold enhance .` |
| 10 | |
| 11 | Do NOT write agent code until a project is scaffolded. |
| 12 | |
| 13 | > **Python only for now.** This reference currently covers the Python ADK SDK. |
| 14 | > Support for other languages is coming soon. |
| 15 | |
| 16 | ## Quick Reference — Most Common Patterns |
| 17 | |
| 18 | ```python |
| 19 | from google.adk.agents import Agent |
| 20 | |
| 21 | def get_weather(city: str) -> dict: |
| 22 | """Get current weather for a city.""" |
| 23 | return {"city": city, "temp": "22°C", "condition": "sunny"} |
| 24 | |
| 25 | root_agent = Agent( |
| 26 | name="my_agent", |
| 27 | model="gemini-flash-latest", |
| 28 | instruction="You are a helpful assistant that ...", |
| 29 | tools=[get_weather], |
| 30 | ) |
| 31 | ``` |
| 32 | |
| 33 | --- |
| 34 | |
| 35 | ## References |
| 36 | |
| 37 | The first two are cheatsheets for common patterns; for broad or deep knowledge, go to the source (docs index or installed package). |
| 38 | |
| 39 | | Reference | When to read | |
| 40 | |------|-------------| |
| 41 | | `references/adk-python.md` | Core ADK API: `Agent`, tools, callbacks, plugins, state, artifacts, multi-agent systems, `SequentialAgent` / `ParallelAgent` / `LoopAgent`, custom `BaseAgent`, A2A protocol, A2UI. Default for most agents. | |
| 42 | | `references/adk-workflows.md` | Graph-based Workflow API (ADK 2.0): nodes, edges, fan-out/fan-in, HITL, parallel processing. Use when you need explicit graph topology. | |
| 43 | | `curl https://adk.dev/llms.txt` | Docs index (every page title + URL). Fetch it, then `WebFetch` the specific page for anything beyond the cheatsheets. | |
| 44 | | Installed ADK package | Exact signatures and symbols — inspect the source (see "Inspecting ADK Source Code" in `references/adk-python.md`). | |
| 45 | |
| 46 | ## Related Skills |
| 47 | |
| 48 | - `/google-agents-cli-workflow` — Development workflow, coding guidelines, and operational rules |
| 49 | - `/google-agents-cli-scaffold` — Project creation and enhancement with `agents-cli scaffold create` / `scaffold enhance` |
| 50 | - `/google-agents-cli-eval` — Evaluation methodology, dataset schema, and the eval-fix loop |
| 51 | - `/google-agents-cli-deploy` — Deployment targets, CI/CD pipelines, and production workflows |