Skip to content

Parallel Agents

Antigravity 2.0 introduced the ability to run multiple agents simultaneously from a single command center. Instead of waiting for one agent to finish before starting the next, you can have a code review agent, a test generation agent, and a documentation agent all working on different parts of the same codebase at the same time. This lesson covers launching, coordinating, and managing parallel agents.

Gnome mascot

What you'll learn

  • Antigravity 2.0 supports multiple local agents running in parallel from the agent manager
  • Group agents into Projects to share context, workspace access, and task coordination
  • The agent manager shows live progress for each agent with the ability to pause, resume, or stop individual agents

The problem

You have a feature branch with 15 files changed. You need a code review, a test suite for the new logic, and updated API documentation. Doing these sequentially takes 15-20 minutes even with AI assistance because each agent runs one at a time. Parallel agents tackle all three simultaneously, and the agent manager shows you progress on each one in real time.

Build it

Step 1: Launch parallel agents from the IDE

In the Antigravity IDE, open the agent manager (Cmd+Shift+A or from the sidebar). Click "New Agent" and describe each task:

Agent 1: "Review all changed files in this branch for bugs, security issues, and style problems. Post findings as comments."
Agent 2: "Generate a comprehensive test suite for the new API endpoints in src/api/users.ts. Use vitest."
Agent 3: "Update the API documentation in docs/api.md to reflect the new endpoints and request/response schemas."

All three start simultaneously. The agent manager shows a card for each with its current status: the latest tool call, tokens used, and elapsed time.

Step 2: Launch from the CLI

Start a project session and spawn background tasks directly from the terminal REPL. This delegates independent tasks to concurrent agents while keeping the main interaction loop responsive.

bash
# Start a project session
antigravity --project feature-user-api

# In the REPL, spawn background agents
/background Review all changed files in this branch for bugs and security issues
/background Generate tests for the new API endpoints in src/api/users.ts
/background Update API documentation in docs/api.md

Use /agents to see all running agents and their status.

Step 3: Coordinate agents through shared context

Agents in the same Project share the GEMINI.md context file and workspace access. If the code review agent finds an issue, the test agent can see the finding and adjust its tests. If the documentation agent sees a new endpoint, the test agent knows to cover it.

markdown
# GEMINI.md
## Agent Coordination
- Code review agent: focus on security and correctness
- Test agent: cover all public API surface, edge cases, and error paths
- Docs agent: OpenAPI 3.0 format, include request/response examples
- Share findings through the project workspace: write to .antigravity/shared/

What goes wrong

MistakeHow you notice itThe fix
Agents conflict on the same fileFile shows merge conflicts or one agent's changes overwrite another'sAssign non-overlapping file scopes. Code review reads files; tests and docs write to separate directories
Too many agents consume all resourcesSystem becomes unresponsive, agents time outLimit to 3-4 parallel agents on a typical dev machine. The agent manager shows resource usage
Background agent completes silentlyYou miss the result because you were focused on another agentUse /agents to check status. Completed agents show a green checkmark in the agent manager

Confirm it worked

Launch a project session and start a few parallel background commands that modify the filesystem. Querying the agent list and checking the file output confirms the agents executed tasks concurrently.

bash
# 1. Open Antigravity IDE or CLI with a project
antigravity --project parallel-test

# 2. Spawn two simple parallel tasks
# Agent 1: "Create a file called hello.txt with 'hello world'"
# Agent 2: "Create a file called goodbye.txt with 'goodbye world'"

# 3. Check both files exist
ls hello.txt goodbye.txt

# 4. Verify /agents shows both completed
/agents

Next: Antigravity SDK