How to Use Google Antigravity CLI: Step by Step Guide for Dynamic Subagents
By Braincuber Team
Published on May 23, 2026
If you have ever wished you could hand off a messy dataset to a team of specialized assistants, one to clean it, one to analyze it, one to visualize it, and come back to a polished report, Google Antigravity 2.0 makes that possible from a single terminal command. Antigravity 2.0 is a standalone, agent-first platform that decouples intelligent agents from the IDE entirely. Its CLI makes the full power of that platform available directly from your terminal, with no desktop app required. In this complete tutorial, you will learn how to install the Antigravity CLI, authenticate with Google, and build an end-to-end multi-agent data pipeline from one simple prompt that produces an interactive HTML dashboard.
What You'll Learn in this Complete Tutorial:
- What changed in Antigravity 2.0 and where it fits in the broader Google AI ecosystem.
- How dynamic subagents work and why they matter for complex data workflows.
- How to install and authenticate the Antigravity CLI on any OS.
- Building an end-to-end multi-agent data pipeline from a single natural language prompt.
What's New in Google Antigravity 2.0
Google I/O 2026 marked a significant expansion of the Antigravity platform. It is no longer just a tool; it is a full ecosystem. Here is what launched and how each component fits into the broader Google AI landscape.
Antigravity 2.0 Desktop App
Unlike the original Antigravity IDE, Antigravity 2.0 is built agent-first from the ground up. It is a clean surface for interacting with agents, managing projects, and reviewing artifacts. It is available on macOS, Linux, and Windows.
| Feature | What It Does |
|---|---|
| Dynamic Subagents | The main agent spawns specialized subagents on the fly to tackle focused subtasks in parallel. |
| Async Task Management | Long-running operations run in the background without blocking the main agent or UI. |
| Projects | Agents are organized by project rather than repository, spanning multiple local folders. |
| Scheduled Tasks | Cron-style schedules trigger agents automatically for digests, health checks, and reports. |
| JSON Hooks | Intercept and customize agent behavior at lifecycle stages using simple JSON config files. |
| Live Voice Transcription | Mic input transcribes in real time using Gemini Audio models into clean prompts. |
Slash Commands Available
/goal
Runs autonomously until the task is complete without pausing for plan approval or intermediate confirmations.
/grill-me
The agent asks clarifying questions first before executing your request to align on the plan.
/schedule
Sets up a one-off or recurring invocation for automated task execution on a schedule.
/browser
Explicitly opts in for browser use, giving the agent permission to navigate the web.
Understanding Dynamic Subagents
In a single-agent setup, one agent handles everything sequentially. First it cleans the data, then it analyzes it, and finally it visualizes it. This has two problems. First, it is slow, and each step waits for the previous one to finish. Second, the agent's context window fills up with the full history of every step, which can degrade reasoning quality on later tasks.
Subagents solve both problems. The orchestrator agent receives your high-level goal and decides how to break it into subtasks. It then defines and spawns subagents, each focused on a single task, with its own isolated context window, and runs them in parallel. Once they finish, the orchestrator synthesizes the final output.
No Manual Subagent Definition Required
You do not define the subagents yourself. The CLI's orchestrator reasons about the task and decides the decomposition. You just provide the data and the goal.
Beginner Guide: Installing Antigravity CLI
Follow these steps to install and set up the Antigravity CLI on your machine. The same agent harness powers the desktop app, but the CLI is lightweight and scriptable, making it perfect for automation workflows.
Install the Antigravity CLI
Run the install command for your operating system. Antigravity CLI is available for macOS, Linux, and Windows.
macOS and Linux:
curl -fsSL https://antigravity.google/cli/install.sh | bash
Windows PowerShell:
irm https://antigravity.google/cli/install.ps1 | iex
Windows CMD:
curl -fsSL https://antigravity.google/cli/install.cmd -o install.cmd && install.cmd && del install.cmd
Authenticate with Google
Once installed, run agy in your terminal. Authenticate with a Google account or a GCP project. You will receive a secret key, which you add to your terminal to complete authentication. Set up your terminal theme and grant access to the required files.
agy
The CLI identifies itself as Antigravity CLI 1.0.0 and connects to Gemini 3.5 Flash (High) by default.
Prepare Your Project Folder
Create a project folder for your demo. No subdirectories, config files, or agent definitions are needed.
mkdir AntigravityDemo
cd AntigravityDemo
Add the Sample Dataset
Save the following dummy data as sales_raw.csv directly in your AntigravityDemo folder. It intentionally includes realistic data quality issues like missing values and a $999,999 outlier placeholder.
month,product,region,revenue,units_sold
2024-01,Laptop Pro,North,45200,38
2024-01,Wireless Earbuds,South,12300,205
2024-01,Mechanical Keyboard,East,8900,89
2024-02,Laptop Pro,North,47800,40
2024-02,Wireless Earbuds,South,,198
2024-02,Mechanical Keyboard,East,9100,91
2024-03,Laptop Pro,North,51200,43
2024-03,Wireless Earbuds,South,13100,218
2024-03,Mechanical Keyboard,East,,,
2024-04,Laptop Pro,North,999999,42
2024-04,Wireless Earbuds,South,13800,230
2024-04,Mechanical Keyboard,East,9600,96
2024-05,Laptop Pro,North,55100,46
2024-05,Wireless Earbuds,South,14200,237
2024-05,Mechanical Keyboard,East,10100,101
2024-06,Laptop Pro,North,57300,48
2024-06,Wireless Earbuds,South,14900,248
2024-06,Mechanical Keyboard,East,10500,105
Run the CLI with /goal Command
Open a terminal and run agy. Then ask Gemini to clean, analyze, and visualize your data using the /goal prefix, which tells the CLI to run the entire task to completion without pausing for plan approval.
/goal I have a sales dataset at /Users/yourname/Desktop/AntigravityDemo/sales_raw.csv.
Spin up multiple subagents to clean, analyze, and visualize it.
Produce a final HTML report and save all outputs in this folder.
Without the /goal prefix, the agent stops and asks, Do you want to proceed? before each significant step.
How the Subagent Pipeline Works
Once you submit the prompt, the orchestrator manages the end-to-end analytical workflow automatically. Here is a detailed breakdown of the five stages:
| Stage | What Happens |
|---|---|
| 1. Environment Profiling | The orchestrator lists permissions, reads the directory, loads the CSV, checks Python availability, and verifies required libraries. |
| 2. Planning and Subagent Definition | It creates an internal implementation plan and defines three subagents: data_cleaner, data_analyzer, and data_visualizer. |
| 3. data_cleaner Run | Fixes data quality issues, imputes missing values using product medians, and replaces the $999,999 outlier with a realistic median. |
| 4. Parallel Execution | Once cleaned data is ready, data_analyzer and data_visualizer run simultaneously to compute insights and generate charts. |
| 5. Final Assembly | The orchestrator confirms all files are present and assembles a fully self-contained HTML dashboard with no external dependencies. |
What the Generated Dashboard Looks Like
The generated dashboard is not a static page; it is a production-grade interactive UI. Its key features include:
Four KPI Cards
Total Revenue ($444,389), Total Units Sold (2,168), Top Product (Laptop Pro, 69.0% share), and Top Region (North).
Overview and Trends
Monthly revenue line chart and MoM performance table with color-coded growth rates.
Product and Region Insights
Regional donut chart along with a detailed product/region summary table with unit prices and revenue share.
Cleaned Dataset Table
Full cleaned data table with live search, column filtering, and sortable headers.
The dashboard also includes download buttons for the clean CSV and analysis JSON, plus a data quality and business audit notes section at the bottom explaining exactly what was cleaned.
Taking It Further
Here are some ideas to extend what you built:
- Automate with scheduled tasks: Add the
/schedulecommand to your prompt, and the pipeline re-runs automatically on a refreshed CSV. - Use /grill-me for more control: Prepend
/grill-meto your prompt if you want the CLI to ask clarifying questions before starting. - Embed via Managed Agents API: If you want this pipeline inside a web application, the Managed Agents API gives you the same subagent capabilities with a single API call.
- Google Workspace integration: The orchestrator can write the final report directly to Google Docs or distribute it via Gmail by simply adding it to the goal prompt.
Frequently Asked Questions
What is Google Antigravity 2.0 and how is it different from the original?
Antigravity 2.0 is a standalone, agent-first platform that decouples intelligent agents from the IDE entirely. Unlike the original, which was primarily a code editor with an agent sidebar, 2.0 orchestrates autonomous agents across projects with dynamic subagents and scheduled tasks.
What are dynamic subagents in Antigravity 2.0?
Dynamic subagents are specialized agents that the orchestrator defines and spawns on the fly to handle focused subtasks in parallel. You do not configure them yourself; the orchestrator reads your goal, decides the decomposition, and creates subagents with isolated context windows.
What is the Antigravity CLI and how does it relate to Gemini CLI?
The Antigravity CLI (invoked as agy) is the successor to Gemini CLI. It delivers the same agent harness in a lightweight, scriptable terminal interface, adding support for parallel subagents, slash commands like /goal and /schedule, and Gemini 3.5 Flash by default.
What model does Antigravity CLI use by default?
By default, the CLI connects to Gemini 3.5 Flash (High), which runs four times faster than other frontier models while outperforming Gemini 3.1 Pro across nearly all benchmarks.
Is Antigravity CLI free to use during the preview period?
During the current preview period, Antigravity CLI comes with generous rate limits at no cost, similar to how Gemini CLI was initially offered. For production workloads, you can connect it to a billing-enabled GCP project.
Need Help Building AI Workflows?
Our experts can help you integrate AI-powered data pipelines, automate your analytics, and deploy dynamic subagents for your business using the latest Google AI tools.
