When you start using Google Antigravity (AGY), the hardest part is rarely figuring out how to chat with it. It is usually these four questions:

  1. Google ships four surfaces at once (CLI, 2.0 desktop app, IDE, and Python SDK)—which one should you actually open every day?
  2. Why are config files split across .agents/, ~/.gemini/config/, and ~/.gemini/antigravity-cli/?
  3. Between Rules, Skills, Hooks, MCP, and Plugins, which ones actually matter on day one?
  4. When commands mention the Sandbox and approval rules, what gets blocked and what runs automatically?

This guide answers all four up front—skipping abstract theory in favor of the directory layout, practical trade-offs, and verified commands you will use daily.


1. Four Entry Points, One Shared Core

One of Antigravity’s best design choices is that all four surfaces run on the same Agent execution core (handling tool calls, context budgets, sandboxing, and extension loading) and share the same configuration. Here is the high-level architecture:

Google Antigravity (AGY) four-layer architecture overview

In daily work, each entry point has a clear role:

Surface What It Is When to Use It
agy CLI Terminal workhorse supporting both interactive TUI and -p non-interactive mode Daily coding, SSH sessions on remote servers, and CI scripts. Fastest startup—this is the primary focus of this series
Antigravity 2.0 Standalone Electron desktop app with multi-project switching, scheduled tasks, and right-hand auxiliary panels Monitoring multiple repositories at once, or inspecting background Subagents, Artifacts, and active terminals
Antigravity IDE AI-first editor forked from VS Code When you want Tab autocomplete (including multi-line diff predictions) and Cmd+I inline targeted edits while coding
Python SDK pip install google-antigravity for launching async Agents from Python Batch code reviews, automated evaluations, or programmatically intercepting thoughts and tool_calls

My recommendation: Do not install and learn all four on day one. If you already live in the terminal alongside Vim or VS Code, start with agy CLI alone. Once you need to juggle parallel repos, open Antigravity 2.0—project-level .agents/ and global ~/.gemini/config/ carry over automatically with zero duplicate setup.


2. How to Avoid Derailing: Run /plan Before Editing

The fastest way to burn time with a terminal coding agent is dumping a large feature request in one prompt, letting it edit a dozen files unchecked, discovering the design went off track at step one, and running git reset to start over.

Antigravity breaks complex tasks into four phases—Explore → Plan → Execute → Verify—anchored by the built-in /plan mode and Artifacts (structured documents such as implementation_plan.md and walkthrough.md):

In practice, two habits pay off far more than writing longer prompts:

  1. Run /plan whenever a change touches more than 3 files: Have the agent list which files it intends to modify, how it will change them, and how it plans to verify the result. Tweaking one line in a plan is ten times cheaper than reverting a sprawling diff.
  2. State the exact verification command up front: For example, “run pytest tests/api/ when done” or “verify yarn build exits cleanly.” Whenever there is a runnable local check, the agent closes the loop on most syntax errors and regressions on its own.

3. Directory Layout & What to Configure on Day One

Directory placement is the most common source of confusion when first reading the Antigravity docs. Memorize these three locations and everything else clicks into place:

  • Project-level (committed to Git, shared across the team): AGENTS.md / GEMINI.md and the .agents/ directory (also compatible with .agent/, _agents/, and _agent/). The agent walks upward from your current working directory to the Git root, automatically merging and deduplicating rules along the way.
  • User-global (shared across all local projects): ~/.gemini/config/ (global Rules, Skills, Hooks, MCP, and Plugins).
  • CLI settings: ~/.gemini/antigravity-cli/settings.json (default model, permissions, terminal behavior, etc.).

When configurations share the same name, precedence strictly follows: current project directory > explicit declarations in project skills.json/plugins.json > user-global ~/.gemini/config/ > built-in defaults.

Six Extension Mechanisms (Don’t Configure Them All at Once)

Mechanism Location / Filename When It Loads Practical Use Case
Rules AGENTS.md / GEMINI.md Auto-discovered; 24 KB per-file cap, shared 20,000 tokens budget (falls back to on-demand path pointers if exceeded) Repo structure notes, code style, communication language, and non-negotiable guardrails
Skills .agents/skills/<name>/SKILL.md On-demand (only name and a one-line description stay in context; full body and scripts/ load when matched) Reusable SOPs such as release checklists, test authoring, and PR submission
Hooks .agents/hooks.json Enforced by code at 6 lifecycle points (SessionStart / PreToolUse / PostToolUse / PreInvocation / PostInvocation / Stop) Blocking dangerous commands, running linters after edits, rewriting tool arguments (overwrite)
MCP mcp_config.json Connects at session startup; supports local Stdio and remote Streamable HTTP Connecting databases, Jira, Chrome DevTools, and internal APIs
Plugins .agents/plugins/<name>/plugin.json Loaded as a single bundle when enabled Packaging the four mechanisms above for cross-repo or team distribution
Multi-Agent Subagents / /swarm / run_workflow Triggered manually or automatically for research or multi-module tasks Isolating context and editing modules in parallel with inherit/branch/share workspaces

When you are unsure where a new rule or capability belongs, follow this decision flow:

Day-one trade-off: During your first week, stick to Rules—a concise AGENTS.md is plenty. Extract a workflow into a Skill only after you have repeated it three or more times. Reach for Hooks only when the model keeps forgetting a rule or when you need hard enforcement against destructive actions like dropping tables or force-pushing. Skip Plugins and Multi-Agent setups until you actually need them.


4. Sandbox & Permissions: Safety Without Approval Fatigue

Letting an agent run shell commands creates an obvious tension:

  • Grant unrestricted access, and you risk an accidental rm -rf or edits to host configs outside the repo.
  • Prompt for every command, and hitting Enter for every ls and git status quickly makes the tool unbearable.

Antigravity solves this in three layers: commands first pass through any configured PreToolUse Hook, then through the permissions rule engine (strict precedence: Deny > Ask > Allow), and finally execute inside an OS-native Terminal Sandbox (Linux Kernel Namespaces, macOS Seatbelt sandbox-exec). Inside the sandbox, writes are restricted to the active workspace and temporary cache, and network access is disabled by default. Safe local commands run automatically without interrupting you; the CLI only prompts when a command needs to leave the sandbox (installing packages over the network, pushing via SSH, or touching files outside the workspace).

Here is the full path of a command from model request to execution:

Four preset modes are available: Default (recommended: auto-run inside sandbox, ask outside), Auto (auto-allow common reversible commands outside the sandbox as well), Request Review (sandbox disabled, confirm every command), and Turbo (allow everything). Keeping Default globally and overriding only for trusted repos strikes the best balance.


5. Hands-On with agy CLI: Commands You Will Actually Use

Below is the verified output of agy --version and agy --help from agy v1.5.18 on Linux:

Local terminal capture of agy v1.5.18 --version and --help

The flag list looks long, but daily usage boils down to these four groups:

1. Daily Launch & Resuming Sessions

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Start in the project root
agy

# Continue the most recent conversation (shorthand for --continue)
agy -c

# Resume a previous session by conversation ID
agy -r <conversation-id>

# Launch directly in plan mode with higher reasoning effort
agy --mode plan --effort high

# Attach a related repository to context (repeatable)
agy --add-dir ../shared-proto

2. Scripting & CI Integration (Non-Interactive Mode)

1
2
3
4
5
6
7
# Run once and print the result directly without entering the TUI
agy -p "Inspect the diff of the current branch against main and list potential regression risks"

# Enforce a JSON Schema response for downstream parsing with jq or scripts
agy -p "Audit dependency risks in package.json" \
--output-format json \
--json-schema ./audit-schema.json

3. High-Leverage TUI Shortcuts & Slash Commands

  • @: Autocomplete file paths, directories, past conversations, rules, or MCP tools. Writing @src/router.ts uses fewer tokens and is far more reliable than copy-pasting code.
  • !: Prefix a line with ! to run a local shell command inline (such as !git status) without leaving the TUI.
  • /plan: Generate an implementation plan artifact first and wait for your approval before editing files.
  • /diff: Inspect the current diff directly in the terminal.
  • /compact: Manually compress conversation history once a session grows long.
  • /rewind / /fork: Roll back a misguided turn, or branch a new session from the current point to test an alternative approach.

4. Extension Management Subcommands

1
2
3
4
agy mcp list        # List connected MCP servers
agy plugin list # List installed plugins and enabled/disabled state
agy models # List available models
agy agents # List custom Agents

6. Coming from Claude Code? Here Is the Comparison Table

If you have used Claude Code before, almost every concept maps cleanly onto Antigravity:

Concept Claude Code Antigravity (AGY) Key Practical Difference
Project rules CLAUDE.md AGENTS.md / GEMINI.md AGY walks upward from cwd to the Git root and enforces a dedicated 20k-token rule budget
Project customization dir .claude/ .agents/ (also supports .agent/) Houses Rules, Skills, Hooks, and Plugins together
Global config ~/.claude/ ~/.gemini/config/ (extensions)
~/.gemini/antigravity-cli/ (CLI)
The extensions directory is shared across CLI, 2.0 desktop, and IDE
Skills .claude/skills/*/SKILL.md .agents/skills/*/SKILL.md Nearly identical authoring format with progressive on-demand loading
Hooks Configured in .claude/settings.json .agents/hooks.json AGY adds PreInvocation / PostInvocation events and argument overwrite
MCP config .mcp.json / settings.json ~/.gemini/config/mcp_config.json or inside plugins Supports Stdio and Streamable HTTP (drops legacy standalone SSE)
Plugin compatibility .claude-plugin/plugin.json plugins/<name>/plugin.json agy plugin import (local migration) and install (marketplace/repo install) can import Claude Code extensions directly
Multi-Agent Subagents / Teams Subagents + /swarm + run_workflow Native inherit/branch/share workspace isolation and Python workflow scripts

Two quick pitfalls to watch out for when migrating:

  1. All AGY Hook input and output JSON keys use camelCase (e.g., conversationId, transcriptPath, toolCall)—do not read them as snake_case.
  2. In native Antigravity plugins, hooks.json must live directly at the plugin root (<plugin>/hooks.json); placing it under a hooks/ subdirectory means the runtime will not discover it.

Series Navigation