Start free
Guide Teach your agent your knowledge

How to teach Google Antigravity your knowledge

Updated 3 min read

The short answer

Teach Google Antigravity your knowledge by adding persistent rules, placing reference files in supported workspace or global locations, or connecting an MCP server for live context. KnowMan MCP offers tools for searching saved reading, asking questions with citations, and saving URLs when connected through a compatible MCP client.

On this page9 sections
  1. Choose the right way to add knowledge
  2. Add persistent rules
  3. Control when rules load
  4. Include reference files
  5. Watch rule limits
  6. Add an MCP server
  7. Use KnowMan through MCP
  8. Where KnowMan fits
  9. Questions people ask

Choose the right way to add knowledge

Use rules for persistent instructions, coding standards, and architectural constraints. Antigravity discovers these rules from the filesystem and injects them into the agent's context, unlike chat prompts that apply to one conversation. Antigravity Rules documentation

Add persistent rules

Place AGENTS.md, GEMINI.md, or Markdown files in .agents/rules/ within the workspace or a parent folder up to the repository root. Antigravity combines all discovered rules rather than replacing one set with another. Rules can also live in global configuration. Antigravity Rules documentation

Control when rules load

Use model_decision rules when Antigravity should read the full rule only when a task matches its description. Use glob rules when a rule should activate for matching files. Manual rules load when mentioned with @, but Antigravity CLI does not support rule mentions. Antigravity Rules documentation

Include reference files

A rule can include another file with @[label](path). Antigravity resolves relative paths from the rule file, expands ~/ paths, and can include file contents. A rule can also reference a file with @filename without inlining its contents. Antigravity Rules documentation

Watch rule limits

Antigravity does not load rules from subfolders below the workspace folder. A single rule file is limited to 24 KB and is truncated after included paths expand. Active global and always_on rules share a 20,000-token budget. Global modular rules in ~/.gemini/config/rules/ require YAML frontmatter. Antigravity Rules documentation

Add an MCP server

In Antigravity App, open Customizations, select Installed, and find the MCP Servers section. Antigravity connects to local tools, databases, file parsers, and remote APIs through MCP. Antigravity MCP documentation

Use KnowMan through MCP

KnowMan MCP offers tools for searching saved items, asking questions with citations, reading an item, saving URLs, listing recent items, and reviewing saved claims, decisions, and playbooks. Its hosted server uses OAuth or an API key, while the local stdio server starts with npx -y @knowman/mcp and requires Node 22 or newer. KnowMan MCP

Where KnowMan fits

KnowMan is a separate home for articles, links, answers, and memories, so it fits when your knowledge is larger than a rule file or changes over time. MCP gives compatible clients structured access to that library, while rules remain useful for short, durable guidance. See MCP server knowledge bases and AI knowledge bases.

Questions people ask

How do I teach Antigravity persistent instructions?

Add AGENTS.md, GEMINI.md, or Markdown files under .agents/rules/ in the workspace or a parent folder up to the repository root. Antigravity discovers and combines those rules across conversations. Antigravity Rules documentation

Can Antigravity read my reference files?

Yes. A rule can include file contents with @[label](path), or point to a file with @filename without inlining it. Single rule files are limited to 24 KB after includes expand. Antigravity Rules documentation

Can Antigravity search my KnowMan library?

Antigravity supports MCP servers, which can provide structured context from external APIs. KnowMan MCP can search saved reading, answer questions with citations, read individual items, and save URLs when used through a compatible MCP client. Antigravity MCP documentation and KnowMan MCP

Can I run KnowMan MCP locally instead?

The KnowMan package can run as a local stdio server with npx -y @knowman/mcp and requires Node 22 or newer. KnowMan MCP

Give Antigravity a wider knowledge base

Try KnowMan Pro for 14 days with no credit card. Create your account

Start free

Every new account starts with 14 days of Pro. No credit card.