Google Antigravity (antigravity)
Set up this tool
Antigravity reads per-rule files under .agents/rules/ and custom subagents under .agents/agents/. agnostic-ai writes both, plus skills, MCP servers, and hooks.
First rule
Install the client using the official setup guide, then open your project in it.
Select antigravity in agnostic-ai.yaml, then follow First rule to add the shared commit-prefix rule and sync it. With the default paths, it reaches .agents/rules/conventional-commits.md.
Rules need native trigger frontmatter. Sync supplies it from the portable activation fields.
For existing files, check what import antigravity reads before syncing.
Verify
Run agnostic-ai sync --check and inspect .agents/rules/conventional-commits.md for the commit-prefix rule. Open the project in Antigravity. Confirm the rule is Always On, then ask for a commit subject for a small fix; it should use fix:.
Next, add a skill.
Shared memory
With builtins: [memory], sync writes antigravity-memory-index.md as an always-on rule. Native @[label](path) includes load the project index and checkout personal index. Paths resolve from the generated rule file, including when outputs.antigravity.rules-dir changes. The rule stays identical whether either index exists. Sync reads existing indexes to check the expanded rule size and does not create empty ones.
With memory.personal: repo in local configuration, only project memory is included. The shared policy finds personal memory through agnostic-ai memory path. Global sync keeps that policy and omits project-file includes.
Antigravity expands includes before checking its 24,000-byte rule limit. All always-on rules share a 20,000-token budget, which can replace large rules with pointers. Missing-index behavior is not documented. See the official file include and size rules.
Output
.agents/AGENTS.md # entry-point file with a short pointer body
.agents/rules/<name>.md # one per rule
<scope>/.agents/rules/<name>.md # one per scoped rule
.agents/agents/<name>/agent.md # one per agent (custom subagent)
.agents/skills/<name>/SKILL.md # one folder per skill (Antigravity's native path)
.agents/mcp_config.json # when MCP entries exist
.agents/hooks.json # when hook entries exist
.agents/plugins/<name>/plugin.json # only when an output key points into a plugin
Native mappings
Field mappings, discovery, and compatibility
Entry point
.agents/AGENTS.md is the documented per-directory entry point (<dir>/.agents/AGENTS.md or <dir>/.agents/GEMINI.md, both always_on and frontmatter-free). It stays apart from the root AGENTS.md that Codex, Amp, and Warp use.
Paths
Rules, skills, and MCP go to the plural .agents/ form Antigravity prefers (rules, skills). Antigravity lists the singular paths as legacy.
Plugins
Point any output folder or file key at .agents/plugins/<name>/ to ship those specs as a workspace plugin, active only in that project. agnostic-ai writes the required plugin.json at the plugin root, one per plugin, when an output key points at a component of the plugin layout: skills/, agents/, rules/, hooks.json, mcp_config.json, or mcp.json. A path inside a component, such as .agents/plugins/team/skills/extra, gets none.
To bundle MCP servers in a plugin, set outputs.antigravity.mcp-file to .agents/plugins/<name>/mcp_config.json, the path in the plugin documentation. Sync also recognizes mcp.json for the manifest and notes the documented filename. The standalone file stays at .agents/mcp_config.json.
Sync keeps an existing plugin.json it did not write and prints a note. Manifests recorded by an earlier sync remain managed.
Rules
Every file starts with frontmatter declaring a trigger. Antigravity silently discards a file without one or with an unknown value. The generated-file header follows the closing ---.
alwaysApplyis checked first, as in Devin Desktop / windsurf and Cursor.truewritestrigger: always_onand ignoresglobs, so the rule thatnew rulecreates (globs: "**/*"plusalwaysApply: true) stays always-on. When unset, it counts asfalseifglobsholds something other than a catch-all such as**/*, and astrueotherwise.- With
alwaysApply: false(orglobsand noalwaysApply),globsbecomestrigger: globplus a quoted, comma-joinedglobs. Adescriptionalone becomestrigger: model_decision. A rule with neither becomestrigger: manual(loads only on an @-mention). The Antigravity CLI does not support rule mentions, so amanualrule does not load there. Each case has the field it needs, so no sync note appears.descriptionis kept on any trigger. x-antigravity.triggeroverrides the mapping.import antigravitywrites it, because the portable fields cannot always recover the trigger. Amanualrule with adescriptionwould come back asmodel_decision. An override missing its field (globsforglob,descriptionformodel_decision), or outsidealways_on/glob/model_decision/manual, becomestrigger: manualwith a sync note, neveralways_on.- 24,000-byte cap. Antigravity truncates a rule file over 24,000 bytes after expanding
@[label](path)includes. agnostic-ai writes it in full and adds a sync note, so split the rule. The count covers the written file (frontmatter, generated-file header, heading) and expands the built-in memory rule's project and checkout personal indexes, stripping included frontmatter. Other rules' includes are not counted. - 20,000-token budget. All
always_onrules share 20,000 tokens. Past it, Antigravity replaces its largest rules with apath: descriptionpointer.syncgives no note, so give large rules adescription. - Scoped rules:
scope: <dir>writes to<dir>/.agents/rules/<name>.mdwith the same frontmatter. Antigravity documents that it does not load rules from folders below the workspace. Use a workspace rooted at the scoped directory when relying on those rules.
Agents
One custom subagent at .agents/agents/<name>/agent.md, the nested form in Antigravity's subagent reference (a flat form also exists). Frontmatter has the required name and description. The body is the system prompt.
- Goose and OpenHands scan only top-level
.mdfiles in that folder. The nested form keeps Antigravity'smodeltier apart from their model IDs.import antigravityreads flat files only when no nested profile exists, so it skips their agents. - Devin reads this folder too. With
windsurfintargets, Devin finds this profile and.devin/agents/<name>.mdunder one name, and only the Devin copy hasallowed-tools. See the shared agent discovery. - A portable
toolslist is dropped with a sync note. Antigravity has its own names (view_file,replace_file_content,grep_search,run_command, ...), and an unknown one can hang the subagent. Setx-antigravity.toolsinstead. modelis a tier (inherit,flash,pro), so any other value is dropped the same way.- Other documented keys (
mainAgent,subagent,commandExecutionPolicy,mcpServers,skills/plugins) go underx-antigravity.
Skills
Antigravity's native skills layout, shared with every tool that writes .agents/skills/ (see shared skills), so identical folders are written once. Frontmatter is cut to name and description. Files next to the skill are copied unchanged. sync --global writes ~/.gemini/config/skills/<name>/, the global path for the IDE and Antigravity app.
Antigravity documents no field that keeps a skill user-only: the agent reads relevant skills on its own, and /<skill-name> runs one by hand (Antigravity skills). Its disable-slash-command: true does the opposite, leaving the skill to the model. So disable-model-invocation is dropped with a note, and commands are skipped.
MCP
One mcpServers object in .agents/mcp_config.json (docs).
- agnostic-ai writes remote servers with
serverUrl. Antigravity also acceptsurlas an alias;httpUrlis unsupported. stdio servers havecommand,args,env, andcwd. Remote ones addheaders. - Both kinds accept
disabledby that name (seedisabledsupport by target), unlike Codex and Kilo, which writeenabled: false. authProviderType,oauth,disabledTools,description,roots, and any new field go underx-antigravity, like Zed and Warp.
Hooks
Hooks are merged into .agents/hooks.json (or outputs.antigravity.hooks-file), the documented location.
- Keyed by definition name, not event, unlike every other tool with hooks. Each spec becomes a top-level definition named after it, holding its one event.
disabled: truewritesenabled: falsebeside the event key, the reverse of MCP's literaldisabled. - Six events:
PreToolUse,PostToolUse,SessionStart,PreInvocation,PostInvocation,Stop. Other events are skipped with a sync note. The first two hold{matcher, hooks: [...]}groups. The other four hold a plain handler list and ignore the matcher, which gets a note.SessionStartruns once when a conversation starts, before the first model call. The portableon: session-startis not mapped; setevent: SessionStartorx-antigravity: {event: SessionStart}. - Per handler:
type(defaults to"command", and is always written),command, and optionaltimeout(seconds, vendor default 30). - A Claude-style matcher is valid regex that matches none of Antigravity's tool names. It is written as is with a sync note, as in OpenHands, Crush, and Windsurf.
Commands
The public-preview docs do not confirm them, so they are skipped with a warning. on-unsupported: silent suppresses it.
Leftovers from older versions
- Older versions wrote the undocumented
.agent/AGENTS.md. Sync renames a file it wrote there to.agent/AGENTS.md.bak. - Sync removes the
.agent/rulesand.agent/skillsfiles it wrote, unlessoutputs.antigravity.rules-dir/skills-diropts back into the legacy path. - Agents used to be flattened into
.agents/rules/agent-<name>.md, which the subagent loader does not read. Sync removes the copy it wrote for every current agent. - Sync removes a flat agent profile it wrote when no enabled tool still writes it. With Goose or OpenHands enabled, it stays as their output.
- The IDE still loads
~/.gemini/antigravity/skills/, which older versions wrote, but the Antigravity app does not. Move those skills or re-runsync --global.
Config keys
| Key | Default | Notes |
|---|---|---|
outputs.antigravity.rules-dir | .agents/rules | |
outputs.antigravity.agents-dir | .agents/agents | |
outputs.antigravity.skills-dir | .agents/skills | |
outputs.antigravity.mcp-file | .agents/mcp_config.json | |
outputs.antigravity.hooks-file | .agents/hooks.json | |
outputs.antigravity.rules-file | unset | writes one legacy merged file and skips the instructions that point to source specs |
Global configuration
agnostic-ai sync --global --only antigravity adds your home MCP specs to ~/.gemini/config/mcp_config.json, using the same fields as project output. A disabled server keeps disabled: true.
agnostic-ai import --global antigravity reads this file, maps serverUrl back to url, and keeps extra fields under x-antigravity. See global MCP ownership and name conflicts.
Import
agnostic-ai import antigravity reads .agents/rules, .agents/skills/ (with bundled files), and .agents/AGENTS.md. It falls back to .agent/rules, .agent/skills/, and .agent/AGENTS.md only when the preferred path is absent. It also looks for <dir>/.agents/rules/ copies to rebuild scoped rules.
- Triggers:
triggerbecomesalwaysApply(always_ontotrue,glob/model_decision/manualtofalse). It is also kept underx-antigravity.trigger, whichsyncreads first, so amanualrule with adescriptionstaysmanual. An unknowntriggergets noalwaysApplyand a warning, andsyncwrites it asmanual, neveralways_on. - Globs:
globsis kept, and the singularglob:is merged into it. - Agents and MCP: nested profiles win over flat files.
serverUrlbecomesurl, and other fields are kept underx-antigravity. - Plugin files: import reads the configured
outputs.antigravity.mcp-file,agents-dir, andrules-dir. These paths can point into.agents/plugins/<name>/. Import does not useskills-dir. Skills come from.agents/skills/, with.agent/skills/as a fallback. Import skips everything else under.agents/plugins/.
Absolute MCP file paths must resolve inside the project and outside .git. Import previews use the same boundary through project links and Windows short paths; a source folder alias does not grant access to an outside MCP file.
Protected paths
Not enforced. Antigravity takes no settings specs, so sync reports a spec with a protected block as unsupported. See protected-path alternatives.