---
title: Antigravity harness
description: >-
  The Antigravity harness runs Google's Antigravity CLI in the sandbox on a
  Gemini API key and records its events.
---
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reeval.ai/llms.txt
> Use this file to discover all available pages before exploring further.

`antigravity()` runs Google's Antigravity CLI (`agy`) in the sandbox. For more information about the sandbox, see [Choose a sandbox](/configuration/sandboxes).

## `GEMINI_API_KEY`

`antigravity()` reads `GEMINI_API_KEY` from the environment or the `.env.local` file. A run exits with code 2 when the variable is unset, or when the value contains whitespace or a line break.

The gateway brokers the key in the `x-goog-api-key` header on `POST /v1beta/models/<model>:streamGenerateContent` at `generativelanguage.googleapis.com`. A restricted egress policy allows `generativelanguage.googleapis.com`.

When the API rejects the key, the attempt error begins with `The API rejected GEMINI_API_KEY: set a valid key in the environment or .env.local`.

For more information about keeping API keys on the host, see [Keep API keys on the host](/configuration/environments/secrets#keep-api-keys-on-the-host).

For more information about the variable, see [`GEMINI_API_KEY`](/reference/environment-variables#geminiapikey).

Antigravity opens `play.googleapis.com` and `antigravity-unleash.goog` in every session. The requests are telemetry and feature flags, and no setting stops them. A restricted egress policy refuses those hosts and records them on `egress.expectedBlocked`.

For more information about blocked requests, see [Read blocked requests](/configuration/environments/egress#read-blocked-requests).

## `antigravity()`

`antigravity()` is exported from `{{ pkg }}/harness`. The following configuration passes it as the `harness` option:

```ts title="reeval.config.ts"
import { defineConfig } from '{{ pkg }}'
import { antigravity } from '{{ pkg }}/harness'

export default defineConfig({
  harness: antigravity({
    model: 'gemini-3.8-flash-medium',
    effort: 'high',
  }),
})
```

`model` is required. For what each field takes, see [Harness factory options](/reference/options#harness-factory-options).



For more information about model ids and effort values, see [Set the agent's model](/configuration/agents/model). For rules, skills, MCP servers, usage, served models, and web events, see [Harness behavior](/reference/options#harness-behavior).

## `plugins`

reeval installs each plugin whole with `agy plugin install` as the session starts, and Antigravity loads each plugin's MCP servers itself.

[//]: # (generated:harness-plugins:antigravity)

- Takes every plugin part: `skills`, `agents`, `commands`, `hooks`, `mcp` and `rules`.
- Runs only command hooks, on `SessionStart`, `PreToolUse`, `PostToolUse` and `Stop`; a plugin with any other hook is refused.
- Reads `plugin.json`, `.antigravity-plugin/plugin.json`, `.gemini-plugin/plugin.json` and `gemini-extension.json` in place of `.claude-plugin/plugin.json`, so a plugin that has one is refused.

[//]: # (/generated:harness-plugins:antigravity)

For more information about plugins, see [Environment helpers reference](/reference/environment-helpers#pluginlocal).
