Start with rules, Antigravity's persistent instructions
Antigravity describes rules as persistent instructions and coding standards (Antigravity docs). Antigravity discovers rules from your filesystem and injects them into the agent's context (Antigravity docs).
Antigravity discovers rules in two scopes: your workspace, including parent folders up to the repository root, and your global configuration (Antigravity docs). Rules are cumulative rather than replacement-based, and Antigravity combines all the rules it finds into the prompt (Antigravity docs). For broader background on feeding an agent, see give your AI context.
Pick your rule files: AGENTS.md, GEMINI.md, and global files
Global rules apply across all projects on your workstation (Antigravity docs). Standalone global rules files need no frontmatter and are always active, and AGENTS.md and GEMINI.md files use no frontmatter either: Antigravity treats their entire content as plain Markdown and keeps it continuously active (Antigravity docs).
A rule marked always_on is always active in scope, and Antigravity injects its full content into the system prompt on every turn (Antigravity docs). One boundary matters: Antigravity does not load rules from subfolders below the workspace folder, even when the agent reads or edits files there (Antigravity docs).
Keep rules inside the size limits
Antigravity truncates any single rule file that exceeds 24,000 bytes, counted after expanding file includes, and all active global and always_on rules share a 20,000-token budget, separate from the customization budget that covers plugins such as skills and MCP (Antigravity docs).
Two documented features help you stay inside those limits. Antigravity can inject only a rule's path and description upfront, and the agent reads the full rule on demand when your task matches the description (Antigravity docs). Rule files also support an include syntax, @[label](path), that inlines another file's contents directly into the rule before prompt evaluation and size-limit checks (Antigravity docs).
Add context beyond the workspace with MCP
Antigravity supports the Model Context Protocol (MCP), an open standard that lets AI agents and editors securely connect to local developer tools, databases, file parsers, and external remote APIs (Antigravity docs). MCP gives the AI model real-time context and execution capabilities beyond your immediate workspace (Antigravity docs). If MCP is new to you, start with what an MCP server is.
In the Antigravity App, you manage MCP servers in the MCP Servers section of the Customizations page, or you type /mcp in the prompt panel and press Enter to open the interactive MCP Manager Overlay (Antigravity docs).
Where the KnowMan server goes
Antigravity reads MCP servers from two config files: the global ~/.gemini/config/mcp_config.json, which applies to all your projects, and the workspace <workspace>/.agents/mcp_config.json, which applies only to that workspace (Antigravity docs).
Remote MCP servers must use the Streamable HTTP transport, and remote server entries can include an Authorization header carrying a Bearer API token (Antigravity docs). KnowMan runs a hosted remote server at https://api.knowman.io/mcp over Streamable HTTP, reachable with OAuth sign-in or an API key sent as Authorization: Bearer <key> (KnowMan MCP on GitHub). The config snippet on this page shows a global-file entry for that server with a Bearer API key.
You create the API key in KnowMan under Settings > Connections > Connect an AI agent, or you run npx -p @knowman/mcp knowman login once and approve the browser sign-in (KnowMan MCP on GitHub). KnowMan also ships a local stdio server, the npm package @knowman/mcp, started with npx -y @knowman/mcp on Node 22 or newer (KnowMan MCP on GitHub).
What to ask for once connected
The KnowMan MCP server exposes six tools: kb_search, kb_ask, kb_get_item, kb_save, kb_recent, and kb_memories (KnowMan MCP on GitHub). In practice, the assistant can search your saved items by keyword or meaning, answer questions with citations, read the full content of one item, save a URL to your Inbox or Knowledge Base, list recent items, and pull up saved claims, decisions, and playbooks (KnowMan MCP on GitHub).
You drive it in plain words: "search my KnowMan for the rate limiting notes" or "save this URL" (KnowMan MCP on GitHub). For a wider view of this pattern, see knowledge bases for AI agents.
Where KnowMan fits
Rules are the right home for instructions, coding standards, and project conventions, and Antigravity caps them at 24,000 bytes per file plus a shared 20,000-token budget for active global and always_on rules (Antigravity docs).
What KnowMan adds alongside rules
KnowMan saves articles and links, reads and tags them, answers questions with citations, and keeps memories such as claims, decisions, and playbooks (KnowMan MCP on GitHub). Connected through the MCP setup above, the agent can search and save without pasting anything into a rule file (KnowMan MCP on GitHub). To read more, see an MCP server knowledge base and persistent memory for AI agents.
Questions people ask
Does Antigravity have persistent memory?
Antigravity documents rules as persistent instructions and coding standards that it discovers on your filesystem and injects into the agent's context, combining all the rules it finds into the prompt (Antigravity docs). Beyond rules, Antigravity supports MCP, an open standard that lets AI agents and editors connect to local developer tools, databases, file parsers, and external remote APIs (Antigravity docs).
What are Antigravity's rule size limits?
Antigravity truncates any single rule file that exceeds 24,000 bytes, counted after expanding file includes. Active global and always_on rules also share a 20,000-token budget, separate from the customization budget that covers plugins such as skills and MCP (Antigravity docs).
How do I add the KnowMan MCP server to Antigravity?
In the Antigravity App, manage MCP servers in the MCP Servers section of the Customizations page, or type /mcp in the prompt panel and press Enter (Antigravity docs). Remote servers must use Streamable HTTP and can carry an Authorization Bearer header, so point Antigravity at https://api.knowman.io/mcp with your KnowMan API key (KnowMan MCP on GitHub).
Which KnowMan tools does the MCP server expose?
The server exposes six tools: kb_search, kb_ask, kb_get_item, kb_save, kb_recent, and kb_memories (KnowMan MCP on GitHub). After connecting, you ask the assistant in plain words, such as "search my KnowMan for ..." or "save this URL" (KnowMan MCP on GitHub).