# Antigravity runs the agents. Maguyva gives them the map.

Canonical source: https://maguyva.ai/for-antigravity

License: text under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/); code samples under [MIT-0](https://opensource.org/license/mit-0); the Maguyva name, logos, brand assets and other code are not covered. Details: [maguyva.ai/license](https://maguyva.ai/license).

Antigravity is an agent-first IDE: agents plan and edit across the editor, terminal, and browser. On a real monorepo they still need a map of which file matters. Maguyva indexes your codebase and serves it back over MCP (semantic, AST, graph, and text), so “where does auth happen” returns the actual auth flow, not seven test stubs.

> Antigravity runs the agent. Maguyva tells it which file to touch.

## What each layer does

Four pieces. Each one has a job.

### Antigravity

Where your agents plan, edit, and verify.

### @ mentions + rules

Manual context wins, until the repo is big.

### Maguyva

Automatic codebase facts over MCP.

### Workspaces, not seats

Agents don’t pay seats. [See pricing](https://maguyva.ai/pricing)

## Antigravity runs the agents. Let it.

The agent IDE is not the problem. The Agent Manager, multi-surface execution, and rules files are excellent, and you already use them for:

- Planning and running agents across the editor, terminal, and browser.
- Multi-file edits when the change is local.
- Agent rules for repo conventions and style guardrails.
- `@`-mentions to pull a specific file into context.

Keep doing that. None of it goes away.

But in a real monorepo (TypeScript with workspace deps, Python services, mixed packages) agent context breaks the moment the relevant file isn’t already on the agent’s radar.

## Manual fixes you’ve already tried, and where they break

Four manual fixes paired with their failure mode. Left = what you do today. Right = where it breaks.

### // mention the files

You `@`-mention the three files you think matter. The agent edits cleanly inside them.

### // mentioning is a guess

It works when you already know which files are involved. An autonomous agent needs the files you didn’t know to mention.

### // paste the snippets

You paste 200 lines from another package into the agent to give it enough context.

### // pasted code goes stale

The snippet you pasted at 9 a.m. doesn’t reflect the rebase your teammate landed at 11 a.m. The agent is editing against a phantom version of the package.

### // write a context doc

You write an agent rules file or an architecture markdown. It’s right today.

### // docs drift faster than code

Anything you write by hand drifts. The code is the source of truth. A doc explaining the queue layer is correct for a week, then wrong forever.

### // keep the rules files

You add agent rules for naming, lint, and build commands. Great for behavior.

### // rules ≠ index

Rules are the right place for “always run pnpm tsc -b before commits.” They are not a queryable index of every symbol, file, and call-site in your monorepo.

## Maguyva is the layer underneath

Not an Antigravity replacement. The repo-context layer that hangs off its MCP support.

- **Semantic + AST + graph + text**: search by meaning, structure, dependency, or literal. Every hit returns a file path and line number.
- **Cross-package by default**: call-sites and importers across every package in the monorepo, not just the one the agent has open.
- **Branch-aware**: Maguyva sees the version of the code the agent is editing.
- **Built for autonomy**: an agent that plans many edits needs the blast radius up front, not after CI goes red.

> Antigravity decides what to edit.
> Maguyva tells the agent *what the edit touches.*

## Three monorepo workflows

Cross-package, cross-language. Grounded against the actual call graph, not the agent’s grep.

### 01. Find the auth flow across packages, without mentioning anything

```text
agent> where does authentication happen in this monorepo?

graph::query("authentication flow")
  packages/web/src/auth/session.ts:42       middleware
  packages/api/src/auth/jwt.ts:88           token verify
  packages/shared/src/auth/types.ts:12      AuthContext
  packages/admin/src/auth/admin-only.ts:31  rbac gate

→ 4 entry points across 4 packages, ranked by call-site density.
[exit 0]
```

You didn’t mention a file. You didn’t paste a snippet. The agent has the four files that matter, in the right ranking, and can make a grounded edit.

### 02. Find the real implementation, not the test stub

```text
agent> how does normalizePhoneNumber handle E.164?

semantic::query("normalize phone E.164")
  packages/shared/util/phone.ts:88     normalizePhoneNumber()  ← real impl
  packages/api/test/phone.spec.ts:14   jest.mock(...)          ← stub
[exit 0]
```

Names lie. Mocks shadow real code. Maguyva ranks the real implementation above the test mock, across every package.

### 03. Check blast radius before the agent refactors

```text
agent> what calls QueueDispatcher.publish across the monorepo?

graph::callers(QueueDispatcher.publish)
  3 in packages/billing/*
  1 in packages/audit/*
  1 in packages/notifications/*
  1 in services/python-worker/*  ← cross-language via gRPC stub
[exit 0]
```

Cross-package, and cross-language when you have a polyglot repo, call-sites surface inline. An autonomous agent gets the blast radius before it edits, not after CI goes red.

## Setup with Antigravity

Three steps. Free tier: 3 repos, 50K indexed lines, no card.

### 01. Index a repo at maguyva.ai

Pick the monorepo where you’ve felt the most context pain.

### 02. Add Maguyva as an MCP server in Antigravity

`~/.gemini/config/mcp_config.json`

```json
{
  "mcpServers": {
    "maguyva": {
      "serverUrl": "https://maguyva.tools/mcp",
      "headers": {
        "Authorization": "Bearer mgv_xxxx"
      }
    }
  }
}
```

### 03. Ask one question whose answer you already know

Don’t point the agent at your whole company. Start with one repo and one verifiable question, like “what calls `formatInvoice` across packages?”

## Index one repo you already know.

Test one question whose answer you can verify.
