Antigravity IDE Tutorials: Learn Agent-First Development Step by Step
Complete Antigravity IDE tutorial series. Learn how to use AI agents, write AGENTS.md rules, set up MCP servers, and master agentic workflows from beginner to advanced.
Antigravity IDE Tutorials: Learn Agent-First Development Step by Step
This is the complete Antigravity tutorial guide — a structured path from your first install to mastering advanced agentic workflows. Whether you're coming from VS Code, Cursor, or a traditional IDE, this tutorial series will get you productive in Antigravity fast.
Tutorial 1: Installation and First Launch
Install Antigravity
- Visit antigravity.google and download the installer for your OS
- Run the installer (Windows:
.exe, macOS:.dmg, Linux:.AppImageor.deb) - Launch Antigravity — it opens to the welcome screen
Import Your VS Code Settings (Optional)
On first launch, Antigravity offers to import from VS Code or Cursor:
- Extensions (those compatible with VS Code forks)
- Keybindings
- Themes and color schemes
- Workspace settings
Click Import from VS Code if you want a familiar starting environment.
Sign In with Google
Antigravity requires a Google account for Gemini access:
- Click Sign in with Google in the top-right corner
- Authenticate with your personal Gmail (not a Workspace account for best free tier access)
- Once signed in, the status bar shows your active model (Gemini Flash on the free tier)
Tutorial 2: Your First Agent Task
Agent mode is the core of Antigravity. Let's run your first task.
Open a Project
Open any existing project folder or create a new one:
File → Open Folder → [select your project]
Start an Agent Task
- Press
Ctrl+I(Windows/Linux) orCmd+I(macOS) to open the Agent panel - Type a task in natural language:
Add a function that validates email addresses using regex, with tests - Press Enter to submit
Watch the Agent Work
You'll see the agent:
- Plan — it lists the steps it will take
- Execute — it edits files, creating the function and test file
- Verify — it may run the tests automatically
- Report — it summarizes what it did and any issues
Review and Accept
The agent shows all file changes as a diff. Review each change:
- Click Accept to apply a change
- Click Reject to discard it
- Click Accept All to apply everything at once
Tip: You can edit the agent's proposed changes before accepting. Click any diff hunk to open an inline editor.
Tutorial 3: Writing an AGENTS.md File
AGENTS.md is one of Antigravity's most powerful features. It's a plain-text file in your project root that tells the agent how to behave in your specific codebase.
Create AGENTS.md
Create a file at the root of your project:
/your-project/AGENTS.md
Basic AGENTS.md Structure
# Project: [Your Project Name]
## Stack
- Language: TypeScript
- Framework: Next.js 14 (App Router)
- Styling: Tailwind CSS
- Database: PostgreSQL with Prisma ORM
## Code Style
- Use functional components, never class components
- Prefer `const` over `let`
- Use named exports, not default exports for components
- All functions must have explicit return types
## Testing
- Use Vitest for unit tests
- Test files live in `__tests__/` next to the file being tested
- Always run `npm test` after making changes
## What to Avoid
- Never modify `package-lock.json` directly
- Do not add `console.log` in production code
- Never hardcode environment variables
AGENTS.md Tips
Be specific about your stack. The more precise you are, the fewer wrong assumptions the agent makes.
Add "What to avoid" sections. These prevent the agent from doing things you'll need to undo.
Update it as your project evolves. AGENTS.md is a living document, not a one-time setup.
Tutorial 4: MCP Server Integration
Model Context Protocol (MCP) servers extend the agent with new tools. Here's how to set one up.
What MCP Servers Can Do
- Connect to databases and query data
- Interact with external APIs (GitHub, Linear, Slack)
- Read from filesystems the agent wouldn't normally access
- Run custom scripts and tools
Add an MCP Server
- Open Antigravity Settings (
Ctrl+,) - Navigate to Extensions → MCP Servers
- Click Add Server
For a filesystem MCP server:
{
"name": "filesystem",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/data"]
}
Using MCP in Agent Tasks
Once connected, the agent automatically uses MCP tools when relevant. You can also explicitly reference them:
Query the database for all users created in the last 7 days and generate a summary report
The agent will use your database MCP connection to run the query, then generate the report.
Tutorial 5: Multi-Model Development
Antigravity supports switching between AI models. Here's how to use this effectively.
Available Models
| Model | Best For | Cost | |---|---|---| | Gemini 3 Flash | Fast tasks, free tier default | Free (daily quota) | | Gemini 3.1 Pro | General coding, long context | AI Pro/Ultra plans | | Gemini 3 Deep Think | Complex reasoning | AI Ultra (full access) | | Claude Sonnet 4.6 | Balanced reasoning, refactoring | Your own API key | | Claude Opus 4.6 | Most capable Claude | Your own API key | | GPT-OSS-120B | Open-source option | Your own API key |
Switch Models
Click the model name in the status bar (bottom-right) to open the model picker.
Model Strategy
Use different models for different tasks:
- Gemini 3.1 Pro for most coding tasks (it's free and fast)
- Claude Sonnet 4.6 for complex architectural decisions or when you need careful reasoning
- GPT-4o as a tiebreaker when you want a second opinion
Add Your Own API Keys
To use Claude or GPT-4o without limits:
- Settings → Models → Custom API Keys
- Add your Anthropic key:
sk-ant-... - Add your OpenAI key:
sk-...
See the limits guide for more on bypassing the daily quota.
Tutorial 6: Terminal Agent Mode
Antigravity's agent can execute terminal commands autonomously — one of its most powerful and distinctive features.
Enable Terminal Agent
The agent can use the terminal by default. You can control this in the agent task panel with the "Allow terminal access" toggle.
Example: Full Stack Feature Build
Build a REST API endpoint for user registration:
- POST /api/users
- Validates email and password
- Hashes password with bcrypt
- Saves to database
- Returns JWT token
- Include integration tests
- Run the tests when done
The agent will:
- Create the route handler
- Write the validation logic
npm install bcrypt jsonwebtoken(runs in terminal)- Write the database query
- Write integration tests
- Run
npm testto verify
Terminal Safety
By default, the agent asks for confirmation before:
- Installing packages
- Deleting files
- Running destructive database operations
You can configure this in Settings → Agent → Terminal Permissions.
Tutorial 7: Browser Automation
Antigravity can open and interact with a browser window to test web applications.
Use Case: End-to-End Testing
Test the user registration flow:
1. Open the app at localhost:3000
2. Navigate to /signup
3. Fill in the form with test data
4. Submit and verify the success message
5. Check the database to confirm the user was created
The agent opens a controlled browser, performs each step, and reports what it found — including screenshots if something goes wrong.
Enable Browser Agent
- Settings → Agent → Browser Access: Enabled
- The agent now has access to a Chromium instance
Tutorial 8: Advanced Tips
Use Checkpoints
Before a large agent task, the agent automatically creates a git checkpoint. If the result isn't what you wanted:
Ctrl+Z (undo agent changes)
Or in the Agent panel: Revert to checkpoint.
Chain Multiple Tasks
You don't have to wait for one task to finish before starting another. Use the task queue:
- Submit task 1
- While it runs, type task 2 and press Enter
- Task 2 queues automatically
Use @file References
Mention specific files in your agent prompt:
Refactor @src/utils/auth.ts to use the new JWT library I installed
The @ syntax pins the agent to specific files, reducing the chance it touches the wrong thing.
Context Window Management
For very large codebases, use .antigravityignore (same syntax as .gitignore) to hide irrelevant files from the agent's context:
node_modules/
*.log
dist/
.next/
What to Learn Next
- Antigravity Nano Banana Guide — quick tasks without burning your quota
- AGENTS.md advanced patterns — team rules, multi-repo setups
- MCP server directory — available integrations
- Antigravity vs Cursor comparison — how it stacks up against alternatives
Antigravity's learning curve is shallow for VS Code users and steeper for those coming from traditional IDEs. The core shift is learning to describe what you want rather than how to implement it. Once that click happens, most developers find they never want to go back.