DEV Community

Cover image for What is Google Agents CLI? Full Beginner Guide
Vladislav Guzey
Vladislav Guzey

Posted on

What is Google Agents CLI? Full Beginner Guide

Google recently released the Agentic CLI, a powerful tool that makes building, testing, and deploying AI agents faster and more intuitive. I think it’s super useful, so I'll walk you through the entire lifecycle of an AI agent using the CLI.

What is the Google Agents CLI?

Before we dive into the code, let’s understand the “why.” Usually, building an AI agent requires a lot of “glue code”, the messy scripts that connect an LLM (Large Language Model) to external tools or databases.

What is the Google Agents CLI

The Agents CLI removes this friction. Agents CLI is an official Google tool for creating, evaluating, and deploying agents built with Google’s Agent Development Kit (ADK). It acts as the programmatic backbone of the Agent Development Lifecycle (ADLC) on Google Cloud.

Skills packaged for agents

Agents CLI bundles seven “skills” that teach coding agents how to perform each step of the ADLC:

Skills packaged for agents

Your coding agent can call these skills directly once installed. Alternatively, a human developer can run the same commands manually (see “Human Mode” below).

How to Install Google Agents CLI?

To get started, you need a clean environment. The CLI relies on a few modern web and data tools. Follow these steps to ensure everything is ready:

Prerequisites

  • Python & PIP: The backbone of most AI development.
sudo apt install python3 python3-pip
Enter fullscreen mode Exit fullscreen mode
  • Node.js & NPM: Required for the CLI’s interface and deployment features.
sudo apt install nodejs npm
Enter fullscreen mode Exit fullscreen mode
  • UV: A lightning-fast Python package installer that the Agents CLI uses under the hood.
pip install uv
Enter fullscreen mode Exit fullscreen mode

Installation Steps

Create a Virtual Environment: It is always a good idea to keep your projects separate so they don’t interfere with each other.

python -m venv agent-env  
source agent-env/bin/activate  # On Windows use `agent-env\Scripts\activate`
Enter fullscreen mode Exit fullscreen mode

The CLI is distributed through uv:

uvx google-agents-cli setup
Enter fullscreen mode Exit fullscreen mode

The CLI supports macOS and Linux; native Windows is currently unsupported (use WSL 2 instead).

Authentication

Agents CLI picks up your credentials automatically if you are already authenticated with the gcloud CLI. When running locally without gcloud, you can set a Gemini API key:

export GEMINI_API_KEY="your‑key"
Enter fullscreen mode Exit fullscreen mode

For detailed authentication scenarios (service accounts, A2A roles etc.) refer to the Authentication guide. The important point is that your coding agent inherits whatever credentials your shell has; you do not need to embed secrets in code.

Building Your First “Weather” Agent

The fastest way to learn is by doing. The CLI comes with a “boilerplate” or template system to get you moving in seconds.

Run the following command in your terminal:

agent-cli create my-first-agent  
cd my-first-agent
Enter fullscreen mode Exit fullscreen mode

Install Dependencies

Inside your new project folder, you need to install the specific libraries required for this agent:

agent-cli install
Enter fullscreen mode Exit fullscreen mode

The Playground

One of the best features of this CLI is the Playground. Instead of testing your agent in a black-and-white terminal, you can launch a local web interface.

agent-cli playground
Enter fullscreen mode Exit fullscreen mode

Once you run this, you’ll get a local URL (usually http://127.0.0.1:8000). Open it in your browser, select your agent from the menu, and start chatting. By default, this agent is configured to handle weather requests.

The Playground

When you are ready to evaluate, call:

agents-cli eval run
Enter fullscreen mode Exit fullscreen mode

Deploy AI Agents

When you run agent-cli deploy, you usually have two choices:

  1. Cloud Run: This treats your agent like a standard web application. It’s great if you want total control over the server.
  2. Agent Runtime: This is a specialized environment built specifically for AI. It handles things like Memory (remembering what the user said earlier) and Orchestration (managing multiple agents working together) automatically.

The Deployment Process

  1. Ensure you have a Google Cloud Project set up.
  2. Enable billing in the Cloud Console.
  3. Run the command:
# Deploy to the configured target (Agent Runtime, Cloud Run or GKE)  
agents-cli deploy
Enter fullscreen mode Exit fullscreen mode

If you want to register your agent with Gemini Enterprise, run this command:

# Register your deployed agent with Gemini Enterprise  
agents-cli publish gemini-enterprise
Enter fullscreen mode Exit fullscreen mode

It allows you to use your agent directly from https://gemini.google.com/

Almost all commands accept flags such as --project--region--datastore--cicd-runner and --deployment-target so that you can customize the environment. Use agents-cli --help the CLI reference for full details.

Agents CLI Key Commands Cheat Sheet

  • agent-cli setup Installs the core environment
  • agent-cli create [name] Starts a new agent project
  • agent-cli playground Launches the web testing interface
  • agent-cli eval run Checks if your agent is performing correctly
  • agent-cli deploy Pushes your agent to Google Cloud

Building an agent with your coding assistant

After installation, open your coding assistant (Codex, Claude Code, Gemini CLI, or Copilot) and verify that the Agents CLI skills are visible:

/skills
Enter fullscreen mode Exit fullscreen mode

Building an agent with your coding assistant

You should see google‑agents‑cli‑workflow and the other packaged skills. From there, you can instruct the agent using natural language. For example:

Build a support agent that answers questions from our docs
Enter fullscreen mode Exit fullscreen mode

Gemini CLI (or Claude Code, Codex, etc.) will call the CLI skills to scaffold the project, install dependencies, evaluate performance, and prepare deployment. This pattern works with any agent platform that supports skills installation.

If you're happy with the result, simply call deploy command and your agent will be live:

# Deploy to the configured target (Agent Runtime, Cloud Run or GKE)  
agents-cli deploy
Enter fullscreen mode Exit fullscreen mode

Video Tutorial: Agents CLI Explained

In this video, I’ll show you how to use Google Agents CLI to build, test, and deploy AI agents from scratch.

Watch on YouTube: Agents CLI Explained

Conclusion

Google’s new agent‑oriented CLIs demonstrate how the command line is becoming a universal interface for both human operators and AI agents. Agents CLI offers a comprehensive, officially supported pathway to turn ideas into production‑ready agents on Google Cloud.

Give it a shot and share with me what you build!

Cheers, proflead! ;)

Top comments (1)

Collapse
 
proflead profile image
Vladislav Guzey

Watch the full tutorial on YouTube: youtu.be/C-0DIcFVt4Q