{"slug": "how-to-deploy-ai-agents-to-google-cloud-using-the-google-agent-cli", "title": "How to Deploy AI Agents to Google Cloud Using the Google Agent CLI", "summary": "Google has released the Google Agent Development Kit (ADK) CLI, enabling developers to scaffold, evaluate, and deploy AI agents to Google Cloud Platform in minutes. The tool, which pairs with Anthropic's Claude Code coding agent, automates project setup and infrastructure configuration so developers can move from a blank slate to a production-ready agent in a single session.", "body_md": "# How to Deploy AI Agents to Google Cloud Using the Google Agent CLI\n\nGoogle's Agent CLI lets you scaffold, evaluate, and deploy AI agents to GCP in minutes using Claude Code. Learn the full workflow from idea to production.\n\n## What the Google Agent CLI Actually Does\n\nDeploying an AI agent to production has traditionally involved a lot of scaffolding, configuration, and manual wiring. Google’s Agent Development Kit (ADK) CLI changes that. It lets you go from a blank slate to a running agent on Google Cloud Platform in a single session — and when you pair it with Claude Code, most of the agent logic writes itself.\n\nThis guide covers the full workflow: installing the ADK CLI, scaffolding a project, building agent logic with Claude Code, evaluating performance, and deploying to GCP. It’s written for developers who want a reproducible, practical path from idea to production without fighting infrastructure.\n\n## Prerequisites Before You Start\n\nBefore running any commands, make sure you have the following in place.\n\n### Google Cloud Setup\n\nYou’ll need:\n\n- A Google Cloud project with billing enabled\n- The\n[Google Cloud CLI](https://cloud.google.com/sdk/docs/install)installed and authenticated (`gcloud auth login`\n\n) - The following APIs enabled in your project: Vertex AI, Cloud Run, Artifact Registry, and Cloud Build\n\nEnable them in one shot:\n\n```\ngcloud services enable \\\n  aiplatform.googleapis.com \\\n  run.googleapis.com \\\n  artifactregistry.googleapis.com \\\n  cloudbuild.googleapis.com\n```\n\n### Local Environment\n\nYou’ll need Python 3.10 or higher. The ADK CLI runs inside a Python virtual environment, so it’s a good idea to create one before installing:\n\n```\npython -m venv .venv\nsource .venv/bin/activate  # on Windows: .venv\\Scripts\\activate\n```\n\nYou’ll also want Claude Code installed — this is Anthropic’s terminal-based coding agent. Install it via npm:\n\n```\nnpm install -g @anthropic-ai/claude-code\n```\n\nOnce installed, authenticate with your Anthropic API key:\n\n```\nclaude auth\n```\n\n- ✕a coding agent\n- ✕no-code\n- ✕vibe coding\n- ✕a faster Cursor\n\nThe one that tells the coding agents what to build.\n\n## Installing the Google Agent Development Kit CLI\n\nThe ADK CLI is available via pip:\n\n```\npip install google-adk\n```\n\nVerify the install:\n\n```\nadk --version\n```\n\nYou should see the version number printed. If you get a “command not found” error, make sure your virtual environment is active and your Python environment’s `bin`\n\ndirectory is in your `PATH`\n\n.\n\nThe ADK CLI has a small set of focused commands:\n\n| Command | What it does |\n|---|---|\n`adk create` | Scaffolds a new agent project |\n`adk run` | Runs the agent locally in the terminal |\n`adk web` | Opens a browser-based chat UI for testing |\n`adk eval` | Runs evaluation test cases against the agent |\n`adk deploy` | Deploys the agent to Google Cloud |\n\nThat’s it. The simplicity is intentional — ADK tries to stay out of your way until you actually need it.\n\n## Scaffold Your Agent Project\n\nRun the create command to generate a project skeleton:\n\n```\nadk create my-agent\n```\n\nYou’ll be prompted to choose:\n\n- A\n**model**— typically a Gemini model via Vertex AI, though you can configure other backends - A\n**template**— options include a basic agent, a multi-tool agent, or a multi-agent setup\n\nFor a first deploy, choose the basic single-agent template. The CLI generates a directory with this structure:\n\n```\nmy-agent/\n├── agent.py          # Main agent logic\n├── tools.py          # Tool definitions\n├── eval/             # Evaluation test cases\n│   └── test_case_1.evalset.json\n├── requirements.txt\n└── .env\n```\n\nThe `.env`\n\nfile holds your project configuration:\n\n```\nGOOGLE_CLOUD_PROJECT=your-project-id\nGOOGLE_CLOUD_LOCATION=us-central1\nGOOGLE_GENAI_USE_VERTEXAI=TRUE\n```\n\nSet these values before moving on. The `GOOGLE_CLOUD_LOCATION`\n\ndefaults to `us-central1`\n\n— use whatever region is closest to your users or already in use for your project.\n\n## Use Claude Code to Build the Agent Logic\n\nThis is where the workflow gets efficient. Open the scaffolded project in Claude Code:\n\n```\ncd my-agent\nclaude\n```\n\nClaude Code will index your project and give you a chat interface to work from. From here, you can describe what you want the agent to do, and Claude will write the implementation directly into your files.\n\n### Example Prompt\n\nSay you want to build a support triage agent that classifies incoming tickets and routes them to the right team. You’d prompt Claude something like:\n\n```\nRead agent.py and tools.py. I want this agent to:\n1. Accept a customer support message as input\n2. Classify it as billing, technical, or general\n3. Summarize the issue in one sentence\n4. Return the category and summary as structured output\n\nWrite the agent logic and any tools needed.\n```\n\nClaude Code will:\n\n- Read the existing files for context\n- Write the agent loop in\n`agent.py`\n\n- Add any classification tools to\n`tools.py`\n\n- Update\n`requirements.txt`\n\nif it pulls in new dependencies\n\nYou don’t need to specify the exact Vertex AI API syntax — Claude knows it. And because it’s editing the actual files, you can review the diff, ask for changes, and iterate in plain language.\n\n### Iterating with Claude Code\n\nA few prompts that tend to work well during agent development:\n\n`\"Add input validation that rejects empty messages\"`\n\n— Claude adds guard logic to the agent`\"Rewrite the classification tool to use few-shot prompting with these examples: [examples]\"`\n\n— Claude refactors the specific function`\"Add error handling for Vertex AI timeout errors\"`\n\n— Claude wraps the API call in proper try/except logic\n\n## Remy doesn't build the plumbing. It inherits it.\n\nOther agents wire up auth, databases, models, and integrations from scratch every time you ask them to build something.\n\nRemy ships with all of it from MindStudio — so every cycle goes into the app you actually want.\n\nThis loop — scaffold, describe intent, review output, refine — typically gets a working agent in 20–40 minutes for a moderately complex task.\n\n## Test Locally Before Deploying\n\nOnce the agent logic looks right, run it locally:\n\n```\nadk run my-agent\n```\n\nThis starts the agent in the terminal and lets you send messages directly. It’s a quick sanity check that the code runs without errors before you spin up the web UI.\n\nFor a more interactive testing experience:\n\n```\nadk web\n```\n\nThis opens a browser-based chat interface at `localhost:8000`\n\n. You can send test messages, see the agent’s responses, inspect the full reasoning trace, and check what tool calls were made in each turn.\n\nThe web UI is useful for catching issues that don’t show up in basic terminal testing — things like multi-turn context handling, tool output formatting, and edge cases in the classification logic.\n\n## Run Evaluations Against Test Cases\n\nThe ADK CLI includes a built-in evaluation system. The `eval/`\n\ndirectory created during scaffolding holds `.evalset.json`\n\nfiles — structured test cases that define an input and the expected output.\n\n### Writing an Eval Set\n\nA test case file looks like this:\n\n```\n[\n  {\n    \"name\": \"billing_classification\",\n    \"input\": \"I was charged twice for my subscription this month\",\n    \"expected\": {\n      \"category\": \"billing\",\n      \"summary\": \"Customer reports a duplicate charge for their subscription\"\n    }\n  },\n  {\n    \"name\": \"technical_classification\",\n    \"input\": \"My dashboard keeps showing a 500 error when I try to log in\",\n    \"expected\": {\n      \"category\": \"technical\",\n      \"summary\": \"Customer is experiencing a 500 error on login\"\n    }\n  }\n]\n```\n\nYou can write these by hand, or prompt Claude Code to generate a set of test cases based on the agent’s expected behavior.\n\n### Running the Evaluations\n\n```\nadk eval my-agent eval/test_cases.evalset.json\n```\n\nThe CLI runs each test case, compares the output against expected values, and prints a pass/fail report. For structured output agents, it checks exact field matching. For free-text agents, it uses an LLM-based judge to score response quality.\n\nEval scores give you a baseline before deploy. If something breaks in a future update, running the same eval set will tell you immediately.\n\n## Deploy to Google Cloud\n\nOnce local tests and evals pass, deployment is one command:\n\n```\nadk deploy cloud_run \\\n  --project your-project-id \\\n  --region us-central1 \\\n  --service-name my-agent\n```\n\nWhat this does behind the scenes:\n\n- Builds a Docker container from your agent code\n- Pushes the container to Artifact Registry\n- Deploys it as a Cloud Run service\n- Returns the public URL for the agent endpoint\n\nThe entire process typically takes 3–6 minutes on the first deploy. Subsequent deploys are faster because the base layers are already cached.\n\n### Deployment Output\n\nAfter a successful deploy, you’ll see something like:\n\n```\n✓ Building container image...\n✓ Pushing to Artifact Registry...\n✓ Deploying to Cloud Run...\n\nService URL: https://my-agent-xxxx-uc.a.run.app\n```\n\nYour agent is now accessible via HTTPS. Send a POST request to the `/run`\n\nendpoint with your input payload, and the agent responds.\n\n### Vertex AI Agent Engine (Alternative Deployment Target)\n\nFor teams that want tighter integration with Google’s managed agent infrastructure, you can also deploy to Vertex AI Agent Engine:\n\n```\nadk deploy vertex_ai \\\n  --project your-project-id \\\n  --region us-central1 \\\n  --display-name \"Support Triage Agent\"\n```\n\nThis deploys the agent to Vertex AI’s managed runtime, which handles autoscaling, monitoring, and integration with other Vertex AI services like evaluation pipelines and model monitoring. It’s a better fit for enterprise deployments that need audit logging and VPC controls.\n\n## Common Issues and How to Fix Them\n\n### Authentication Errors on Deploy\n\nIf you see `Permission denied`\n\nor `403`\n\nerrors during deployment, check that your active gcloud account has the right IAM roles:\n\n```\ngcloud projects add-iam-policy-binding your-project-id \\\n  --member=\"user:you@email.com\" \\\n  --role=\"roles/run.admin\"\n```\n\nYou’ll also need `roles/artifactregistry.writer`\n\nand `roles/cloudbuild.builds.editor`\n\nfor the full deploy pipeline.\n\n### Vertex AI Quota Errors\n\nNew GCP projects have default quota limits on Vertex AI requests per minute. If your agent hits these limits during testing, request a quota increase in the Google Cloud Console under **IAM & Admin → Quotas**.\n\n### Cold Start Latency on Cloud Run\n\nCloud Run scales to zero by default, meaning the first request after a period of inactivity incurs a cold start (typically 2–5 seconds). If that’s unacceptable for your use case, set a minimum instance count:\n\n```\ngcloud run services update my-agent \\\n  --min-instances=1 \\\n  --region us-central1\n```\n\nThis keeps one instance warm at all times. It adds a small ongoing cost but eliminates the cold start.\n\n### Agent Returns Unexpected Output Format\n\nIf the agent’s output doesn’t match your expected schema, check whether the output schema is defined in `agent.py`\n\n. ADK supports Pydantic models for structured output — passing the model class to the agent constructor enforces the schema at runtime and raises clear validation errors instead of silently returning malformed data.\n\n## Where MindStudio Fits in This Workflow\n\nThe ADK CLI is a solid path for developers who want full control over their agent’s logic and infrastructure. But there’s a meaningful gap it doesn’t cover: what happens after the agent is deployed?\n\nMost deployed agents don’t live in isolation. They need to trigger emails, write to spreadsheets, update CRM records, post to Slack, or feed into other workflows. Wiring all of that up manually — API by API — adds significant development overhead on top of the deployment work you’ve already done.\n\nThis is where [MindStudio](https://mindstudio.ai) fills in. MindStudio’s Agent Skills Plugin is an npm SDK that gives any AI agent — including agents deployed via ADK — access to 120+ pre-built capabilities as simple method calls:\n\n```\nawait agent.sendEmail({ to: \"team@company.com\", subject: \"Triage result\", body: summary });\nawait agent.updateAirtableRecord({ tableId: \"...\", recordId: \"...\", fields: { status: category } });\nawait agent.postSlackMessage({ channel: \"#support\", message: `New ticket classified: ${category}` });\n```\n\nThe plugin handles auth, rate limiting, and retries — the infrastructure layer that nobody wants to build twice. Your agent focuses on reasoning; MindStudio handles the plumbing.\n\nFor teams that don’t need custom GCP infrastructure at all, MindStudio’s visual builder lets you [build and deploy AI agents](https://mindstudio.ai) without writing code. The average build takes 15 minutes to an hour, and you get access to 200+ models and 1,000+ integrations out of the box. For use cases where you need agents to [automate multi-step business workflows](https://mindstudio.ai/blog/ai-workflow-automation) — not just return structured output — it’s often the faster path.\n\nYou can try MindStudio free at [mindstudio.ai](https://mindstudio.ai).\n\n## FAQ\n\n### What is the Google Agent Development Kit (ADK)?\n\nThe Google Agent Development Kit is an open-source Python framework and CLI for building, testing, and deploying AI agents. It provides a standardized project structure, a local testing environment, a built-in evaluation system, and deployment integrations with Google Cloud Run and Vertex AI Agent Engine. It’s designed to reduce the boilerplate involved in getting an agent from prototype to production on GCP.\n\n### Do I need to use Gemini models with the ADK CLI?\n\nNo. While ADK defaults to Gemini models via Vertex AI, it supports other model backends through LiteLLM and custom model wrappers. You can configure it to use Claude models from Anthropic or OpenAI models, though you’ll need to handle API key configuration and any GCP-specific auth separately. The default Gemini integration is the most streamlined path because it uses your existing GCP credentials.\n\n### How does Claude Code help with agent development?\n\nClaude Code is a terminal-based AI coding agent that reads and edits your local files. In the context of ADK development, it’s useful for writing the agent logic, defining tools, generating evaluation test cases, and debugging issues — all through a conversational interface rather than by writing code from scratch. Because Claude Code understands the full file context of your project, it can make changes that are consistent with your existing code structure.\n\n### What’s the difference between deploying to Cloud Run vs. Vertex AI Agent Engine?\n\nCloud Run is a general-purpose container runtime. It’s flexible, fast to deploy, and cost-effective for most workloads. Vertex AI Agent Engine is Google’s managed runtime specifically for AI agents — it offers tighter integration with Vertex AI’s model monitoring, evaluation pipelines, and enterprise security controls (VPC Service Controls, audit logging, IAM-based access). For most teams starting out, Cloud Run is the right choice. Vertex AI Agent Engine makes more sense when you need enterprise compliance features or deep integration with the Vertex AI ecosystem.\n\n### How do I update a deployed agent?\n\nModify your local code, run `adk eval`\n\nto confirm the changes don’t break existing test cases, then re-run the deploy command:\n\n```\nadk deploy cloud_run \\\n  --project your-project-id \\\n  --region us-central1 \\\n  --service-name my-agent\n```\n\nCloud Run handles the rollout automatically and keeps the previous revision available for rollback if needed.\n\n### Can I build multi-agent systems with the ADK CLI?\n\nYes. ADK supports multi-agent architectures where one orchestrator agent routes tasks to specialized sub-agents. The `adk create`\n\nscaffolding includes a multi-agent template that sets up the basic structure. You can also connect agents built with ADK to [multi-agent workflows](https://mindstudio.ai/blog/multi-agent-workflows) hosted on other platforms via API calls or webhook triggers.\n\n## Key Takeaways\n\n- The Google ADK CLI gives you a complete scaffold-to-deploy workflow for AI agents on GCP, with commands for creating, running, evaluating, and deploying agents.\n- Pairing the ADK CLI with Claude Code cuts development time significantly — describe what you want in plain language and Claude writes the implementation directly into your project files.\n- Evaluations should run before every deploy. The\n`adk eval`\n\ncommand makes this easy and gives you a regression baseline you can reuse. - Cloud Run is the right default deployment target for most teams. Vertex AI Agent Engine is worth considering when you need managed infrastructure, enterprise security controls, or tight integration with other Vertex AI services.\n- Once your agent is deployed, connecting it to the rest of your business stack — email, CRM, messaging, databases — is the next challenge. MindStudio’s Agent Skills Plugin and no-code builder are both worth looking at for that layer.\n\n## Remy doesn't write the code. It manages the agents who do.\n\nRemy runs the project. The specialists do the work. You work with the PM, not the implementers.\n\nIf you’re building agents and want to skip the infrastructure work entirely, [MindStudio](https://mindstudio.ai) lets you go from idea to working agent in a fraction of the time.", "url": "https://wpnews.pro/news/how-to-deploy-ai-agents-to-google-cloud-using-the-google-agent-cli", "canonical_source": "https://www.mindstudio.ai/blog/deploy-ai-agents-google-cloud-agent-cli/", "published_at": "2026-06-11 00:00:00+00:00", "updated_at": "2026-06-11 23:03:30.410280+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "ai-infrastructure", "mlops", "artificial-intelligence"], "entities": ["Google Cloud", "Google Agent CLI", "Claude Code", "Google Agent Development Kit", "Vertex AI", "Cloud Run", "Artifact Registry", "Cloud Build"], "alternates": {"html": "https://wpnews.pro/news/how-to-deploy-ai-agents-to-google-cloud-using-the-google-agent-cli", "markdown": "https://wpnews.pro/news/how-to-deploy-ai-agents-to-google-cloud-using-the-google-agent-cli.md", "text": "https://wpnews.pro/news/how-to-deploy-ai-agents-to-google-cloud-using-the-google-agent-cli.txt", "jsonld": "https://wpnews.pro/news/how-to-deploy-ai-agents-to-google-cloud-using-the-google-agent-cli.jsonld"}}