# Run Antigravity CLI Inside Google Colab Free in 2026

- URL: https://aiaffer.com/2026/12/antigravity-cli-google-colab-free-2026/
- Published: 2026-12-05
- Updated: 2026-12-05


**Quick answers**

**Is Antigravity CLI really free inside Colab?**
Yes. Google says the CLI is built into every Colab runtime on every plan, including the free plan. The free plan gets Gemini 4 Hydrogen; the larger Gemini 4 models need a paid Google AI Pro or Ultra plan.

**How do I open it?**
Press Ctrl+Shift+P (Cmd+Shift+P on macOS) and pick Antigravity CLI, or open the terminal at the bottom of a notebook and type `agy`. First use asks for a Google sign-in.

**Can it edit my notebook?**
Yes. It runs on the same runtime as the kernel, so it sees the same files, installed packages, and GPU, and it can read, edit, and run notebook cells directly.

**What disappears when the runtime resets?**
Anything stored only in the runtime, including skills saved under `~/.gemini`. Keep skills in Google Drive or a GitHub repository, or they vanish with the runtime.

**Should I still install the CLI on my own machine?**
Only if the work needs files that live on that machine. For notebook work, the built-in CLI removes the install step entirely.

**Verification note.** Checked against Google's Colab announcement of December 2, 2026, and two independent hands-on reports dated December 3, 2026. Data cutoff: December 5, 2026. I did not run `agy` inside Colab for this article — the steps, version numbers, and model lists below come from Google's post and the hands-on reports, each attributed where it matters. The notebook-audit script in this article ran locally on my own machine against a sample notebook, and its output is quoted verbatim. No usage quota for Gemini 4 Hydrogen in Colab has been published by Google, so this article states no quota number.

## What Google shipped

On December 2, 2026, Google put the Antigravity CLI, `agy`, inside every Colab runtime. There is nothing to install. Open any notebook, launch the CLI, sign in once with a Google account, and an agent works beside the notebook on the same machine as the kernel.

That placement is the whole point. A coding agent that runs on a laptop can only touch files on that laptop. The Colab agent shares the runtime with the kernel, so it sees the same files, the same installed packages, and the same GPU. It can install a dependency, fix an environment error, watch a long training run, and write results back into notebook cells. Before this change, the way to get an agent near a Colab runtime was the Colab CLI from June 2026, which runs on a local machine and borrows a Colab runtime from outside. The new integration flips that around: the agent runs inside the runtime, next to the kernel, and needs no local machine at all.

Google's post lists the same feature set as the local CLI. Multi-agent `/swarm` runs work, as do plugins, skills, MCP servers, `AGENTS.md` rules, and approval settings. The sample notebook Google ships includes a `data-story` skill that turns a CSV into a one-page report, with each insight carrying its source rows and the math behind it. Google also says new Antigravity releases reach Colab through runtime updates, so the built-in CLI should track the local one over time.

![A data science notebook with charts and code cells on a laptop screen](/images/inbody/antigravity-cli-google-colab-free-2026-1.webp)

## How to open agy in a notebook

The launch takes under a minute once the notebook is open. Two paths lead to the same terminal:

1. Open any Colab notebook, or Google's Antigravity CLI sample notebook.
2. Press Ctrl+Shift+P on Windows or Linux (Cmd+Shift+P on macOS) and choose Antigravity CLI. Alternatively, open the terminal at the bottom of the page and type `agy`.
3. On first use, sign in with a Google account. Colab saves the `agy` settings to the account, so a later runtime on the same account picks them up again.

A hands-on run by Sulat found `agy` version 1.5.5 already installed at `/usr/local/bin/agy` on a default CPU runtime: 2 vCPUs (AMD EPYC 7B12), 12 GB of memory, a 108 GB disk, Ubuntu 24.04.5, and Python 3.13. That run used Gemini 4 Hydrogen at medium effort in headless mode with permissions skipped, a combination that suits a throwaway runtime. A separate hands-on by Classmethod launched `agy` on a T4 GPU runtime, confirmed a Tesla T4 with 15 GB of VRAM, and asked the agent to pick a lightweight text-generation model from Hugging Face that fits on a T4 and needs no token. The agent chose Qwen2.5-1.5B-Instruct, loaded it with Transformers, answered a question, and added a markdown cell explaining the choice plus the setup, inference, and GPU-memory code cells. Notebook edits went through a built-in `colab_notebook` skill with commands such as `add_text_cell`, `add_code_cell`, and `run_code_cell`.

Two details from those runs deserve attention. First, the model picker in the Classmethod run also listed Claude Opus 5.5 and Claude Sonnet 5.5. Google's own post does not mention Claude models for Colab, so treat that listing as a hands-on observation rather than a documented feature. Second, the Sulat run notes that model quota, Colab GPU time, and the temporary runtime are three separate limits. Hitting any one of them stops the work, even if the other two still have room.

## What the free plan actually gets

Model access follows the Google AI plan, not the Colab plan. The split is simple, and it is the first thing to check before planning a job:

| Plan | Models available in Colab |
|---|---|
| Colab Free | Gemini 4 Hydrogen |
| Google AI Pro | Gemini 4 Hydrogen, Carbon, Neon, Orchestrator |
| Google AI Ultra | Gemini 4 Hydrogen, Carbon, Neon, Orchestrator |

Gemini 4 Hydrogen is the capable mid-tier model in the Gemini 4 family, and it is the only one the free plan gets. Carbon and Neon are the larger models, and Orchestrator is the multi-agent coordination model. One hands-on report also lists Gemini 4 Argon, Gemini 3.8 Flash, and Gemini 3.1 Pro as visible in the picker, but none of those appear in Google's announcement, so this article does not count on them being available.

The practical consequence is that free-plan users get a real agent with a real frontier-class model, not a demo mode. Hydrogen handles the jobs Colab users actually delegate: cleaning a dataset, fixing a broken environment, writing a training loop, and explaining a result in a markdown cell. The jobs that need Carbon or Neon — very long reasoning chains, or the Orchestrator-led multi-agent runs at full strength — need a paid plan. For a first project, start on Hydrogen and let the failure mode decide the upgrade: if the agent stalls on reasoning depth rather than on runtime limits, a bigger model is the fix.

Pricing for the paid side is deliberately left out of this article. Google has not published a Hydrogen usage quota for Colab, and the Colab and Antigravity plans are billed separately, so a price table assembled from secondary sources would be guesswork. Check the live pricing pages before committing to a paid plan.

## A first job to hand agy

Google's own example for `/swarm` is an MNIST bake-off: one worker prepares the data, four train different models in parallel, and a last worker adds a leaderboard to the notebook. That example is a demo, not a benchmark — Google gives no timings and no costs for it. Even so, it shows the shape of a good first job: a task with a clear deliverable inside the notebook, parallel parts that do not depend on each other, and a final step that writes the result where the reader can see it.

![Four small robot workers assembling puzzle pieces together on a shared table](/images/inbody/antigravity-cli-google-colab-free-2026-2.webp)

A smaller first job works just as well and wastes less quota: ask `agy` to audit a notebook before editing it. The agent should count the cells, note which code cells never ran, and flag a missing summary. The script below does exactly that check with the standard library only, so it runs anywhere Python runs, including a Colab cell. It mirrors the audit step an agent should take before touching a notebook.

```python
"""Audit a Colab notebook the way agy would before editing it.

Reads a .ipynb file with the standard library only, counts cells by type,
and checks whether the notebook already carries a markdown summary cell.
Run: python3 notebook_audit.py <notebook.ipynb>
"""
import json
import sys


def audit(path):
    with open(path, encoding="utf-8") as f:
        nb = json.load(f)
    cells = nb.get("cells", [])
    code = [c for c in cells if c.get("cell_type") == "code"]
    md = [c for c in cells if c.get("cell_type") == "markdown"]
    executed = sum(1 for c in code if c.get("execution_count"))
    has_summary = any(
        "summary" in "".join(c.get("source", [])).lower() for c in md
    )
    return {
        "file": path,
        "total_cells": len(cells),
        "code_cells": len(code),
        "markdown_cells": len(md),
        "executed_code_cells": executed,
        "has_summary_cell": has_summary,
    }


if __name__ == "__main__":
    report = audit(sys.argv[1])
    for key, value in report.items():
        print(f"{key}: {value}")
```

I ran this script locally against a sample four-cell notebook — one markdown cell, three code cells, one of them executed — and it printed this output verbatim:

```text
file: sample_notebook.ipynb
total_cells: 4
code_cells: 3
markdown_cells: 1
executed_code_cells: 1
has_summary_cell: False
```

That output is the shape of a useful agent handoff: the notebook has three code cells, only one ever ran, and no summary cell exists yet. Handing that report to `agy` with the instruction "add the missing summary cell and run the two unexecuted cells" gives the agent a bounded job with a checkable result.

For a longer job, the `/swarm` pattern is worth copying even on the free plan. Break the task into a data-preparation step, several independent model or analysis steps, and one final step that writes the comparison into the notebook. The swarm coordinator tracks the workers on a shared board, and the final worker owns the leaderboard cell. Keep each worker's job small enough that a runtime reset loses minutes, not hours.

## The one setup job that matters: save skills before the runtime dies

Colab runtimes are temporary. That single fact causes more lost work with the built-in CLI than any model limitation. Skills saved under `~/.gemini` vanish when the runtime disconnects, and so does every package installed during the session and every file not saved elsewhere. Google's post says it plainly: keep skills in Drive or a GitHub repository.

The fix takes two steps. First, mount Drive from a notebook cell:

```python
from google.colab import drive
drive.mount('/content/drive')
```

Then, in the Colab terminal, move the skills folder to Drive and link it back so `agy` keeps finding skills at the usual path:

```bash
# Move skills to Drive so they survive runtime resets
mkdir -p /content/drive/MyDrive/colab-agy
mv ~/.gemini/skills /content/drive/MyDrive/colab-agy/skills
ln -s /content/drive/MyDrive/colab-agy/skills ~/.gemini/skills

# Confirm the link works
ls -l ~/.gemini/skills
```

Expected result: `ls` shows a symlink pointing at the Drive folder, and `agy` loads the same skills after a fresh runtime mounts the same Drive. The same trick works for a GitHub repository: clone the repo into Drive or into a mounted folder, and point the symlink at the cloned skills directory instead. I did not run these commands inside Colab for this article — Drive mounting only works in a Colab runtime — but the mount call and the symlink pattern are the standard Colab workflow documented by Google, and the skill directory `~/.gemini` is the path Google's own post names.

![A whiteboard being erased next to a cloud drive and a code folder](/images/inbody/antigravity-cli-google-colab-free-2026-3.webp)

Two habits follow from the same fact. Save notebooks to Drive early, not at the end of a session, because a runtime can disconnect while a long job is still running. And treat the agent's transcript as disposable: if a job matters, ask the agent to write its result into a notebook cell or a file on Drive before the session ends, rather than leaving the conclusion in chat history.

## Limits and alternatives

### Limits that still apply

The built-in CLI removes the install step and the local machine, but it changes nothing about Colab's own limits. Three of them matter most:

- **Runtime life.** A Colab runtime disconnects after idle time and has a maximum lifetime. Long training runs need checkpoints saved to Drive, because the agent cannot keep a dead runtime alive.
- **GPU availability.** Free-tier GPU access depends on availability and usage time. A T4 may not be there when the job starts, and the agent cannot conjure one.
- **Model quota.** Google has published no quota numbers for Gemini 4 Hydrogen in Colab. The sensible assumption is that heavy use hits a limit, and the article states no number because none exists in a Google source.

The CLI also inherits the usual agent risks. It runs shell commands with the notebook session's permissions, and it can install third-party packages. A throwaway runtime limits the blast radius, but a mounted Drive is not throwaway: keep sensitive Drive folders unmounted during agent sessions, or review the agent's commands before they run. The Sulat hands-on used `--dangerously-skip-permissions` for a disposable run; that flag is a convenience for a runtime that holds nothing valuable, not a default for real work.

### How it compares with the alternatives

For readers weighing the built-in CLI against the other ways to run an agent near Colab, the differences are about placement, not features:

| Setup | Where the agent runs | Install step | Notebook editing |
|---|---|---|---|
| Antigravity CLI in Colab | Inside the Colab runtime | None | Direct, same runtime |
| Colab CLI + local agent (June 2026) | Local machine, borrows a runtime | Local install | Through the CLI bridge |
| Antigravity CLI on a local machine | Local machine | Local install | Local files only |
| Colab MCP endpoint (Nov 2026) | External agent, runtime as a tool | None | Through MCP calls |

The built-in CLI wins whenever the work already lives in a notebook. The local CLI wins when the project lives on a local disk and only borrows Colab compute. The MCP endpoint suits an external agent that needs Colab as one tool among many. None of these replaces the others; the choice follows the location of the files.

Readers who want the cost side of Antigravity in detail should read [my earlier breakdown of Antigravity's AGENTS.md cost rules](/2026/11/antigravity-agents-md-cost-rules-2026/), which covers how agent instructions shape token spend. For a sense of what a local coding agent setup looks like when the model runs on local hardware instead, see [my guide to running Flint 1.1 locally in Claude Code](/2026/12/flint-1-1-claude-code-local-coding-2026/). And for a related sharp edge in agent tooling — descriptions getting silently cut off — see [my note on MCP tool description truncation](/2026/12/mcp-tool-description-truncation-2026/).

## Who this fits, and who should skip it

**A good fit:** data work that already happens in Colab — cleaning a messy CSV, debugging a training loop, comparing a few small models on a T4. Students and hobbyists on the free plan get a capable agent without paying for a model subscription or a local GPU. Teams that prototype in notebooks and hand results to a shared Drive also benefit, because the agent writes where the team already looks.

**A poor fit:** work that needs a persistent machine, a private codebase that must never leave a company laptop, or a GPU that must be there on demand. The free tier offers none of those guarantees. Long jobs that cannot checkpoint should not start in a runtime that can vanish. And anyone who needs the larger Gemini 4 models for reasoning depth should price a Pro or Ultra plan before assuming Hydrogen is enough.

## Verdict: 8/10

Google removed the two friction points that kept agents away from notebooks: the install and the local machine. What remains is a genuinely useful free-tier agent with a real model, a clear persistence chore, and Colab's familiar limits. The score loses two points for the unpublished Hydrogen quota and for the temporary-runtime trap that will catch every first-time user who saves a skill in the wrong place. Do the Drive setup first, start with a small audited job, and the free plan covers more real work than the announcement suggests.

---

*Full disclosure: This article contains no affiliate links. No link in this article earns me a commission. Model and feature claims are checked against Google's Colab announcement of December 2, 2026, and hands-on reports dated December 3, 2026; the notebook-audit script ran locally on my machine and its output is quoted verbatim. I did not run the Antigravity CLI inside Colab for this article.*

