You want to build a full-stack Next.js application, write the backend API, and run integration tests simultaneously, all without manually copying code blocks or paying a hundred dollars a month for multiple AI subscriptions. Google’s new Antigravity IDE, a free, agent-first VS Code fork, handles this by running autonomous agents directly inside your local development environment. It shifts AI coding from simple autocomplete to active execution, letting you orchestrate parallel agents that write, run, and debug code on their own.
By combining local execution sandboxes with multi-model routing, this editor changes how solopreneurs and small engineering teams scale their output. Here is how to configure Antigravity, orchestrate parallel agents, and optimize your model routing to keep your API bills low.
Antigravity Core Architecture
Most AI coding tools operate on a simple request-and-response loop. You highlight code, ask for a change, and accept or reject the diff. This breaks at scale when you need to refactor multiple files or debug complex runtime errors.
Antigravity operates differently. It is built around an agent-first architecture where the AI has direct, permissioned access to a local bash terminal, the file system, and a testing harness. Instead of waiting for your approval on every line, an agent can run a build command, read the compiler errors, modify the files, and run the build again until it passes.
The IDE supports several models out of the box:
Gemini 3.1 Pro(currently free in public preview)Claude Sonnet 4.6(for complex architectural reasoning)GPT-OSS-120B(for open-weight local execution)Gemini 2.5 Flash(for fast, low-cost sub-tasks)
This multi-model support means you are not locked into a single provider. You can route different tasks to different models depending on the complexity of the job.
Manager View Mechanics
The core of Antigravity’s multi-agent workflow is the Manager view. This interface acts as a supervisor, letting you define a high-level objective and split it into parallel tasks executed by specialized sub-agents.
For example, if you are building an API, the Manager agent can spawn one sub-agent to write the database migrations, another to write the route handlers, and a third to write integration tests.
To configure this workflow, Antigravity uses a local configuration file. Create a .antigravity/agents.json file in your repository root to define your team:
{
"project": "e-commerce-backend",
"manager": {
"model": "gemini-2.5-pro",
"concurrency_limit": 3
},
"agents": [
{
"id": "db-schema-agent",
"role": "Database Architect",
"model": "gemini-2.5-pro",
"instructions": "Generate Prisma schemas, write migrations, and run db push commands."
},
{
"id": "api-route-agent",
"role": "API Developer",
"model": "claude-sonnet-4-6",
"instructions": "Write Express controllers based on the database schema. Ensure strict input validation."
},
{
"id": "test-runner-agent",
"role": "QA Engineer",
"model": "gemini-2.5-flash",
"instructions": "Write Jest integration tests for new API routes. Run tests and report failures back to the API Developer."
}
]
}
When you trigger the Manager view in the sidebar, the supervisor reads this configuration. It coordinates the dependencies: the database agent runs first, then the API agent and test agent run in parallel. If the test agent catches an error, it passes the stack trace directly back to the API agent, which applies a fix. You only step in when the entire loop resolves or hits an unresolvable blocker.
Project Context Enforcement
AI agents frequently hallucinate folder structures, use deprecated libraries, or ignore your project’s specific coding standards. Antigravity solves this with its built-in local Knowledge Base (KB).
Instead of pasting instructions into every prompt, you populate a .antigravity/kb/ directory with markdown files. The IDE automatically indexes these files and appends them to the context window of every active agent.
Here is an example configuration for a TypeScript project, saved as .antigravity/kb/conventions.md:
# TypeScript and API Standards
- Use strict TypeScript mode. No use of the `any` type is permitted.
- Database access must go through the Prisma client singleton defined in `src/lib/db.ts`.
- All API responses must use this standard JSON wrapper:
```typescript
interface APIResponse<T> {
success: boolean;
data: T | null;
error: {
message: string;
code: string;
} | null;
}
- Write unit tests using Vitest. Store them in the same folder as the target file with the
.test.tsextension.
By placing this file in your workspace, you prevent the agent from writing raw, non-standard Express responses or using Jest when your project is set up for Vitest. The agent reads this local index before writing a single line of code, reducing back-and-forth revisions.
## Multi-Model Cost Reduction Strategy
Running a top-tier model like `claude-sonnet-4-6` for every single autocomplete request or basic test generation is expensive. If you run agents continuously throughout an eight-hour workday, your API costs will spike quickly.
Antigravity's multi-model routing lets you cut these costs by up to 70 percent. You do this by offloading simple, repetitive tasks to fast, low-cost models while reserving expensive models for complex logical reasoning.
Consider this cost-optimized routing strategy:
1. **Architectural Decisions and Refactoring:** Route to `claude-sonnet-4-6` or `Gemini 3.1 Pro`. These models handle abstract planning and multi-file changes.
2. **Boilerplate and Basic Routes:** Route to `gemini-2.5-flash`. It is fast and handles standard CRUD operations easily.
3. **Unit Tests and Documentation:** Route to `gemini-2.5-flash`. Writing tests is highly structured and does not require deep reasoning, making it ideal for a cheaper model.
Here is the math for a typical development day involving 1,000,000 input tokens and 100,000 output tokens:
- **Single-Model Approach (Claude Sonnet 4.6 only):**
- Input: 1,000,000 tokens * $3.00 / million = $3.00
- Output: 100,000 tokens * $15.00 / million = $1.50
- Total daily cost: $4.50 per developer.
At scale, with multiple agents running in parallel loops, these token counts easily multiply by five, pushing costs to $22.50 per day.
- **Hybrid Approach (70% Gemini 2.5 Flash, 30% Claude Sonnet 4.6):**
- Claude Sonnet 4.6 (300k input, 30k output): $0.90 + $0.45 = $1.35
- Gemini 2.5 Flash (700k input, 70k output): $0.05 + $0.04 = $0.09
- Total daily cost: $1.44 per developer.
By routing the bulk of the repetitive work to Gemini 2.5 Flash, you save over 68 percent on your API spend while maintaining high-quality architectural design for your core codebase.
## Local Sandbox Execution
Letting autonomous agents run bash commands on your local machine is a security risk. A misconfigured agent could run a destructive command or install a malicious dependency.
Antigravity mitigates this by running its terminal agent in a local Docker container or a restricted shell. You configure these execution boundaries in `.antigravity/config.json`:
```json
{
"execution": {
"environment": "docker",
"docker": {
"image": "node:20-alpine",
"volumes": ["${workspaceRoot}:/workspace"],
"workdir": "/workspace"
},
"security": {
"allowed_commands": [
"npm run build",
"npm test",
"npx prisma db push",
"git diff"
],
"blocked_commands": [
"rm -rf /",
"curl",
"wget",
"ssh"
],
"require_approval_for_unknown": true
}
}
}
This configuration ensures that the agent can run your test suite and build your project inside an isolated Node.js container, but cannot access your host system’s network, SSH keys, or run destructive file deletions. If the agent attempts to run an unlisted command, the IDE halts execution and prompts you for manual approval.
Setup Guide
To get started with Antigravity, follow these steps to set up your first multi-agent project:
- Download the Antigravity IDE preview build from the official Google developer portal.
- Open your project folder and create the
.antigravity/directory. - Open the IDE settings and enter your API keys for Google AI Studio and Anthropic.
- Create your
.antigravity/agents.jsonand.antigravity/kb/conventions.mdfiles using the templates provided above. - Open the Manager view in the left sidebar, type your objective (e.g., “Build a CRUD API for user profiles with full test coverage”), and click Run.
Monitor the terminal execution window to watch the agents collaborate, run tests, and self-correct. Adjust your security settings and model routing as needed to find the right balance between speed, cost, and autonomy.