google-agents-cli-adk-code

par google

Cette compétence doit être utilisée lorsque l'utilisateur souhaite "écrire du code d'agent", "construire un agent avec ADK", "ajouter un outil", "créer un callback", "définir un agent", "utiliser la gestion d'état", ou a besoin de motifs API Python ADK (Agent Development Kit) et d'exemples de code. Fait partie de la suite de compétences Google ADK. Fournit une référence rapide pour les types d'agents, les définitions d'outils, les motifs d'orchestration, les callbacks et la gestion d'état. Ne PAS utiliser pour créer de nouveaux projets (utiliser google-agents-cli-scaffold) ou pour le déploiement...

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

Plus de skills de google

google-agents-cli-eval
google
Cette compétence doit être utilisée lorsque l'utilisateur souhaite "exécuter une évaluation", "évaluer mon agent ADK", "écrire un jeu de données d'évaluation", "analyser des échecs d'évaluation", "comparer des résultats d'évaluation", "optimiser un agent", ou a besoin de conseils sur la méthodologie d'évaluation de la plateforme Agent et le Quality Flywheel. Couvre les métriques d'évaluation, le schéma de jeu de données, la notation LLM-en-tant-que-juge et les causes d'échec courantes. Ne PAS utiliser pour les motifs de code API (utiliser google-agents-cli-adk-code), le déploiement (utiliser google-agents-cli-deploy) ou la création de projet (utiliser...
developmenttestingdata-analysis
google-agents-cli-workflow
google
Cette compétence doit être utilisée lorsque l'utilisateur souhaite « développer un agent », « construire un agent avec ADK », « exécuter l'agent localement », « déboguer le code de l'agent », « tester un agent », « déployer un agent », « publier un agent », « surveiller un agent », ou a besoin du cycle de vie de développement ADK (Agent Development Kit) et des directives de codage. Point d'entrée pour la construction d'agents ADK. Toujours active — fournit le workflow complet (scaffold, build, evaluate, deploy, publish, observe), les règles de préservation du code, les conseils de sélection de modèle, et...
developmentdevopstesting
google-agents-cli-deploy
google
This skill should be used when the user wants to "deploy an agent", "deploy my ADK agent", "set up CI/CD", "configure secrets", "troubleshoot a deployment", or needs guidance on Agent Runtime, Cloud Run, or GKE deployment targets. Covers deployment workflows, service accounts, rollback, and production infrastructure. Part of the Google ADK (Agent Development Kit) skills suite. Do NOT use for API code patterns (use google-agents-cli-adk-code), evaluation (use google-agents-cli-eval), or...
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
This skill should be used when the user wants to "set up tracing", "monitor my ADK agent", "configure logging", "add observability", "debug production traffic", or needs guidance on monitoring deployed ADK (Agent Development Kit) agents. Covers Cloud Trace, prompt-response logging, BigQuery Agent Analytics, third-party integrations (AgentOps, Phoenix, MLflow, etc.), and troubleshooting. Part of the Google ADK (Agent Development Kit) skills suite. Do NOT use for deployment setup (use...
developmentdevopsapi
google-agents-cli-publish
google
This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini Enterprise", "publish to Gemini Enterprise", or needs guidance on the agents-cli publish gemini-enterprise command. Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, and troubleshooting. Part of the Google ADK (Agent Development Kit) skills suite. Do NOT use for deployment (use...
developmentdevopsapi