From google-agents-cli
Provides the full agent development lifecycle (scaffold, build, evaluate, deploy, publish, observe) using ADK and google-agents-cli, with code preservation rules and troubleshooting.
How this skill is triggered — by the user, by Claude, or both
Slash command
/google-agents-cli:google-agents-cli-workflowThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**agents-cli** is a CLI and skills toolkit for building, evaluating, and deploying agents on Google Cloud. It works with any coding agent — Antigravity CLI, Claude Code, Codex, or others — and with the agent framework of your choice (the [Agent Development Kit (ADK)](https://adk.dev/) by default). Install with `uvx google-agents-cli setup`.
agents-cli is a CLI and skills toolkit for building, evaluating, and deploying agents on Google Cloud. It works with any coding agent — Antigravity CLI, Claude Code, Codex, or others — and with the agent framework of your choice (the Agent Development Kit (ADK) by default). Install with uvx google-agents-cli setup.
Before writing agent code, make sure a scaffolded project exists (see Phase 2). Skipping scaffolding loses eval boilerplate, CI/CD config, and project conventions.
Requires: google-agents-cli
= 1.0.0 If version is behind, run: uv tool install "google-agents-cli=1.0.0"
Check version: agents-cli info Install uv first if needed.
Re-read the relevant skill before each phase — not after you've already started and hit a problem. Context compaction may have dropped earlier skill content. If skills are not available, run uvx google-agents-cli setup to install them.
| Phase | Skill | When to load |
|---|---|---|
| 0 — Understand | — | No skill needed — read .agents-cli-spec.md if present, else clarify goals with the user |
| 1 — Study samples | — | Check the Notable Samples catalog in references/samples.md — clone and study matching samples before scaffolding |
| 2 — Scaffold | /google-agents-cli-scaffold | Before creating or enhancing a project |
| 3 — Build | /google-agents-cli-adk-code | Before writing agent code — API patterns, tools, callbacks, state |
| 4 — Evaluate | /google-agents-cli-eval | Before running any eval — dataset schema, metrics, eval-fix loop |
| 5 — Deploy | /google-agents-cli-deploy | Before deploying — target selection, troubleshooting 403/timeouts |
| 6 — Publish | /google-agents-cli-publish | After deploying, if registering with Gemini Enterprise (optional) |
| 7 — Observe | /google-agents-cli-observability | After deploying — traces, logging, monitoring setup |
If agents-cli is not installed:
uv tool install google-agents-cli
uv command not foundInstall uv following the official installation guide.
Users name products inconsistently (Vertex AI → Agent Platform, Agent Engine → Agent Runtime, etc.). Map user terms to CLI values using references/terminology.md.
Before writing or scaffolding anything, understand what you're building.
If .agents-cli-spec.md exists in the current directory, read it — it is your primary source of truth. Otherwise:
Do NOT proceed to planning, scaffolding, or coding. Ask the user the questions below and wait for their answers. You MUST have the user's answers before moving on. Do not assume, research, or fill in the blanks yourself. The user's intent drives everything — skipping this step leads to wasted work.
Always ask:
Ask based on context:
rag-vector-search (embeddings / similarity search) or rag-agent-search (managed document search) from references/samples.md and adapt one into your project./google-agents-cli-adk-code.Once you have the user's answers, write the spec to .agents-cli-spec.md using the template in references/spec-template.md, then get the user's approval. See /google-agents-cli-scaffold for how these choices map to CLI flags.
Once you have a clear understanding, proceed to Phase 1.
Ask yourself: is there a sample that can help me design this and cut time? Scan the keyword-indexed catalog in references/samples.md — it lists the samples and how to clone one. Multiple samples can match — clone and study all that are relevant.
If no sample matches, proceed to Phase 2. But first — are you sure? Re-read the user's request and compare it against the sample catalog in references/samples.md. Skipping a matching sample means rebuilding patterns that already exist.
IMPORTANT — Exit criteria: After studying a sample, ask yourself: can I apply anything from this sample to help me deliver the design? Note what you'll reuse before moving on. Do NOT proceed until you've answered this.
This list is useful at any phase — revisit it when you hit deployment, publishing, or infrastructure questions. A sample's Terraform or registration pattern may be exactly what you need later.
First check whether a project already exists: run agents-cli info from the project root. If one was already created or enhanced by agents-cli, skip this phase.
Otherwise, scaffold before writing any code:
agents-cli scaffold create <name>agents-cli scaffold enhance . (adds the agents-cli structure)Use /google-agents-cli-scaffold for the full workflow — it covers architecture choices (deployment target, agent type, session storage) and project creation or enhancement.
Implement the agent logic:
GEMINI.md / CLAUDE.md for directory name)agents-cli run "your prompt" to verify the agent works after changes — this is the fastest way to check behavior without leaving the terminalIf the user asks for interactive testing, suggest agents-cli playground — it opens a web-based playground for manual conversation with the agent.
For ADK API patterns and code examples, use /google-agents-cli-adk-code.
Smoke-test only here — do not write behavioral pytest. LLM output is non-deterministic; behavioral checks belong in eval (Phase 4), not pytest. Use
agents-cli run "prompt"for quick checks.
RAG is a clone-and-study recipe (Phase 1). Datastore provisioning and ingestion live in the sample's
own Makefile (e.g. make setup-infra, make data-ingestion) and its README.md / AGENTS.md —
follow those, adapting the sample's infra/terraform/ and .env into your project. (The former
agents-cli infra datastore / agents-cli data-ingestion commands have been removed.)
This is the most important phase. Evaluation validates agent behavior end-to-end.
MANDATORY: Activate /google-agents-cli-eval before running evaluation.
It contains the dataset schema, config format, and critical gotchas. Do NOT skip this.
Do NOT skip this phase. After building the agent, you MUST proceed to evaluation.
uv run pytest vs agents-cli eval — know the difference:
uv run pytest — Tests code correctness: imports work, functions return expected types, API contracts hold. Does NOT test whether the agent behaves well.agents-cli eval — Tests agent behavior: response quality, tool usage, persona consistency, safety compliance. This is what validates your agent actually works.agents-cli run "prompt" — Quick one-off smoke test during development. If testing multiple prompts use the --start-server option to persist the local server, which reduces overhead for repeated calls and allows resuming local sessions via --session-id. Use this for fast iteration, not pytest.NEVER write pytest tests that check LLM response content (e.g., asserting pirate keywords appear, checking if the agent mentions allergies). LLM outputs are non-deterministic. Use eval with LLM-as-judge criteria instead.
agents-cli eval run (chains generate + grade). For debugging or custom trace locations, use the two-step form: agents-cli eval generate then agents-cli eval grade.Expect 5-10+ iterations here.
Once evaluation thresholds are met:
agents-cli info to see current configagents-cli scaffold enhance . --deployment-target <target>
See /google-agents-cli-deploy for the deployment target decision matrix (Agent Runtime vs Cloud Run vs GKE).agents-cli deployIMPORTANT: Never deploy without explicit human approval.
Not all agents require this — currently supporting Gemini Enterprise. See /google-agents-cli-publish for registration modes, flags, and troubleshooting.
After deploying, use observability tools to monitor agent behavior in production. See /google-agents-cli-observability for Cloud Trace, prompt-response logging, BigQuery Analytics, and third-party integrations.
Agents routinely skip steps with plausible-sounding excuses. Recognize these and push back:
| Shortcut | Why it fails |
|---|---|
| "The user's request is clear enough, no need to clarify" | You're guessing at requirements. Phase 0 exists to confirm intent before scaffolding — even one question can prevent a full rework. |
"The agent responded correctly in agents-cli run, so eval isn't needed" | One prompt is not a test suite. Eval catches regressions, edge cases, and tool trajectory issues that a single run never will. |
| "I'll use a newer/better model" | The scaffolded model was chosen deliberately. Changing it without being asked violates code preservation (Principle 1) and often breaks things — wrong location, deprecated version, or 404. Your training data is likely out of date — rely on the skills and the model listing command, not your knowledge of model names. |
| "I can skip the scaffold and set up manually" | Manual setup misses eval boilerplate, CI/CD config, and project configuration manifest conventions. Use agents-cli create even for quick experiments. |
Code modifications require surgical precision — alter only the code segments directly targeted by the user's request and strictly preserve all surrounding and unrelated code.
Mandatory Pre-Execution Verification:
Before finalizing any code replacement, verify the following:
model, version, api_key), comments, and formatting outside the identified target remain identical.Example:
root_agent = Agent(
name="recipe_suggester",
model="gemini-1.5-flash", # UNINTENDED - model was not requested to change
instruction="You are a recipe suggester."
)
root_agent = Agent(
name="recipe_suggester", # OK, related to new purpose
model="gemini-flash-latest", # PRESERVED
instruction="You are a recipe suggester." # OK, the direct target
)
Model Selection — CRITICAL:
# Use 'global' or any supported region (e.g. 'us-east1')
uv run --with google-genai python -c "
from google import genai
client = genai.Client(vertexai=True, location='global')
for m in client.models.list(): print(m.name)
"
https://adk.dev/agents/models/google-gemini/index.md. See also stable model versions.Running Python Commands:
uv to execute Python commands (e.g., uv run python script.py)uv sync before executing scriptsBreaking Infinite Loops:
terraform import instead of retrying creationterraform CLI)Troubleshooting:
/google-agents-cli-adk-code first — it covers most common patternscurl https://adk.dev/llms.txt) for deep divesagents-cli <command> --help — the output ends with a Source: line pointing to the exact source file implementing that command. Read it to understand the logic and diagnose failures. Use agents-cli info to get the full CLI install path if you need to browse across multiple files.When something breaks, follow this sequence — don't skip steps or shotgun fixes:
agents-cli run "prompt" to isolate agent behavior from deployment issues. Add -v (--verbose) to print the full JSON event payloads — useful for inspecting tool calls, intermediate steps, and silent failures.Stop-the-line rule: If a change breaks something that was working, stop feature work and fix the regression first. Don't push forward hoping to circle back — regressions compound.
.env files and env var assignments (e.g., GOOGLE_CLOUD_PROJECT, GOOGLE_CLOUD_LOCATION) are typically required for the agent to function — never remove or modify them unless the user explicitly asks.env file exists in the project root, treat it as essential configuration.env entries — see /google-agents-cli-deploy for secret management guidanceWhen you need specific infrastructure files (Terraform, CI/CD, Dockerfile) but don't want to modify the current project, use /google-agents-cli-scaffold to create a temporary project in /tmp/ and copy over what you need.
| File | Contents |
|---|---|
references/internals.md | Underlying tools and commands that agents-cli wraps (adk, pytest, ruff, uvicorn) |
references/samples.md | Keyword-indexed catalog of ADK reference samples to study before scaffolding |
references/spec-template.md | .agents-cli-spec.md template and optional sections |
references/terminology.md | Product-name → CLI-value mapping |
references/commands.md | Per-phase agents-cli command index |
Run agents-cli --help or agents-cli <command> --help for the authoritative flag list. A per-phase command index lives in references/commands.md; per-phase usage is in the phase sections above.
Troubleshooting hint: If skills seem outdated or incomplete, reinstall:
agents-cli setup --skip-authOnly do this when you suspect stale skills are causing problems.
npx claudepluginhub google/agents-cliGuides users step-by-step through building, scaffolding, testing, and deploying AI agents on GreenNode AgentBase. Invoke for any agent creation request.
Scaffolds Google ADK agent projects using agents-cli: create, enhance, and upgrade with deployment and CI/CD options.
Engineers production-ready ADK agents and multi-agent systems in Python/Java/Go with clean structure, tests, safe tools, and deployment automation.