What is Antigravity CLI memory?
Antigravity CLI reads rule files at the start of work and keeps them in the prompt. The official rules page (antigravity.google/docs/rules, read 2 December 2026) says Antigravity combines every rule it finds into one prompt. Standalone AGENTS.md and GEMINI.md files take no frontmatter and stay active the whole time. The docs we read describe no store of notes that the agent writes and reads back across sessions. So the rules you write are the memory you control. Facts from past work need a memory server or a plugin.
Where the rules live
The CLI checks these places (rules page, “Managing rules in Antigravity CLI”):
| Location | Scope | Loads |
|---|---|---|
AGENTS.md or GEMINI.md in the folder where you start agy | This folder and below | Always |
AGENTS.md, GEMINI.md or .agents/rules/*.md in each parent folder up to the repo root | The repo | Always |
~/.gemini/AGENTS.md, ~/.gemini/GEMINI.md, ~/.gemini/config/AGENTS.md or ~/.gemini/config/GEMINI.md | Every project on the machine | Always |
~/.gemini/config/rules/*.md | Every project on the machine | Only when the frontmatter trigger matches |
| Rules inside an installed plugin | The plugin | Activated by Antigravity |
Two details matter:
- Subfolders. The docs say Antigravity does not load rules from subfolders below the folder you start in, even when the agent reads or edits files there. Put rules for the whole repo at the root and keep the start folder in mind.
- Frontmatter. AGENTS.md and GEMINI.md take no frontmatter. Every file in a
rules/folder must start with YAML frontmatter that sets a trigger, such asalways_onorglob.
Legacy names still load: the rules page lists .agent/rules/*.md as a legacy path.
Rule files can also include other files with @[label](path). The docs say the included file is pasted into the
rule before the size check, so a large include counts in full.
Compaction
The CLI’s command list (antigravity.google/docs/cli/using, read 2 December 2026) includes /compact and /context.
The page we read does not give the automatic compaction settings, so this page does not state a default. If a long
chat matters, compact it by hand before it gets near the limit, and keep the important facts in a rule file.
Adding Hindsight to Antigravity CLI
The Hindsight Coding Agents package lists Antigravity CLI among its 22 supported CLI agents. Its docs (hindsight.vectorize.io/sdks/integrations/coding-agents, read 2 December 2026) give this install:
- Run
npx @vectorize-io/hindsight-coding-agents install agy. - The install sets up lifecycle hooks and MCP for
agy, plus a status line that shows the Hindsight bank. - Work as usual. Capture is automatic, with no setup command.
By default each repo gets one bank, coding-agent::{gitProject}, shared with the other coding agents you install.
Limits:
- Coding Agents 0.9.0 (30 November 2026) lists the agents whose memory comes back after a compaction. Antigravity CLI is not on that list, so this page does not claim it for
agy. Source: hindsight.ai/oss/blog/2026/11/30/coding-agents-090. - Memory lives in Hindsight Cloud (needs an API key), a server you run, or a local daemon. Pick one before you install.
- We found no independent benchmark of this plugin with Antigravity CLI in the sources we checked, so this page makes no performance claim.
Where this fits
Use AGENTS.md for rules that rarely change: build commands, code style, folders to leave alone. Use a memory bank for facts from the work: past decisions, the cause of a bug, a setup that took an hour.
For the same question on other tools, see AI coding agent memory, Factory Droid memory and Kimi Code memory.
Sources
- Antigravity rules (locations, frontmatter, includes): https://www.antigravity.google/docs/rules/ (read 2 December 2026)
- Antigravity CLI usage and commands: https://www.antigravity.google/docs/cli/using (read 2 December 2026)
- Hindsight Coding Agents, Antigravity CLI entry (
install agy): https://hindsight.vectorize.io/sdks/integrations/coding-agents (read 2 December 2026) - Hindsight Coding Agents 0.9.0: https://hindsight.ai/oss/blog/2026/11/30/coding-agents-090 (30 November 2026)