# How to give LibreChat better memory

Give LibreChat better memory by keeping its memory store to a handful of durable facts and moving notes, documents, and articles to features built for them. LibreChat memory is a small store of key/value pairs added to the context of every new message, not a search over chat history ([LibreChat docs](https://www.librechat.ai/docs/features/memory)). Use [agent instructions](https://www.knowman.io/guides/give-your-ai-context), File Context, and File Search for documents, and an MCP knowledge base such as [KnowMan](https://github.com/Essatt/knowman-mcp) for [saved articles](https://www.knowman.io/guides/how-to-save-articles) and links.

## What LibreChat memory stores

LibreChat memory is a small store of facts about you, saved as key/value pairs, that is added to the context of every new message (LibreChat docs). It is not a search over your chat history. Nothing from old conversations is recalled unless it was saved as a memory entry.

The whole store goes into each request, so it is meant for a handful of durable facts, not notes or documents. Better memory starts with that split. Short facts about you stay in memory, and everything else moves to prompts, file features, or a knowledge base.

## Keep memory entries small and deliberate

When Memory is on, the model is instructed to use the memory tools only when you ask it to remember, update, or forget something, so say it plainly, for example: remember that I prefer short answers (LibreChat docs).

Keys use lowercase letters and underscores only, and each key can exist once. Once the store is full, new saves fail with "Memory Storage Full" until you delete something, and individual entries also have a length cap (LibreChat docs). Review old keys before adding new ones.

## Agents, separate stores, and admin controls

In chats with an agent, the composer palette has no Memory option. The agent uses memory if Memory is enabled in the Agent Builder (LibreChat docs).

An agent can be set to keep memories separate, so it reads and writes its own store, isolated from your shared memories and from other agents. Some deployments also run a background memory agent that reviews each exchange and saves facts on its own, without you asking. Whether that happens is your admin's choice (LibreChat docs).

Turning memory off stops LibreChat from adding saved memories and stops offering the Memory tool, and your entries are kept and come back when you turn it on again. The opt-out toggle is only shown when the admin allows users to opt out, and memory can also be limited by role (LibreChat docs).

## Put stable knowledge in agent instructions and files

An agent is a saved setup: a model, a system prompt, and the tools and files it can use ([LibreChat docs](https://www.librechat.ai/docs/features/agents)). Stable preferences belong in that system prompt, and an agent's instructions can link to a saved prompt instead of inline text, which keeps long instructions out of the chat window.

Files added under File Context have their text extracted once, at upload, and that text goes into the agent's context on every message. Because the text rides along with every message, large files there cost tokens on every turn.

## Use File Search for large documents

File Search turns the files you attach into a searchable knowledge base. The agent pulls the most relevant passages when it needs them, so it copes with large document sets (LibreChat docs). Long documents belong here, or in a dedicated library, not in memory entries.

For the difference between retrieval over attached files and a curated [personal knowledge](https://www.knowman.io/guides/personal-knowledge-base) base, see [RAG vs a personal knowledge base](https://www.knowman.io/guides/rag-vs-personal-knowledge-base).

## Turn on MCP servers in LibreChat

MCP is an open standard for exposing tools to a model, and LibreChat can use any server that speaks the protocol ([LibreChat docs](https://www.librechat.ai/docs/features/mcp)). Click a server to turn it on for the conversation. It shows up as a chip on the composer, and every tool the server exposes becomes available to the model. Pick a model that supports tool calls, or the model will never call the server's tools.

Connections are per user, saved credentials are never used for anyone else, and an idle connection is closed after 15 minutes by default and reopened the next time you use the server (LibreChat docs).

## KnowMan's MCP server

KnowMan offers a hosted [remote MCP](https://www.knowman.io/guides/mcp-server-knowledge-base) server at `https://api.knowman.io/mcp` (Streamable HTTP). Sign in with OAuth, which opens a KnowMan consent page for you to approve, or send an API key as `Authorization: Bearer <key>` (KnowMan MCP). For clients with MCP OAuth, the documented setup is to add the server URL, sign in, and approve.

The server exposes six tools: `kb_search`, `kb_ask`, `kb_get_item`, `kb_save`, `kb_recent`, and `kb_memories` (KnowMan MCP). KnowMan also runs locally as a [stdio server](https://www.knowman.io/guides/what-is-an-mcp-server) started with `npx -y @knowman/mcp`, on Node 22 or newer. For the wider pattern, see [an MCP server knowledge base](https://www.knowman.io/guides/mcp-server-knowledge-base).

## Where KnowMan fits

LibreChat memory holds durable facts about you, File Context sends file text with every message, and File Search works on files you attach by hand (LibreChat memory docs, agents docs). None of these is a library that grows as you read the web.

KnowMan saves articles and links, reads and tags them, [answers questions](https://www.knowman.io/guides/ai-knowledge-base) with citations, and keeps memories such as claims, decisions, and playbooks. Over MCP you can ask your chat to "search my KnowMan for ..." or "save this URL" (KnowMan MCP). For the broader idea, see [persistent memory for AI agents](https://www.knowman.io/guides/persistent-memory-for-ai-agents) and [give your AI context](https://www.knowman.io/guides/give-your-ai-context).

## Questions

### Does LibreChat remember my old chats?

No. Memory is not a search over your chat history, and nothing from old conversations is recalled unless it was saved as a memory entry (LibreChat docs). The whole store goes into each request, so it is meant for a handful of durable facts.

### Why does LibreChat say Memory Storage Full?

Once the store is full, new saves fail with "Memory Storage Full" until you delete something (LibreChat docs). Individual entries also have a length cap, so long notes are not the right use of memory anyway.

### Can a LibreChat agent keep its own memories?

Yes, if Memory is enabled in the Agent Builder. An agent can be set to keep memories separate, reading and writing its own store, isolated from your shared memories and from other agents (LibreChat docs). Some deployments also run a background memory agent that saves facts on its own.

### Can I connect a knowledge base to LibreChat?

LibreChat can use any server that speaks MCP (LibreChat docs). KnowMan offers a hosted remote MCP server at `https://api.knowman.io/mcp` with OAuth or an API key (KnowMan MCP). You need a model that supports tool calls, or the model will never call the server's tools.

## Related guides

- [Give LibreChat access to your knowledge base](https://www.knowman.io/guides/librechat-knowledge-base)

- [What is an MCP server?](https://www.knowman.io/guides/what-is-an-mcp-server)

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

- [What is AI agent memory?](https://www.knowman.io/guides/ai-agent-memory)

- [RAG vs Personal Knowledge Base: Key Differences](https://www.knowman.io/guides/rag-vs-personal-knowledge-base)

## More in this topic

- [AI memory for individuals](https://www.knowman.io/guides/ai-memory-for-individuals)
- [How to give LM Studio better memory](https://www.knowman.io/guides/lm-studio-memory)
- [How to give Open WebUI better memory](https://www.knowman.io/guides/open-webui-memory)

## More for LibreChat

- [Add the KnowMan MCP server to LibreChat](https://www.knowman.io/integrations/librechat)
- [How to teach LibreChat your knowledge](https://www.knowman.io/guides/teach-librechat-your-knowledge)

## A reading library behind your chat

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/librechat-memory
