The Agent: Models, Modes & Settings

Understand how the AI agent works, available models, and how to configure its behavior

How the Agent Works

The Antigravity agent is not just a chatbot. It’s an autonomous coding agent that can:

  • Read your entire codebase and understand project structure
  • Write code across multiple files simultaneously
  • Execute terminal commands (with your approval)
  • Browse the web to research solutions
  • Test your changes by running builds and tests
  • Learn from your project’s patterns via knowledge items

The agent operates in a loop: Observe → Think → Act → Verify. It reads context, plans its approach, takes actions, and checks results.

Available Models

Antigravity supports multiple AI models, each with different strengths:

ModelBest ForSpeed
Gemini 3 ProComplex reasoning, architecture decisionsMedium
Gemini 3 FlashQuick edits, simple tasksFast
Claude Sonnet 4.5Nuanced code generation, thorough analysisMedium
Claude Opus 4.5 (thinking)Deep reasoning, complex multi-step tasksSlower
GPT-OSSAlternative option from OpenAIMedium

You can switch models mid-conversation. Use faster models for simple tasks and more powerful models for complex architecture work.

Practical tip: Start with Gemini 3 Pro for most tasks. Switch to Claude Opus 4.5 when you need deep analysis or complex refactoring.

Agent Modes

The agent adapts its behavior based on the task phase:

PLANNING Mode

The agent researches your codebase, understands requirements, and creates an implementation plan before writing any code.

You: "Add authentication to my Next.js app"

Agent (PLANNING):
1. Reads existing auth setup
2. Analyzes project structure
3. Creates implementation_plan.md
4. Asks you to review before proceeding

EXECUTION Mode

The agent writes code, makes changes, and runs commands to implement the plan.

Agent (EXECUTION):
1. Creates auth middleware
2. Adds login/register pages
3. Updates database schema
4. Installs dependencies

VERIFICATION Mode

The agent tests changes, validates correctness, and creates a walkthrough document.

Agent (VERIFICATION):
1. Runs build to check for errors
2. Executes tests
3. Takes screenshots if UI changes
4. Creates walkthrough.md with results

Settings That Matter

Safe to Auto-Run

Controls whether the agent can execute commands without asking. By default, potentially destructive commands require your approval.

Recommended: Keep this conservative. Let the agent auto-run safe commands (like ls, cat) but require approval for installs and deletions.

Strict Mode

When enabled, the agent follows your instructions more literally and makes fewer autonomous decisions. Useful when you want precise control.

Sandboxing

Isolates the agent’s file system access. Useful when working with sensitive code or testing experimental changes.

Real-World Example: Configuring for a New Project

Here’s how I configure Antigravity when starting a new project:

1. Set model to Gemini 3 Pro (good balance)
2. Enable Strict Mode for initial setup
3. Create a GEMINI.md with project rules
4. Let the agent read the codebase first
5. Switch to normal mode for development

The key insight: the agent gets better as it learns your project. The first few interactions might need more guidance, but once it understands your patterns, it becomes incredibly productive.

What’s Next

Now that you understand the agent, let’s learn how to customize its behavior with Rules and Workflows — the key to making Antigravity work exactly the way you want.