# How to give Augment Code better memory

Augment Code keeps instructions in rules and guidelines; only User Guidelines persist across Chat and [Agent sessions](https://www.knowman.io/guides/claude-code-memory), and only in the IDE where they are defined, not across workspaces ([source](https://docs.augmentcode.com/setup-augment/guidelines)). Rules are files that live in the `.augment/rules` directory, User Guidelines are limited to 24,576 characters, and Workspace Guidelines plus Rules are limited to 49,512 characters ([source](https://docs.augmentcode.com/setup-augment/guidelines)). For [saved reading](https://www.knowman.io/guides/ai-article-saver), decisions and playbooks, the KnowMan MCP server adds tools such as `kb_memories`, `kb_ask` and `kb_search`, covered in [the MCP server knowledge base guide](https://www.knowman.io/guides/mcp-server-knowledge-base).

## What counts as memory in Augment Code

In Augment Code, memory for instructions comes from rules and guidelines. These are natural-language instructions that can help Agent and Chat reply with more accurate and relevant responses, as described in [the documentation](https://docs.augmentcode.com/setup-augment/guidelines).

Rules and guidelines are intended for preferences, package versions, styles, and implementation details that a linter or compiler cannot manage ([source](https://docs.augmentcode.com/setup-augment/guidelines)). They tell Augment how you want it to work. Saved reading, past decisions, and playbooks are a different kind of memory, addressed in the last section.

## Set User Guidelines for every chat

User Guidelines are defined under Settings and stored inside your IDE, while Workspace Guidelines and Rules are stored in the repository ([source](https://docs.augmentcode.com/setup-augment/guidelines)). In Visual Studio Code, the per-user file is `~/.augment/user-guidelines.md`. The legacy `augment.chat.userGuidelines` setting in settings.json is migrated into this file on startup and is no longer used directly ([source](https://docs.augmentcode.com/setup-augment/guidelines)).

User Guidelines apply to all future chats in the IDE where they are defined. They persist across Chat and Agent sessions, but they do not persist across workspaces, and guidelines defined in VSCode do not propagate to JetBrains IDEs or vice versa ([source](https://docs.augmentcode.com/setup-augment/guidelines)).

## Add workspace and user rules

Rules are files that live in the `.augment/rules` directory and come in three types ([source](https://docs.augmentcode.com/setup-augment/guidelines)). Always rules are included in every user prompt. Manual rules must be attached explicitly by tagging the [rules file](https://www.knowman.io/guides/knowledge-base-for-ai-agents) with an @ mention. Auto rules are detected and attached by the Agent based on a description field ([source](https://docs.augmentcode.com/setup-augment/guidelines)).

Workspace rules are stored in the project repository and apply only to that specific project. They support all three types via frontmatter. User rules are stored in `~/.augment/rules/`, apply to all workspaces, and are always treated as Always type ([source](https://docs.augmentcode.com/setup-augment/guidelines)). In the Auggie CLI, Manual rules are skipped because the CLI has no @-mention attachment ([source](https://docs.augmentcode.com/setup-augment/guidelines)).

## Use AGENTS.md and CLAUDE.md hierarchically

Augment also supports hierarchical rules through AGENTS.md and CLAUDE.md files placed in subdirectories. When you work on a file in a subdirectory, Augment discovers rule files from that directory and all parent directories, and all discovered rules are included in the context for that session. The search stops at the workspace root ([source](https://docs.augmentcode.com/setup-augment/guidelines)).

Only AGENTS.md and CLAUDE.md files are discovered hierarchically, and files in `.augment/rules/` are only loaded from the workspace root ([source](https://docs.augmentcode.com/setup-augment/guidelines)). A `.augment-guidelines` file at the repository root sets guidelines for all Agent and Chat sessions on the codebase and should be committed to version control so everyone shares the same guidelines ([source](https://docs.augmentcode.com/setup-augment/guidelines)). Augment also imports rules automatically when they are detected in the current workspace, and you can import rules manually in Settings ([source](https://docs.augmentcode.com/setup-augment/guidelines)).

## Limits to plan around

User Guidelines are limited to 24,576 characters, and Workspace Guidelines plus Rules are limited to 49,512 characters ([source](https://docs.augmentcode.com/setup-augment/guidelines)). When limits are exceeded, the user is notified in-app, and rules are applied in order: manual rules, then always plus auto rules, then `.augment-guidelines` ([source](https://docs.augmentcode.com/setup-augment/guidelines)).

Scope limits matter as much as size. User Guidelines stay in one IDE and do not cross workspaces, and Manual rules are IDE-only ([source](https://docs.augmentcode.com/setup-augment/guidelines)). Keep rule files short and specific so the most useful instructions fit.

## Where KnowMan fits

Rules and guidelines carry instructions. KnowMan is built for a different layer of memory: it saves articles and links, reads and tags them, [answers questions with citations](https://www.knowman.io/guides/knowledge-base-for-ai-agents), and keeps memories such as claims, decisions, and playbooks. For background, see [persistent memory for AI agents](https://www.knowman.io/guides/persistent-memory-for-ai-agents).

The KnowMan MCP server is a local [stdio server](https://www.knowman.io/guides/what-is-an-mcp-server), package `@knowman/mcp`, started with `npx -y @knowman/mcp` on Node 22 or newer, authenticating with a Bearer key in `KNOWMAN_API_KEY` ([MCP server guide](https://www.knowman.io/guides/mcp-server-knowledge-base)). Its tools give an agent access to your library: `kb_memories` returns saved claims, decisions, and playbooks, `kb_ask` answers with citations, and `kb_search` finds saved items by [keyword or meaning](https://www.knowman.io/guides/ai-knowledge-base).

The server runs locally with `npx -y @knowman/mcp` and as a hosted server at https://api.knowman.io/mcp with OAuth sign-in or an API key, so it fits clients that support local MCP servers and clients that accept remote ones. For connecting an agent to saved notes in general, see [give your AI context](https://www.knowman.io/guides/give-your-ai-context).

## Use the hosted KnowMan server

KnowMan also runs as a hosted remote MCP server at https://api.knowman.io/mcp. In clients that support remote MCP servers, you add that URL and [sign in](https://www.knowman.io/guides/personal-knowledge-base). With OAuth, the client opens a KnowMan consent page where you approve the knowman.read and knowman.write scopes, and access tokens last one hour and refresh automatically.

You can also sign in with an API key: create one in your KnowMan settings at https://app.knowman.io and send it as an `Authorization: Bearer <key>` header together with the server URL. Once connected, the six tools, including kb_search, kb_ask, and kb_save, give your assistant the same reach over your saved notes as the local server.

If you prefer a local setup, or want to run both, the open-source client at https://github.com/Essatt/knowman-mcp starts with `npx -y @knowman/mcp`. Then ask your assistant to search or save, for example search my KnowMan for prior decisions on this repo.

## Questions

### Does Augment Code remember between sessions?

Yes, for instructions. User Guidelines persist across Chat and Agent sessions in the IDE where they are defined, though they do not persist across workspaces ([source](https://docs.augmentcode.com/setup-augment/guidelines)). [Saved reading and decisions](https://www.knowman.io/guides/teach-augment-your-knowledge) are a separate layer, which KnowMan's kb_memories and kb_ask tools cover, see [the MCP server guide](https://www.knowman.io/guides/mcp-server-knowledge-base).

### Where are Augment Code rules stored?

Rules are files that live in the `.augment/rules` directory, and user rules live in `~/.augment/rules/` and apply to all workspaces. In Visual Studio Code, User Guidelines sit in `~/.augment/user-guidelines.md`. See [the documentation](https://docs.augmentcode.com/setup-augment/guidelines).

### What are the character limits for guidelines and rules?

User Guidelines are limited to 24,576 characters, and Workspace Guidelines plus Rules are limited to 49,512 characters. If limits are exceeded, you are notified in-app and rules are applied in a priority order. See [the documentation](https://docs.augmentcode.com/setup-augment/guidelines).

### How much does KnowMan cost?

The Free plan includes five Ask questions a day. Pro is $12.99 a month or $99 a year, and you can try it for 14 days with no credit card at [app.knowman.io/signup](https://app.knowman.io/signup).

## Related guides

- [Connect your knowledge base through KnowMan's MCP server](https://www.knowman.io/guides/mcp-server-knowledge-base)

- [Persistent Memory for AI Agents](https://www.knowman.io/guides/persistent-memory-for-ai-agents)

- [How to Give Your AI Context from What You Read](https://www.knowman.io/guides/give-your-ai-context)

- [What Is a Knowledge Base for AI Agents?](https://www.knowman.io/guides/knowledge-base-for-ai-agents)

## More in this topic

- [How to give Grok Bot better memory](https://www.knowman.io/guides/grok-bot-memory)
- [How to give Windsurf better memory](https://www.knowman.io/guides/windsurf-memory)
- [How to give Roo Code better memory](https://www.knowman.io/guides/roo-code-memory)

## More for Augment Code

- [Connect KnowMan to Augment Code](https://www.knowman.io/integrations/augment)
- [How to teach Augment Code your knowledge](https://www.knowman.io/guides/teach-augment-your-knowledge)

## Give your agent a memory of what you read

Try KnowMan Pro for 14 days with no credit card. [Create your account](https://app.knowman.io/signup)

[Start free](https://app.knowman.io/signup)

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

Source: https://www.knowman.io/guides/augment-memory
