
What is Knowledge in Antigravity?
Knowledge in Antigravity is the collective name for what an agent retains after a conversation ends: the conversation itself can be reopened, knowledge items stored in the application data directory, and most importantly, the rules and skills files that you or the /learn command write to disk. To be clear: the current official documentation (as of 03/11/2026) has no dedicated page titled "Knowledge"; the path /docs/knowledge returns 404. The documentation only mentions Knowledge as a component of an agent on the Antigravity IDE overview page, mentions "knowledge items" in the settings section, and lists "Knowledge files" in the /context table of the CLI. This post does not describe the self-knowledge extraction mechanism because it has not been verified. This post goes through the /learn command, reopening and deleting conversations, the /context table, differences with rules files, and risks. General introduction is in the post What is Antigravity?.

Three layers of Antigravity's memory: context within a session, saved conversations, and rules and skills files on disk. Diagram: OPCAIOS.
What does Antigravity actually remember between sessions?
Antigravity does not automatically remember conversations; the /learn command documentation (as of 03/11/2026) makes it clear: if you teach the agent that test suites must run with a specific flag, that knowledge is lost when the conversation ends, unless it is written as a customization. When I say "Antigravity remembers," there are actually four things:
- Context within a session: messages, tool results, loaded files; lost when you start a new session.
- Saved conversations: can be reopened, but a new session does not automatically read old conversations.
- Knowledge items: the application data directory contains knowledge items; documentation does not describe how to create or use them.
- Rules and skills files: AGENTS.md, GEMINI.md,
.agents/rules/,.agents/skills/; the only layer you read, edit, and fully control.
How does the /learn command work?
The /learn command is the official way to turn a lesson from one session into a rule or skill for future sessions; according to the /docs/commands/learn page (as of 03/11/2026), the command is available on Antigravity App, Antigravity CLI, and Antigravity IDE. When you type /learn with nothing after it, the agent reads back recent messages, finds instances where you edited it, compares failed attempts with the final fix to isolate the root cause. Then the agent categorizes: rule (constraint, prohibition) or skill (multi-step procedure), and prioritizes updating an existing file. The important safety point: the agent does not edit the configuration file immediately but creates a proposal artifact named learning_proposal.md, clearly stating the category, reasoning, and text to be added. You comment directly on the proposal to adjust scope, wording, or placement; only when you explicitly approve does the agent create or edit the file. If the session has nothing worth keeping, the agent says so and stops.
You can point directly to a lesson, for example hypothetically: /learn always run tests with flag X in this repository.
Where does /learn save the lesson?
/learn writes to exactly where Antigravity itself looks for customizations and states the location in the proposal:
| Type | Project scope | Global scope |
|---|---|---|
| Rule | AGENTS.md, GEMINI.md, or .agents/rules/<name>.md |
AGENTS.md, GEMINI.md, or rules/ in the user config directory |
| Skill | .agents/skills/<name>/SKILL.md |
skills/<name>/SKILL.md at user level |
Read the scope carefully in the proposal: a lesson specific to one repository that gets written to global scope will follow you to every project.
How to Reopen, Find and Delete Old Conversations?
Old conversations in Antigravity CLI are tied to the working directory: according to /docs/cli/conversations (read 03/11/2026), running agy from any directory only shows and reopens sessions from that directory, preventing context confusion. The /docs/cli/commands/resume page describes:
- Type
/resume(alias/switch,/conversation) to open the conversation selection panel, sorted with newest first; type characters to filter by title, the first line of the first prompt, or ID. - Press F2 to rename a conversation for easier finding.
- Press F4 to delete, with a y/n confirmation step.
- Press Tab to the "Other" tab to import a conversation started in the Antigravity App into the CLI.
- From the terminal:
agy -creopens the most recent session of the current directory,agy --conversation <ID>opens a specific session.
When using agy -c, the CLI checks a buffer file mapping directories to the most recent conversation ID, then asks the backend if the conversation still exists; if it's been deleted, it opens a new session. The documentation does not say whether deleting a conversation also deletes knowledge items or server-side data; we haven't verified this.
Read the /context Table to See What the Agent Is Carrying?
The /context table in Antigravity CLI shows what the agent is "remembering" in the session, measured in tokens; according to the /docs/cli/commands/context page (read 03/11/2026), the table divides tokens by group: messages, responses, tool calls, system prompts, rules, skills, MCP tools, and free space. Below is a list of Knowledge files, Artifact files, Skill files with token counts, along with system files like GEMINI.md; this is the clearest sign in current documentation that knowledge is still being loaded into context. When a conversation gets long, Antigravity automatically compresses old turns into checkpoint summaries, so early session details may only remain as summaries. The documentation suggests: /btw for side questions, /clear (alias /new) when switching tasks, /rewind to jump back to a checkpoint, turn off unused MCP via /mcp.
How Is Knowledge Different from Rule Files Like AGENTS.md and GEMINI.md?
Rule files differ from conversations and knowledge items in that: rule files are text you write, stored on disk, which Antigravity automatically finds and injects into context each session. According to the /docs/rules page (read 03/11/2026), AGENTS.md and GEMINI.md need no YAML front matter and are always on; each file in .agents/rules/ must have a front matter declaring trigger with one of four values always_on, model_decision, glob, manual; if missing or wrong, the rule is silently skipped. Rules accumulate from the project up to the repo root and from global settings. There are two limits: each file is at most 24,000 bytes, and all always-on rules share a budget of 20,000 tokens; if exceeded, the largest file drops to a one-line pointer so the agent fetches it on demand.
| Criterion | Conversation | Knowledge | Rules, Skills |
|---|---|---|---|
| Who creates | Automatic | App, mechanism not described | You, or /learn when you browse |
| Used in new session | When reopened | Maybe, see /context |
Automatic by scope |
| Can be edited | Rename, delete | No instructions yet | Edit file, push to Git |
How to write rules is in the post rules and workflows in Antigravity; similar concepts in Claude Code see What is CLAUDE.md and What is AGENTS.md.
What Are the Risks of Wrong Memory and Data Leaks?
The biggest risk is the agent confidently applying something outdated. Five points to watch:
- Old rules: always-on rules written long ago still get injected into every session even after the project changed. Audit rule files regularly.
- Wrong scope:
/learnwrites a tip from one repo into global scope. Read the suggestion carefully. - Summary loses detail: after compression, the agent may forget constraints stated at session start. Important constraints should live in rule files.
- Secrets leak into files: API keys, customer data pasted into chat can leak into rule suggestions then get committed to Git.
- Data outside the machine: the CLI queries the backend about conversations, meaning conversations touch the server. The FAQ page (read 03/11/2026) links to Terms of Service and says you can turn off data collection in Settings; this is not legal advice.
Permissions and sandbox are in the post safe mode in Antigravity; general principles see 5 data security rules when using AI.
OPCAIOS's Experience
At OPCAIOS, Antigravity is the orchestration agent on my main Mac, running alongside Claude Code and Codex. Check as of 03/11/2026, at the conceptual level:
- The machine has over 400 Antigravity conversations saved locally. We count directories, not read contents. Conversations accumulate quickly, so naming and cleaning up old sessions is worth doing.
- The knowledge folder currently has no items saved; we haven't seen any knowledge items created. So we don't rely on knowledge for the agent to remember.
- The memory layer we actually use is files: GEMINI.md at the user level has just one line (always reply in Vietnamese), while common rules live in AGENTS.md used for all agents: order to read documents at session start, log at session end, sync via a shared state file.
- There is a global workflow file but it's an empty template, not yet in real use.
We don't have evaluation metrics for /learn and haven't measured productivity. The lesson: what matters, write it as a short file for someone to read back.
Frequently Asked Questions
Does Antigravity have its own documentation page about Knowledge?
No, as of 03/11/2026: /docs/knowledge returns 404 and the documentation page list has no Knowledge entry. Knowledge only appears as the name of an agent component, like "knowledge items" in the app data folder, and as "Knowledge files" in the /context table. Detailed descriptions online mostly come from unofficial pages, so they need to be cross-checked before trusting and shouldn't be relied on to design a workflow.
Does the agent remember what I told it in a previous session?
You shouldn't expect that. The /learn command documentation clearly states the agent doesn't remember conversations, and what it learns is lost when the session ends unless it's written into rules or skills. Reopening an old session with /resume or agy -c will continue from it, but a new session won't automatically read the old one. The most durable way is to run /learn, read the suggestions, then review so the agent writes them to the right scope file.
How do I delete an old conversation?
In Antigravity CLI, type /resume, select the conversation, press F4 then confirm. In Antigravity IDE, right-click the conversation in Agent Manager and choose Delete Conversation, or press the trash icon in the Agent panel. The documentation doesn't clearly say whether deleting affects knowledge or server-side backups, so it's best not to paste sensitive data into conversations in the first place.
Should I use /learn or write rules myself?
Use /learn right after you've edited the agent many times, when the context is still fresh enough for the agent to find the root cause. Write rules yourself when you already know clearly what constraint to set, like naming conventions or forbidden folders. Either way, the result is still an editable text file you can put in Git; /learn always creates a suggestion for you to review first.
How do I know which rules and knowledge the agent is using?
In Antigravity CLI, type /context: the table will list the tokens for each group, the Knowledge, Artifact, Skill files being loaded, and system rules auto-detected. If rules take up too much space, shorten them or switch to the model_decision trigger to load only when needed. In App and IDE, see the Rules tab in the Customizations panel. To learn how to build a system of rules and logs for multiple agents working together, see OPCAIOS's AI application training course.
Source: Google Antigravity documentation at antigravity.google/docs: /commands/learn, /cli/conversations, /cli/commands/context, /cli/commands/resume, /rules, /faq, /agent, /agent-settings, /settings (read 03/11/2026); page /docs/knowledge returned 404 on the same date. Not verified: the mechanism for creating and using knowledge items, whether deleting a conversation deletes related data; descriptions of knowledge items on unofficial pages are not used as fact. Experience is OPCAIOS's.
Translated from Vietnamese with AI. Read the original.
Want to apply this in your business?
Book a free 30-minute call (Vietnam time, in English or Vietnamese).
