$npx -y skills add google/agents-cli --skill google-agents-cli-deploygoogle-agents-cli-deploy is an agent skill published from google/agents-cli, installable through the skills CLI.
| 1 | # ADK Deployment Guide |
| 2 | |
| 3 | > **Requires:** `agents-cli` (`uv tool install google-agents-cli`) — [install uv](https://docs.astral.sh/uv/getting-started/installation/index.md) first if needed. |
| 4 | |
| 5 | > Prefer using the `agents-cli` commands throughout this guide — they wrap Terraform, Docker, and deployment into a tested pipeline. If your project isn't scaffolded yet, see `/google-agents-cli-scaffold` to add deployment support first. |
| 6 | |
| 7 | ### Reference Files |
| 8 | |
| 9 | For deeper details, consult these reference files in `references/`: |
| 10 | |
| 11 | - **`cloud-run.md`** — Scaling defaults, Dockerfile, session types, networking |
| 12 | - **`agent-runtime.md`** — container-based deploy, unified FastAPI app, the `/api` passthrough, Terraform resource, deployment metadata, CI/CD differences |
| 13 | - **`gke.md`** — GKE Autopilot cluster, Kubernetes manifests, Workload Identity, session types, networking |
| 14 | - **`terraform-patterns.md`** — Custom infrastructure, IAM, state management, importing resources |
| 15 | - **`batch-inference.md`** — BigQuery Remote Function trigger; for Pub/Sub / Eventarc see `/google-agents-cli-adk-code` |
| 16 | - **`cicd-pipeline.md`** — Full CI/CD pipeline setup, `infra cicd` flags, runner comparison, WIF auth, pipeline stages |
| 17 | - **`testing-deployed-agents.md`** — Testing instructions per deployment target, curl examples, load tests |
| 18 | |
| 19 | > **Observability:** See the `/google-agents-cli-observability` skill for Cloud Trace, prompt-response logging, BigQuery Analytics, and third-party integrations. |
| 20 | |
| 21 | --- |
| 22 | |
| 23 | ## Deployment Target Decision Matrix |
| 24 | |
| 25 | Choose the right deployment target based on your requirements: |
| 26 | |
| 27 | | Criteria | Agent Runtime | Cloud Run | GKE | |
| 28 | |----------|-------------|-----------|-----| |
| 29 | | **Scaling** | Managed auto-scaling (configurable min/max, concurrency) | Fully configurable (min/max instances, concurrency, CPU allocation) | Full Kubernetes scaling (HPA, VPA, node auto-provisioning) | |
| 30 | | **Networking** | VPC-SC and PSC-I supported (private VPC connectivity via network attachments) | Full VPC support, direct VPC egress, IAP, ingress rules | Full Kubernetes networking | |
| 31 | | **Session state** | Native `VertexAiSessionService` (persistent, managed) | In-memory (dev), Cloud SQL, or Agent Platform Sessions backend | In-memory (dev), Cloud SQL, or Agent Platform Sessions backend | |
| 32 | | **Batch/event processing** | Trigger endpoints reachable via the Agent Engine `/api` passthrough | Native trigger endpoints (Pub/Sub, Eventarc); see `/google-agents-cli-adk-code` | Custom (Kubernetes Jobs, Pub/Sub) | |
| 33 | | **Cost model** | vCPU-hours + memory-hours (not billed when idle) | Per-instance-second + min instance costs | Node pool costs (always-on or auto-provisioned) | |
| 34 | | **Setup complexity** | Lower (managed, purpose-built for agents) | Medium (Dockerfile, Terraform, networking) | Higher (Kubernetes expertise required) | |
| 35 | | **Best for** | Managed infrastructure, minimal ops | Custom infra, full networking control | Full Kubernetes control | |
| 36 | |
| 37 | **Ask the user** which deployment target fits their needs. Each is a valid production choice with different trade-offs. |
| 38 | |
| 39 | All three targets are container-based, so any language works. |
| 40 | |
| 41 | > **Product name mapping:** "Agent Engine" / "Vertex AI Agent Engine" is now **Agent Runtime**. Use `--deployment-target agent_runtime`. |
| 42 | |
| 43 | > **Ambient / scheduled / event-driven agents:** ADK's `trigger_sources` registers `/apps/{app}/trigger/*` endpoints on the same FastAPI app for **all** targets. On **Cloud Run** / **GKE** these are public HTTP routes you point a Pub/Sub push subscription or Eventarc trigger at; on **Agent Runtime** the same routes are reachable through the Agent Engine `/api` passthrough (e.g. `.../reasoningEngines/v1/{resource}/api/apps/{app}/trigger/pubsub`). Cloud Run remains the simplest target for unauthenticated trigger sources. See `/google-agents-cli-adk-code` (`references/adk-python.md`, section "12. Event-Driven / Ambient Agents") for the `trigger_sources` pattern. |
| 44 | |
| 45 | > **OAuth / user consent agents:** Use **Agent Runtime** with Gemini Enterprise for agents that need OAuth 2.0 user consent (e.g., accessing Google Drive, Calendar, or other user-scoped APIs). Cloud Run does not currently support managed OAuth flows. See the `adk-ae-oauth` sample |