# Antigravity

> Connect Google Antigravity to Golem through its hooks, MCP configuration and skills, so its built-in tools are checked as well as its MCP calls.

There is nothing to configure by hand. When you [install Golem](/install) on a machine that has Antigravity, the Golem agent registers itself as an Antigravity hook and adds its MCP servers and skills. From then on every tool call Antigravity's agent makes, built-in or MCP, is checked against your [rules](/rules) before it runs and signed into the record after.

## What Golem adds

| File | What Golem writes |
|---|---|
| `~/.gemini/config/hooks.json` | A `golem` block registering `golem antigravity-hook` for `PreToolUse`, `PostToolUse`, `PreInvocation` and `PostInvocation`, with an empty matcher so it sees every tool. |
| `~/.gemini/config/mcp_config.json` and `~/.gemini/antigravity-ide/mcp_config.json` | Golem's two MCP servers, `golem-witness` and `golem-context`. The IDE keeps its own copy, so both are written. |
| `~/.gemini/config/skills/` | Golem's skills, including `/safely`. One folder serves the Antigravity IDE, CLI and desktop app. |

Other hooks and MCP servers in those files are left exactly as they were. Restart Antigravity after the first install so it loads the hooks and servers.

The hook is what matters most. Antigravity's built-in tools, such as `run_command`, the file tools and the browser tools, never travel over MCP, so the hook is the only place Golem can see or refuse them. It also unwraps `call_mcp_tool`, the one built-in Antigravity routes every MCP call through, so each call is recorded under its real server and tool name, including calls to local stdio servers.

If Antigravity arrives after Golem, the next check (every 15 minutes by default) wires it. To wire it straight away, run:

```bash
golem setup-client
```

## What a block and a hold look like

A blocked call does not run. Antigravity shows the reason, which names the rule and carries a decision id:

```text
blocked by Golem policy (rule "no-force-push-to-main", decision gd_3f9a1c07b2e4d815). Trying again won't change this. If it's a false positive, the user can ask the security team for an exception: golem exception gd_3f9a1c07b2e4d815 --reason "why".
```

Antigravity can ask a person itself, so a held call becomes Antigravity's own approval prompt:

| The rule asks | In Antigravity |
|---|---|
| The person at the keyboard | Antigravity asks you, showing Golem's reason and decision id. If the session is restricted with Safely or the machine is quarantined, it asks again even for a call you approved before. |
| Your team | The call is refused, and the reason tells the agent your security team decides in the console and to quote the decision id. |
| Golem's reviewer agent | The call waits while the reviewer decides, for about 35 seconds at most. If no decision has come back yet, the agent is told to wait and retry the same call. |

Type `/safely` in a conversation to restrict it to a read-only profile. Golem reads that from Antigravity's own transcript of what you typed, not from anything the model says, so the model cannot arm or disarm it. A machine you [quarantine](/response#quarantine-a-machine) is held to its locked-down toolset on the same hook. See [Safely](/response#safely) and [Block, hold and contain](/response).

## What is recorded

- Every tool call before it runs and after it returns, with its arguments, and the error when one failed. The tool's output is not stored. Antigravity's tools are recorded under the names Claude Code uses (`run_command` as `Bash`, `view_file` as `Read`, `write_to_file` as `Write`, `replace_file_content` as `Edit`, `read_url_content` as `WebFetch`), so one rule covers both agents.
- What you typed, what the agent answered, and its reasoning where the transcript holds it. Antigravity's hooks carry none of this, so the Golem agent reads them from the conversation transcript Antigravity keeps on the machine. It skips the tool output in that transcript.
- The model name for each call, and each decision Golem made, signed into the session's [record](/record).

Before each model call, Golem can add a short system message: on the first call of a conversation, what the rest of your fleet is doing in this repository, and on every call, messages other agents sent this one. Both arrive as Golem talking, never as words from you. See [Agent coordination](/coordination).

The Golem agent also reads Antigravity's editor settings. `chat.tools.global.autoApprove` turned on, or workspace trust turned off, shows under **Security Inventory → Agent settings**. See [Roll out to a fleet](/fleet).

### The editor extension

`golem install editor-extension` adds the Golem editor extension to Antigravity, and to VS Code, Cursor and Windsurf if they are present. It records editor activity that is not a tool call: document edits, file creates, deletes and renames, and terminal commands. Restart the editor to activate it. The hooks above do not need it.

## Check that it is working

1. Run `golem doctor`. It confirms the Golem agent is running and enrolled, and reports Antigravity hooks whose `golem` binary has moved or gone.
2. Open the MCP servers panel in Antigravity and check that `golem-witness` and `golem-context` are listed.
3. Ask the agent which other agents are running on this machine. It should answer from Golem's `list_agents` tool.
4. In the console at [app.golem.team](https://app.golem.team), open **Conversations**. The session appears under the agent `antigravity`.

## Limits

- **Only the PreToolUse answer is honoured.** The other events record, and give the model context; they cannot stop anything.
- **If the Golem agent is down, calls run.** The hook allows the call rather than stop your work, and nothing is recorded until it is back.
- **Prompts and replies depend on the transcript.** If Antigravity stops writing its transcript where the hook says it is, Golem still records the tool calls but not what was said.
- **The shell jail does not apply.** It covers Claude Code on macOS; `run_command` runs outside it. See [Shell jail and sandbox](/shield).
- **The hook names a fixed path to `golem`.** If the binary moves, the hooks stop firing until `golem setup-client` runs again. An update repoints them for you.

More in [Coverage](/coverage) and [Limits](/limits).

## Remove it

`golem setup-client --remove` takes Golem's hooks, servers and skills out of every AI client on the machine, Antigravity included, and remembers the choice so the periodic check does not put them back. To remove Golem entirely, see [Uninstall](/install#uninstall).
