google-agents-cli-adk-code

作成者: google

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", or needs ADK (Agent Development Kit) Python API patterns and code examples. Part of the Google ADK skills suite. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, and state management. Do NOT use for creating new projects (use google-agents-cli-scaffold) or deployment...

npx skills add https://github.com/google/agents-cli --skill google-agents-cli-adk-code

ADK Code Reference

Before using this skill, activate /google-agents-cli-workflow first — it contains the required development phases and scaffolding steps.

Prerequisites

  1. Run agents-cli info — if it shows project config, skip to the reference below
  2. If no project exists: run agents-cli scaffold create <name>
  3. 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-flash-latest",
    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).

ReferenceWhen to read
references/adk-python.mdCore ADK API: Agent, tools, callbacks, plugins, state, artifacts, multi-agent systems, SequentialAgent / ParallelAgent / LoopAgent, custom BaseAgent. Default for most agents.
references/adk-workflows.mdGraph-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.txtDocs index (every page title + URL). Fetch it, then WebFetch the specific page for anything beyond the cheatsheets.
Installed ADK packageExact 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

googleのその他のスキル

google-agents-cli-eval
google
This skill should be used when the user wants to "run an evaluation", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Agent Platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Do NOT use for API code patterns (use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use...
developmenttestingdata-analysis
google-agents-cli-workflow
google
このスキルは、ユーザーが「エージェントを開発する」「ADKを使ってエージェントを構築する」「エージェントをローカルで実行する」「エージェントコードをデバッグする」「エージェントをテストする」「エージェントをデプロイする」「エージェントを公開する」「エージェントを監視する」、またはADK(Agent Development Kit)の開発ライフサイクルとコーディングガイドラインが必要な場合に使用します。ADKエージェント構築のエントリーポイントです。常にアクティブで、完全なワークフロー(スキャフォールド、ビルド、評価、デプロイ、公開、観測)、コード保存ルール、モデル選択ガイダンスなどを提供します。
developmentdevopstesting
google-agents-cli-deploy
google
このスキルは、ユーザーが「エージェントをデプロイする」「ADKエージェントをデプロイする」「CI/CDを設定する」「シークレットを構成する」「デプロイのトラブルシューティング」を行いたい場合、またはAgent Runtime、Cloud Run、GKEデプロイ先に関するガイダンスが必要な場合に使用します。デプロイワークフロー、サービスアカウント、ロールバック、本番インフラをカバーします。Google ADK(Agent Development Kit)スキルスイートの一部です。APIコードパターン(google-agents-cli-adk-codeを使用)、評価(google-agents-cli-evalを使用)には使用しないでください。
developmentdevops
google-agents-cli-scaffold
google
This skill should be used when the user wants to "create an agent project", "start a new ADK project", "build me a new agent", "add CI/CD to my project", "add deployment", "enhance my project", or "upgrade my project". Part of the Google ADK (Agent Development Kit) skills suite. Covers `agents-cli scaffold create`, `scaffold enhance`, and `scaffold upgrade` commands, template options, deployment targets, and the prototype-first workflow. Do NOT use for writing agent code (use...
developmentdevops
google-agents-cli-observability
google
このスキルは、ユーザーが「トレーシングを設定する」「ADKエージェントを監視する」「ロギングを構成する」「可観測性を追加する」「本番トラフィックをデバッグする」、またはデプロイされたADK(Agent Development Kit)エージェントの監視に関するガイダンスを必要とする場合に使用します。Cloud Trace、プロンプト応答ロギング、BigQuery Agent Analytics、サードパーティ統合(AgentOps、Phoenix、MLflowなど)、およびトラブルシューティングをカバーします。Google ADK(Agent Development Kit)スキルスイートの一部です。デプロイメント設定には使用しないでください(代わりに...を使用)。
developmentdevopsapi
google-agents-cli-publish
google
このスキルは、ユーザーが「エージェントを公開する」「ADKエージェントを公開する」「Gemini Enterpriseにエージェントを登録する」「Gemini Enterpriseに公開する」、またはagents-cli publish gemini-enterpriseコマンドに関するガイダンスを必要とする場合に使用します。ADKとA2Aの登録モード、プログラム的およびインタラクティブな使用方法、フラグリファレンス、デプロイメントメタデータからの自動検出、トラブルシューティングをカバーします。Google ADK(Agent Development Kit)スキルスイートの一部です。デプロイメントには使用しないでください(代わりに...を使用)。
developmentdevopsapi