# Google Agents CLI: The Easiest Way to Build AI Agents

Google’s Agentic CLI helps you build, test, and deploy AI agents from the terminal. I’ll walk through those steps with an example agent.

Author: Vladislav Guzey
Published: 2026-04-28
Canonical: https://proflead.dev/posts/google-agents-cli-the-easiest-way-to-build-ai-agents/


<div class="videoWrapper">
  <iframe width="100%" src="https://www.youtube.com/embed/C-0DIcFVt4Q?si=IJAj1SlX4kDCq9iP" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</div>

Google’s [**Agentic CLI**](https://google.github.io/agents-cli/) helps you build, test, and deploy AI agents from the terminal. I’ll walk through those steps with an example agent.

## What is the Google Agents CLI?

Building an agent usually involves connecting a model to tools or databases. The CLI helps set up those connections so you can focus on the agent’s task.



![What is the Google Agents CLI](https://miro.medium.com/v2/resize:fit:700/1*wgO4MZvC6muY0MHZJyIwVQ.png)



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)](/posts/ai-agent-explained-google-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](https://miro.medium.com/v2/resize:fit:680/1*g1C6kBWLSFKFqIK5Q8V7Rg.png)



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.
```bash
sudo apt install python3 python3-pip
```
- **Node.js & NPM:** Required for the CLI’s interface and deployment features.
```bash
sudo apt install nodejs npm
```
- **UV:** A lightning-fast Python package installer that the Agents CLI uses under the hood.
```bash
pip install uv
```
### 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.
```bash
python -m venv agent-env  
source agent-env/bin/activate  # On Windows use `agent-env\Scripts\activate`
```
The CLI is distributed through [uv](https://docs.astral.sh/uv/):
```bash
uvx google-agents-cli setup
```
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**:
```bash
export GEMINI_API_KEY="your‑key"
```
For detailed authentication scenarios (service accounts, A2A roles etc.) refer to the [Authentication guide](https://google.github.io/agents-cli/guide/authentication/). 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:
```bash
agent-cli create my-first-agent  
cd my-first-agent
```
### Install Dependencies

Inside your new project folder, you need to install the specific libraries required for this agent:
```bash
agent-cli install
```
### 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.
```bash
agent-cli playground
```
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](https://miro.medium.com/v2/resize:fit:700/1*rH4eOBtC_jOSmZ0VvBrxkg.png)



When you are ready to evaluate, call:
```bash
agents-cli eval run
```
### 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:

```bash
# Deploy to the configured target (Agent Runtime, Cloud Run or GKE)  
agents-cli deploy
```
If you want to register your agent with Gemini Enterprise, run this command:

```bash
# Register your deployed agent with Gemini Enterprise  
agents-cli publish gemini-enterprise
```

It allows you to use your agent directly from [https://gemini.google.com/](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](https://google.github.io/agents-cli/cli/) 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:

```bash
/skills
```

![Building an agent with your coding assistant](https://miro.medium.com/v2/resize:fit:700/1*2j13uJ8DJIRedGLwi3Copg.png)



You should see `google‑agents‑cli‑workflow` and the other packaged skills. From there, you can instruct the agent using natural language. For example:
```bash
Build a support agent that answers questions from our docs
```
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:
```bash
# Deploy to the configured target (Agent Runtime, Cloud Run or GKE)  
agents-cli deploy
```
## 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.

<iframe width="560" height="315" src="https://www.youtube.com/embed/C-0DIcFVt4Q?si=IJAj1SlX4kDCq9iP" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>

**_Watch on YouTube:_** [**_Agents CLI Explained_**](https://youtu.be/C-0DIcFVt4Q)

## 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! ;)
