0Pricing

Google Agents CLI: Build, Evaluate, and Deploy AI Agents on Google Cloud From Your Terminal

Google Agents CLI transforms your coding assistant into an AI agent expert. Learn how to create, test, and deploy production-ready AI agents on Google Cloud using natural language commands.

C
CoddyKit Team · 6 min read · 1,211 words
Google Agents CLI: Build, Evaluate, and Deploy AI Agents on Google Cloud From Your Terminal
Quick Answer: Google Agents CLI is an open-source command-line tool that turns any AI coding assistant into an expert at building, evaluating, and deploying AI agents on Google Cloud. It provides standardized skills, best practices, and automated workflows for creating production-ready agents using Vertex AI, Cloud Run, and other Google Cloud services.

AI agents are everywhere, but building production-ready ones that actually work in the real world? That's still hard. You need to handle tool calling, state management, error recovery, evaluation, deployment, monitoring, and a dozen other things that can go wrong.

Enter Google Agents CLI — an open-source toolkit that just crossed 3,800+ GitHub stars and is climbing fast. It's Google's answer to the "how do I actually build agents that don't break" problem, and it's designed to work with your existing coding assistant (Claude Code, Codex, Cursor, you name it).

What Is Google Agents CLI?

Google Agents CLI is a Python-based command-line framework that gives your AI coding assistant deep expertise in building Google Cloud-native AI agents. Think of it as a "skill pack" that teaches your assistant:

  • How to structure agent architectures that scale
  • Best practices for Vertex AI Agent Builder
  • Automated evaluation and testing workflows
  • One-command deployment to Cloud Run and Cloud Functions
  • Monitoring and observability patterns

Instead of spending weeks figuring out Google Cloud's agent ecosystem, you get battle-tested patterns and automated tooling right from your terminal.

Core Features That Matter

1. Skill-Based Architecture

The CLI organizes agent development into reusable "skills" — modular components that handle specific agent capabilities. Each skill includes:

from agents_cli import Skill, Tool

class SearchSkill(Skill):
    name = "search"
    description = "Search and retrieve relevant information"
    
    tools = [
        Tool(
            name="web_search",
            function=perform_web_search,
            parameters={"query": "string", "max_results": "integer"}
        )
    ]
    
    def validate(self, context):
        return context.get("search_enabled", True)

Skills are composable, testable, and can be shared across projects. Need a search agent? Compose SearchSkill + SummarizeSkill. Need a support agent? Add TicketSkill + KnowledgeBaseSkill.

2. Automated Evaluation

The biggest pain point in agent development: how do you know your agent actually works? Google Agents CLI includes built-in evaluation frameworks:

# Run evaluation suite
agents-cli eval --suite=production-readiness --agent=my-support-agent

# Results:
# ✓ Tool calling accuracy: 94% (47/50)
# ✓ Response latency: avg 1.2s (target: <2s)
# ✓ Error recovery: 89% (17/19)
# ✓ Context retention: 92% (46/50)
# 
# Overall Score: 91/100 — Production Ready

Evaluations run against real Google Cloud services in your project, so you're testing production behavior, not mocks.

3. One-Command Deployment

Deploying agents to production usually means YAML files, IAM roles, API configurations, and a prayer. Google Agents CLI abstracts all that:

# Deploy to Cloud Run
agents-cli deploy --platform=cloud-run --region=us-central1

# What happens behind the scenes:
# ✓ Containerizes your agent
# ✓ Configures Vertex AI integration
# ✓ Sets up Cloud Logging and Monitoring
# ✓ Creates IAM service account with minimal permissions
# ✓ Deploys with autoscaling (1-10 instances)
# ✓ Configures Cloud Armor security policies
# 
# Deployed to: https://my-agent-xyz-uc.a.run.app
# Dashboard: https://console.cloud.google.com/run/...

Real-World Example: Building a Customer Support Agent

Let's walk through building a real agent from scratch. We'll create a customer support agent that can search a knowledge base, create support tickets, and escalate complex issues.

# Initialize new agent project
agents-cli init --name=customer-support --template=multi-tool

# This creates:
# customer-support/
# ├── skills/
# │   ├── knowledge_search.py
# │   ├── ticket_management.py
# │   └── escalation.py
# ├── agent.py
# ├── eval/
# │   └── test_cases.json
# └── agents.yaml

Now let's ask our coding assistant to implement the agent:

# agent.py (generated with agents-cli skills)
from agents_cli import Agent
from skills import KnowledgeSearch, TicketManagement, Escalation

agent = Agent(
    name="Customer Support",
    model="gemini-1.5-pro",
    skills=[KnowledgeSearch(), TicketManagement(), Escalation()],
    system_prompt="""You are a customer support agent for TechCorp.
    - Search the knowledge base before answering
    - Create tickets for issues you can't resolve
    - Escalate to human agents for: billing disputes, 
      technical issues >30min, or angry customers""",
    memory_type="conversation",
    max_turns=10
)

Test it locally with the CLI's interactive playground:

agents-cli play --agent=customer-support

> Customer: My login isn't working, I keep getting "invalid credentials"
> Agent: [Searching knowledge base for "invalid credentials login"]
> Agent: I found some information that might help. Here are the most common 
       solutions for login issues:
       1. Check caps lock is off
       2. Try resetting your password at techcorp.com/reset
       3. Clear browser cache and cookies
       
       Would you like me to create a support ticket if these don't work?

Run evaluations before deploying:

agents-cli eval --agent=customer-support --suite=customer-support-benchmark

# Testing 50 real customer scenarios...
# ✓ Knowledge base search accuracy: 96%
# ✓ Ticket creation success rate: 100%
# ✓ Escalation trigger accuracy: 94%
# ✓ Customer satisfaction score: 4.2/5
# 
# Ready for production deployment!

Deploy with one command:

agents-cli deploy --agent=customer-support --env=production

# Deployed! Your agent is live at:
# https://customer-support-abc123-uc.a.run.app
# 
# Monitor performance:
# https://console.cloud.google.com/monitoring/dashboards/agent-abc123

Key Benefits for Developers

  • Massive time savings — What used to take weeks of Google Cloud configuration now takes minutes
  • Production-ready patterns — Built on Google's own agent deployment best practices from thousands of customer deployments
  • Works with your stack — Compatible with Claude Code, Codex, Cursor, Gemini, and any AI coding assistant
  • Automated evaluation — Catch issues before they reach production with comprehensive testing suites
  • Cost optimization — Built-in resource monitoring helps you optimize Cloud Run instances and Vertex AI usage
  • Security by default — Minimal IAM permissions, Cloud Armor protection, and Secret Manager integration out of the box

Getting Started in 5 Minutes

# Install
pip install google-agents-cli

# Authenticate with Google Cloud
gcloud auth login
gcloud config set project my-project-id

# Create your first agent
agents-cli init --name=my-first-agent --template=simple
cd my-first-agent

# Test it
agents-cli play

# Deploy it
agents-cli deploy --platform=cloud-run

That's it. You've gone from zero to production agent in under 5 minutes.

FAQ

1. What AI models does Google Agents CLI support?

It supports all Vertex AI models including Gemini 1.5 Pro, Gemini 1.5 Flash, PaLM 2, and Codey. You can also bring your own models through Vertex AI Model Garden.

2. Do I need a Google Cloud account to use it?

Yes, you need a Google Cloud project for deployment and evaluation. However, you can use the CLI for local development and testing with the free tier (includes credit for new accounts).

3. Can I use it with non-Google cloud providers?

The CLI is optimized for Google Cloud, but the skill architecture is cloud-agnostic. You can deploy agents to any platform, though you'll lose some Google Cloud-specific optimizations.

4. How does it compare to LangChain or LlamaIndex?

Google Agents CLI focuses specifically on Google Cloud deployment and evaluation. It can work alongside LangChain/LlamaIndex — use them for agent logic, and Google Agents CLI for Google Cloud integration and deployment.

5. What's the learning curve?

If you're familiar with basic CLI tools and have a Google Cloud account, you can be productive in under an hour. The templates handle 90% of the complexity.

6. Is it free to use?

The CLI itself is open-source and free. You pay for the Google Cloud resources your agents use (Vertex AI, Cloud Run, etc.), but the free tier is generous enough for development and small-scale production.

7. Can I contribute to the project?

Absolutely! It's fully open-source on GitHub. The community is active, and Google engineers regularly review and merge contributions.

ProgrammingTutorialCoddyKit

Enjoyed this article?

Explore more tutorials and insights to level up your coding skills.

Browse All Articles →