skill

Google Agents Cli Deploy

google357,661+ تثبيتموثوق

نبذة

# Deployment Guide

> **Requires:** `agents-cli` (`uv tool install google-agents-cli`) — [install uv](https://docs.astral.sh/uv/getting-started/installation/index.md) first if needed.

> 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.

### Reference Files

For deeper details, consult these reference files in `references/`:

- **`cloud-run.md`** — Scaling defaults, Dockerfile, session types, networking - **`agent-runtime.md`** — container-based deploy, unified FastAPI app, the `/api` passthrough, Terraform resource, deployment metadata, CI/CD differences - **`gke.md`** — GKE Autopilot cluster, Kubernetes manifests, Workload Identity, session types, networking - **`terraform-patterns.md`** — Custom infrastructure, IAM, state management, importing resources - **`batch-inference.md`** — BigQuery Remote Function trigger; for Pub/Sub / Eventarc on ADK see `/google-agents-cli-adk-code` - **`cicd-pipeline.md`** — Full CI/CD pipeline setup, `infra cicd` flags, runner comparison, WIF auth, pipeline stages - **`testing-deployed-agents.md`** — Testing instructions per deployment target, curl examples, load tests

> **Observability:** See the `/google-agents-cli-observability` skill for Cloud Trace, prompt-response logging, BigQuery Analytics, and third-party integrations.

---

## Deployment Target Decision Matrix

Choose the right deployment target based on your requirements:

| Criteria | Agent Runtime | Cloud Run | GKE | |----------|-------------|-----------|-----| | **Scaling** | Managed auto-scaling (configurable min/max, concurrency) | Fully configurable (min/max instances, concurrency, CPU allocation) | Full Kubernetes scaling (HPA, VPA, node auto-provisioning) | | **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 | | **Session state** | Managed Agent Engine sessions (ADK wires `VertexAiSessionService` automatically) | In-memory (dev), Cloud SQL, or Agent Platform Sessions backend | In-memory (dev), Cloud SQL, or Agent Platform Sessions backend | | **Batch/event processing** | Trigger endpoints reachable via the Agent Engine `/api` passthrough | Native trigger endpoints (Pub/Sub, Eventarc); ADK: see `/google-agents-cli-adk-code` | Custom (Kubernetes Jobs, Pub/Sub) | | **Cost model** | vCPU-hours + memory-hours (not billed when idle) | Per-instance-second + min instance costs | Node pool costs (always-on or auto-provisioned) | | **Setup complexity** | Lower (managed, purpose-built for agents) | Medium (Dockerfile, Terraform, networking) | Higher (Kubernetes expertise required) | | **Best for** | Managed infrastructure, minimal ops | Custom infra, full networking control | Full Kubernetes control |

**Ask the user** which deployment target fits their needs. Each is a valid production choice with different trade-offs.

All three targets are container-based, so any language works.

> **Product name mapping:** "Agent Engine" / "Vertex AI Agent Engine" is now **Agent Runtime**. Use `--deployment-target agent_runtime`.

> **Ambient / scheduled / event-driven agents (ADK projects):** 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.

> **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. For a worked ADK example, look up OAuth user consent in the topic index in `/google-agents-cli-adk-code` → `references/samples.md`.

> **Live and voice agents:** pass **`--timeout 3600`** on Cloud Run so a session outlives the 300s default, and **`--min-instances 1`** on Cloud Run or Agent Runtime so the first caller after idle does not hear a cold start. GKE sizes pods in Terraform. URL shapes and session caps: `/google-agents-cli-adk-code` (`references/adk-python-live.md`).

---

## Deploying to Dev

### Deploy Workflow

**Task tracking:** Deployment involves multiple sequential steps (infra setup, CI/CD configuration, deploy, verification). Use a task list to track progress through these steps — skipping one often causes failures in later steps that are hard to trace b

التثبيت

شغل هذا الأمر

npx skills add google/agents-cli

يعمل مع

claude appclaude codeclaude apicursorcodexwindsurfclinezed

خطوات التثبيت

Install with `npx skills add google/agents-cli`, or clone the repository and copy the `skills/google-agents-cli-deploy` folder into your Claude skills directory.

عرض المصدر

أصول ذات صلة

مختارات أخرى في التطوير والبرمجة.

mcp serverclaude_codecursorcodex
npm install @modelcontextprotocol/server-fetch
خادم جلب الويب (Fetch)
خادم لجلب محتوى الويب وتحويله لاستخدام فعال مع نماذج اللغة. يجلب الروابط ويحولها إلى ماركداون نظيف.★ 4.9 · 5,000+
mcp serverclaude_codecursorcodex
npm install @modelcontextprotocol/server-memory
خادم الذاكرة (Memory)
نظام ذاكرة دائمة قائم على رسم بياني معرفي. يتيح للوكلاء تذكر المعلومات عبر المحادثات.★ 4.9 · 5,000+
mcp serverclaude_codecursorcodex
npm install @modelcontextprotocol/server-filesystem
خادم نظام الملفات (Filesystem)
عمليات ملفات آمنة مع ضوابط وصول قابلة للضبط. قراءة الملفات المحلية وكتابتها وسردها والبحث فيها.★ 4.9 · 5,000+
mcp serverclaude_codecursorcodex
npm install @modelcontextprotocol/server-git
خادم Git
أدوات لقراءة مستودعات Git والبحث فيها والتحكم بها — السجل والفروقات وتتبع المؤلفين والفروع والمزيد.★ 4.9 · 5,000+
mcp serverclaude_codecursorcodex
npm install @modelcontextprotocol/server-everything
خادم الاختبار الشامل (Everything)
خادم مرجعي للاختبار يجرب كل ميزات بروتوكول MCP — الأوامر والموارد والأدوات.★ 4.9 · 5,000+
mcp serverclaude_codecursorcodex
npm install @modelcontextprotocol/server-sequentialthinking
خادم التفكير المتسلسل (Sequential Thinking)
حل ديناميكي للمشكلات عبر تسلسلات تفكير منظمة مع التفرع والمراجعة والتأمل.★ 4.9 · 5,000+

افحص قبل التثبيت

شغل أي مصدر عبر فحوصاتنا - الظهور في الذكاء الاصطناعي والأمان والأداء واكتشاف التقنيات.

المزيد في التطوير والبرمجة