/google-agents-cli:google-agents-cli-deployfrom google-agents-cli
Deploys agents using agents-cli to Google Cloud targets: Agent Runtime, Cloud Run, or GKE. Covers Terraform, IAM, secrets, CI/CD, rollback, Agent Gateway, CMEK, and BigQuery batch inference.
Ships in google-agents-cli. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Run agents-cli info first: it prints the language and deployment target. No project yet: settle the target in section 1 and record it under ## Deployment in .agents-cli-spec.md. With an approved spec, call the Skill tool with google-agents-cli-scaffold; without one, google-agents-cli-workflow, and finish its design stage.
Before choosing the target, read the framework's skill for this stage: the skill the project's guidance file (CLAUDE.md, GEMINI.md or AGENTS.md) names. On ADK, call the Skill tool with google-agents-cli-adk-code and read its references/adk-deploy.md. No project yet: see workflow's references/extension.md. No Skill tool: read its SKILL.md directly (../<skill-name>/ for a bundled skill, .agents/skills/<skill-name>/ for an extension's).
Use agents-cli commands over raw gcloud, Terraform or Docker: they wrap the tested pipeline. agents-cli <cmd> --help is authoritative for every flag.
| File | Read when |
|---|---|
references/agent-runtime.md | Agent Runtime sizing, queries, debugging or rollback |
references/cloud-run.md | Cloud Run sizing, sessions, ingress, IAP, auth or rollback |
references/gke.md | GKE cluster, manifests, Workload Identity, port-forward or rollback |
references/terraform.md | Custom infrastructure, service accounts and 403s, Terraform state, terraform import |
references/cicd.md | Running infra cicd: runners, pipeline stages, production approval |
references/cmek.md | Customer-managed encryption keys |
references/batch-inference.md | Calling the agent from BigQuery over table rows |
references/gateway.md | Binding the agent to an Agent Gateway |
Ask which target fits; recommend Agent Runtime for the least operations work.
For production, ask in that round only what changes the setup and isn't known yet, each with a recommended default: who calls the agent and with what access, the region, peak concurrent users (sizing, load test), and personal data in conversations (retention).
Follow company rules the user or repo states over scaffold defaults, without asking for them: residency (references/terraform.md), Terraform modules, base images, keys, model gateway.
| Agent Runtime | Cloud Run | GKE | |
|---|---|---|---|
| Operations | Managed, built for agents | Medium: Dockerfile, Terraform, networking | High: Kubernetes skills |
| Networking | VPC-SC, PSC interface | Full VPC, direct egress, IAP, ingress rules | Full Kubernetes networking |
| Sessions | Managed | In-memory, Cloud SQL or managed | In-memory, Cloud SQL or managed |
| Events | Container routes through the /api passthrough | Pub/Sub push and Eventarc to public routes | Kubernetes Jobs, Pub/Sub |
| Cost | vCPU and memory hours, nothing when idle | Instance-seconds plus min instances | Node pools |
Dockerfile. Some frameworks lose Agent Runtime features; the framework's skill says which. ADK Java, Kotlin and TypeScript deploy to Cloud Run only.agent_runtime.The manifest's deployment_target records the choice; deploy -d <target> overrides it once. To add a target to an existing project, run agents-cli scaffold enhance --deployment-target <target> first. Python: check uv run python -c "import app.fast_api_app" (your agent directory for app); on a ModuleNotFoundError, uv add the missing dependencies from a /tmp scaffold of the same target.
--session-type on cloud_run and gke, in adk-deploy.md).Evals pass and the user approves before each deploy, redeploys included:
agents-cli eval run after the last code change, plus the project's unit and integration tests. If no eval exists yet, call the Skill tool with google-agents-cli-eval.RESULT: line and read the scores against the bar yourself: the exit code gates only on the config's thresholds and errored cases.agents-cli deploy --project <id>.NEVER run agents-cli deploy without an explicit yes from the user. Done when the user said yes after seeing the scores, and only then did deploy run.
agents-cli deploy works on its own, without Terraform. For production, ask the user: one project (agents-cli infra single-project) or staging and prod behind CI/CD (agents-cli infra cicd, section 4).
Before the first deploy, call the Skill tool with google-agents-cli-observability for the tier choice, unless .agents-cli-spec.md already has ## Observability.
Before the first deploy to a project, run agents-cli deploy --dry-run: it prints the plan after read-only Google Cloud checks (Agent Runtime, Cloud Run, GKE) and the offline pre-flight checks, and exits non-zero if one fails. --skip-preflight skips those checks on a real deploy.
Every --apply runs terraform apply -auto-approve, so before each one, or a terraform apply, show the user the plan summary (adds, changes, destroys) and wait for an explicit yes.
When Terraform will own the agent's identity or observability (prompt-response logging, BigQuery telemetry), provision before the first deploy:
agents-cli infra single-project shows the plan; after that yes, agents-cli infra single-project --apply applies it. On Agent Runtime this also creates the agent resource that later deploys update.create_params.<target>.identity_default (agent_runtime or cloud_run):| Project | Agent runs as | Deploy with |
|---|---|---|
Agent Runtime or Cloud Run, agent_identity | Its own principal://..., granted agent_identity_roles from variables.tf | agents-cli deploy; it ignores --service-account |
service_account or no key | app_sa | agents-cli deploy --service-account <email>, with app_service_account_email from agents-cli infra show |
New projects default to Agent Identity on both targets; an older Cloud Run project (no identity_default) opts in with --agent-identity. On Cloud Run it can't be turned off later: for a service that has it, deploy stops and asks you to delete the service and redeploy. Even with Agent Identity, Cloud Run checks the service account the service records (app_sa from Terraform, else the default compute SA, else the last --service-account) for secretAccessor when it deploys.
Done when the agent runs as that identity; on Agent Runtime, deploy prints it: Agent Identity: principal://... or Service Account: <email>.
If deploy already ran before Terraform, leave Terraform unapplied: it owns the whole Agent Runtime resource, so a later apply leaves a second agent beside the first. Either delete the deployment with the user's ok and redo the steps above, or keep it and call the Skill tool with google-agents-cli-observability to set up telemetry by hand.
GKE is the exception: deploy runs its own targeted Terraform.
Custom infrastructure (Pub/Sub, BigQuery, Eventarc) goes in Terraform under deployment/terraform/. Done when every resource the agent uses shows in terraform state list. A 409 or "already exists" means terraform import, not a new resource.
Keep Terraform state remote, in GCS: infra cicd sets up the bucket and backend.tf; pass --local-state only for a one-person throwaway. With infra single-project alone, add a gcs backend before the first --apply (references/terraform.md); if CI/CD will follow, use the bucket and prefix infra cicd will write there. Done when deployment/terraform/*/backend.tf declares backend "gcs".
agents-cli infra cicd provisions staging, prod and the pipeline. First:
gh auth) or Cloud Build (needs a PAT and app installation ID).--create makes one, and before any push.agents-cli scaffold enhance --cicd-runner <runner> first, plus --deployment-target <target> if agents-cli info shows none: on none the runner alone adds no CI files.Ask before running infra cicd: even without --apply it creates the state bucket and the Cloud Build github-pat secret, and rewrites both backend.tf files. Pass the PAT as $GH_TOKEN, never a literal. Run --apply only after the user approves the plan. It deploys nothing: push to main to start the pipeline. Details, path filters and production approval: references/cicd.md.
API keys and passwords live in Secret Manager and reach the agent by name, not in env vars, code, logs or committed files. Never take a secret value in chat; the user creates the secret in their shell:
echo -n "$API_KEY" | gcloud secrets create MY_API_KEY --project="$PROJECT_ID" --data-file=-
gcloud secrets add-iam-policy-binding MY_API_KEY --project="$PROJECT_ID" \
--member="principal://..." --role="roles/secretmanager.secretAccessor"
Grant on that one secret to the runtime identity, principal://... or serviceAccount:<email>; in Terraform, google_secret_manager_secret_iam_member (references/terraform.md). Not through agent_identity_roles or app_sa_roles: those grant project-wide, opening every secret. Deploy to Agent Runtime or Cloud Run with --secrets "API_KEY=MY_API_KEY" (Agent Runtime replaces the agent's secrets with the ones you pass; Cloud Run adds to them); GKE pods read secrets through Kubernetes Secrets or the Secret Manager API with Workload Identity. Grant once the identity exists (references/terraform.md, Granting roles).
For CI/CD: references/cicd.md, Secrets.
Done when the deployed config names the secret, holds no key value, and the runtime identity holds secretAccessor.
Change config later with --env-vars KEY=VALUE, --remove-secrets KEY, --remove-env-vars KEY, --clear-secrets and --clear-env-vars (Agent Runtime and Cloud Run; --env-vars also on GKE). Every deploy applies the project .env; --remove-* ignores keys that don't exist and refuses a key you also set, in --env-vars or .env, and keeps agents-cli's own defaults (AGENT_VERSION, APP_URL). --clear-env-vars runs first, then the deploy sets .env, --env-vars and the defaults, and secrets stay. --clear-* also removes values set outside agents-cli, such as Terraform's LOGS_BUCKET_NAME, OTEL_* or DB_PASS; --clear-secrets plus --secrets replaces the set, and on Cloud Run it also removes volume-mounted secrets. A --remove-* can't be combined with the matching --clear-*. On GKE a deploy without --image resets env vars to Terraform's, so keep lasting ones in .env or Terraform.
A 403 right after a grant is IAM propagation: retry in a few minutes. Others: references/terraform.md.
agents-cli run --url <base-url> --mode a2a "What can you do?"
run --url handles auth, sessions and streaming; pass the base URL, not the card path. If an extension overrides run, prefix AGENTS_CLI_DISABLE_OVERRIDES=1. GKE services are internal: kubectl port-forward first, then use http://127.0.0.1:8080. Done when the deployed agent answers a prompt.
To register the agent with Gemini Enterprise or Agent Registry, call the Skill tool with google-agents-cli-publish. When the user names a Gemini Enterprise app, publish right after the dev deploy and in the prod pipeline (In CI/CD there).
references/agent-runtime.md (opens in a new tab)references/batch-inference.md (opens in a new tab)references/cicd.md (opens in a new tab)references/cloud-run.md (opens in a new tab)references/cmek.md (opens in a new tab)references/gateway.md (opens in a new tab)references/gke.md (opens in a new tab)references/terraform.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (google/agents-cli) — no native marketplace selected
npx claudepluginhub p/google-google-agents-cli7 skills in this plugin
/google-agents-cli-adk-codeWrites and fixes ADK agent code in Python, Go, Java, Kotlin and TypeScript: tools, callbacks, state, sub-agents, graph workflows, MCP, Live voice and the ADK recipe catalog. Use when the project uses ADK or the user names it, and they want to add a tool, connect an MCP server, restructure into sub-agents or workflow steps, change the model or stream responses.
/google-agents-cli-evalEvaluates agents with agents-cli: eval cases, LLM-judge metrics, scores and the fix loop. Use when the user wants to evaluate or test the agent's answers, write eval cases, measure hallucination or tool use, compare runs after a change, make it cheaper or faster at the same quality, group failures, or auto-tune its instructions.
/google-agents-cli-Other plugins' skills for the same job