google-agents-cli-adk-code
Kỹ năng này nên được sử dụng khi người dùng muốn "viết mã tác tử", "xây dựng tác tử với ADK", "thêm công cụ", "tạo callback", "định nghĩa tác tử", "sử dụng quản lý trạng thái", hoặc cần các mẫu mã và ví dụ về API Python của ADK (Bộ công cụ phát triển tác tử). Là một phần của bộ kỹ năng Google ADK. Cung cấp tài liệu tham khảo nhanh về các loại tác tử, định nghĩa công cụ, mẫu điều phối, callback và quản lý trạng thái. KHÔNG sử dụng để tạo dự án mới (sử dụng google-agents-cli-scaffold) hoặc triển khai...
npx skills add https://github.com/google/agents-cli --skill google-agents-cli-adk-codeADK Code Reference
Before using this skill, activate
/google-agents-cli-workflowfirst — it contains the required development phases and scaffolding steps.
Prerequisites
- Run
agents-cli info— if it shows project config, skip to the reference below - If no project exists: run
agents-cli scaffold create <name> - 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-3.6-flash",
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).
| Reference | When to read |
|---|---|
references/adk-python.md | 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-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. |
curl https://adk.dev/llms.txt | Docs index (every page title + URL). Fetch it, then WebFetch the specific page for anything beyond the cheatsheets. |
| Installed ADK package | 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