What Cursor memory is
Cursor states that large language models do not retain memory between completions (Cursor docs). Rules provide persistent, reusable context at the prompt level, and Cursor defines them as system-level instructions to its Agent (Cursor docs). When a rule is applied, its contents are included at the start of the model context (Cursor docs).
AGENTS.md is a simple markdown file for defining agent instructions, placed in the project root as an alternative to .cursor/rules (Cursor docs). Together, Rules and AGENTS.md files are where you put context that should persist across completions.
Start with Project Rules
Project Rules are stored in .cursor/rules, are version-controlled, and are scoped to your codebase (Cursor docs). Rule files must use the .mdc extension (Cursor docs). Project rules are scoped using path patterns, invoked manually, or included based on relevance (Cursor docs).
Cursor advises checking rules into git so the whole team benefits (Cursor docs). You can also ask the Cursor agent in chat to create a new rule for you (Cursor docs).
Control when a rule applies
A rule with alwaysApply set to true is always included, and its globs and description are ignored (Cursor docs). With alwaysApply false and globs provided, the rule is auto-attached when a matching file is in context (Cursor docs). With alwaysApply false, a description, and no globs, the Agent reads the description and pulls the rule in when relevant (Cursor docs).
You can also @mention rules in chat to apply them manually (Cursor docs). Cursor says to put anything that must always be in context directly in the rule body (Cursor docs).
Use AGENTS.md for simpler projects
AGENTS.md is a simple markdown file for defining agent instructions, placed in the project root as an alternative to .cursor/rules for straightforward use cases (Cursor docs). You can place AGENTS.md files in any subdirectory, and they are applied automatically when you work with files in that directory or its children (Cursor docs).
Instructions from nested AGENTS.md files are combined with parent directories, with more specific instructions taking precedence (Cursor docs).
User Rules and Team Rules
User Rules are global preferences defined in Customize → Rules that apply across all projects (Cursor docs). Team Rules are team-wide rules managed from the dashboard and available on Team and Enterprise plans (Cursor docs).
All applicable rules are merged, and when guidance conflicts, earlier sources take precedence in the order Team Rules → Project Rules → User Rules (Cursor docs). Rules do not impact Cursor Tab or other AI features (Cursor docs).
Limits to keep in mind
Cursor's best practice is to keep rules under 500 lines (Cursor docs). It recommends referencing files instead of copying their contents, which keeps rules short and prevents them from becoming stale as code changes (Cursor docs). Referenced file contents are not inlined into the prompt, and this is the same in the editor, the CLI, and Cloud Agents (Cursor docs).
To bring rules in from a GitHub repository, you must package them in a plugin and publish that plugin through a marketplace (Cursor docs).
The KnowMan MCP server
KnowMan ships a standalone MCP server that runs locally over stdio: the @knowman/mcp package, started with npx -y @knowman/mcp on Node 22 or newer. It talks to KnowMan's HTTP API with a Bearer key in the environment variable KNOWMAN_API_KEY; keys look like km_... and are created at Settings > Connections > Connect an AI agent. KnowMan also runs as a hosted remote server at https://api.knowman.io/mcp, reachable with OAuth sign-in or an API key sent as Authorization: Bearer <key>, which suits clients that accept remote MCP servers.
kb_search finds saved items by keyword or meaning and returns titles, URLs, and metadata; kb_ask answers questions with citations; kb_memories returns saved claims, decisions, and playbooks. The server also exposes kb_get_item, kb_save, and kb_recent. The KnowMan README lists Claude Desktop, Claude Code, and Cursor as documented clients. For the wider pattern, see the MCP server knowledge base guide.
Where KnowMan fits
Cursor defines Rules as system-level instructions to its Agent, and AGENTS.md as a markdown file for agent instructions (Cursor docs). KnowMan does a different job: it saves articles and links, reads and tags them, answers questions with citations, and keeps memories of claims, decisions, and playbooks.
The Free plan includes five Ask questions a day, and Pro is $12.99 a month or $99 a year. To go deeper, read about persistent memory for AI agents or a knowledge base for AI agents.
Use the hosted KnowMan server in Cursor
KnowMan also runs as a hosted remote server at https://api.knowman.io/mcp, so you can add it to Cursor as a remote MCP server instead of running a local process. With OAuth, the client opens a KnowMan consent page where you approve the knowman.read and knowman.write scopes. Access tokens last one hour and refresh automatically.
Alternatively, create an API key in KnowMan settings and add the server to Cursor's mcp.json with the header: {"mcpServers":{"knowman":{"url":"https://api.knowman.io/mcp","headers":{"Authorization":"Bearer <key>"}}}}. Once set up, ask Cursor to search or save, for example "search my KnowMan for ..." or "save this URL".
The local option remains available: run npx -y @knowman/mcp on Node 22 or newer, from the open-source client at https://github.com/Essatt/knowman-mcp, with your API key in the KNOWMAN_API_KEY environment variable.
Questions people ask
Does Cursor keep memory between completions?
Cursor states that large language models do not retain memory between completions (Cursor docs). Rules provide persistent, reusable context at the prompt level, and when applied, rule contents are included at the start of the model context (Cursor docs).
What is the difference between Rules and AGENTS.md?
Project Rules live in .cursor/rules, use the .mdc extension, and are scoped to your codebase (Cursor docs). AGENTS.md is a simple markdown file in the project root, offered as an alternative for straightforward use cases (Cursor docs).
Can Cursor write rules for me?
Yes, you can ask the Cursor agent in chat to create a new rule for you (Cursor docs). Cursor's best practice is to keep rules under 500 lines, so review what the agent writes (Cursor docs).
What does the KnowMan MCP server provide?
The KnowMan MCP server is a standalone server that runs locally over stdio, started with npx -y @knowman/mcp on Node 22 or newer, and it also runs as a hosted remote server at https://api.knowman.io/mcp. It exposes kb_search, kb_ask, kb_get_item, kb_save, kb_recent, and kb_memories over your saved library. The hosted server uses OAuth sign-in or an API key sent as Authorization: Bearer <key>.