
A local LLM is great until the second conversation. Without an explicit memory layer, every session starts from zero — no preferences, no project context, no history of what worked last week. A persistent memory tool fixes that by sitting between the model and the prompt, deciding what to remember, surfacing the right facts at the right moment, and surviving restarts.
We tested seven memory tools for self-hosted setups running Ollama, LM Studio, or vLLM on the desktop. The picks span the active 2026 stack: dedicated memory frameworks, agent runtimes that bake memory in, knowledge-graph backends, and the memory layer that Open WebUI users are most likely to enable first.
What to look for in a local LLM memory tool
Before picking one, decide what shape of memory you’re after.
- Passive extraction vs agent-driven writes. Passive systems (Mem0) extract memories from messages without the model lifting a finger. Agent-driven systems (Letta) have the model decide what to keep. Passive is predictable; agent-driven captures intent better when it works.
- Vector vs graph vs hybrid. Vector retrieval is the default and is fast. Graph-based memory (Cognee) is better for reasoning across relationships. Hybrids cost more but answer “who, when, why” questions cleanly.
- Local-first vs cloud-default. Mem0, Letta, Cognee, MemOS, and LangMem all ship self-hostable. The cloud paths are convenient and not what you want when the goal is keeping data on your own box.
- Framework lock-in. Some tools assume LangChain or LlamaIndex. Others run standalone via an HTTP API or a Python SDK that any client can hit.
- Cost at the limit. Even fully local, embedding generation and graph builds use compute. A 30B model with thousands of stored memories needs real hardware.
Quick comparison
| App | Best for | Platforms | Free plan | Starting price/mo | Rating |
|---|---|---|---|---|---|
| Mem0 | Drop-in memory for any chatbot | Linux, macOS, Windows | Yes (self-host) | Free self-host | 4.7 |
| Letta | Agent runtime with self-edited memory | Linux, macOS, Windows | Yes (self-host) | Free self-host | 4.6 |
| Cognee | Knowledge-graph long-term memory | Linux, macOS, Windows | Yes (self-host) | Free self-host | 4.5 |
| Zep | Conversational temporal memory | Linux, Docker | Yes (community) | Free community | 4.4 |
| Open WebUI memory | Memory tied to a familiar UI | Linux, macOS, Windows, Docker | Yes, fully | Free | 4.3 |
| MemOS | Memory layered like an OS | Linux, Docker | Yes, fully | Free | 4.2 |
| LangMem | LangChain-native memory primitives | Linux, macOS, Windows | Yes, fully | Free | 4.0 |
The apps
1. Mem0 — Best drop-in memory for any chatbot
Mem0 is the most-deployed memory layer in 2026 for one reason: the API is small, the self-host is straightforward, and you can bolt it onto a chatbot in an afternoon. Passive extraction means you call add() with a conversation, Mem0 decides what facts matter, and a later search() brings the right context back into the next prompt.
Where it falls short: The auto-extraction is opinionated. If you want the model itself to decide what to remember, this is the wrong shape. Mem0’s cloud product is the marketed path, but the open-source version covers most home use.
Pricing:
- Free: Self-hosted Mem0 OSS is free.
- Paid: Cloud tier scales by stored memories and retrievals; typically $50–$500/month at production scale, not relevant for personal use.
Platforms: Python SDK, REST API. Runs anywhere Python runs.
Download: Mem0
Bottom line: The default first pick. If you’re not sure where to start, start here.
2. Letta — Best for an agent runtime with self-edited memory
Letta is the rebranded MemGPT — an agent runtime where memory is the operating-system metaphor. The model writes to core, recall, and archival memory tiers during its own reasoning loop. The system handles the rest, including swapping context in and out so long sessions don’t blow the window.
Where it falls short: Letta is a runtime, not just a library — you’re adopting the whole platform. Best fit for autonomous agents and long-horizon tasks, less so for “I just want my chatbot to remember my name.”
Pricing:
- Free: Self-hosted Letta OSS is free.
- Paid: Letta Cloud for managed deployments, pricing on application.
Platforms: Python, Docker. Self-host on Linux, macOS, Windows via Docker.
Download: Letta
Bottom line: Best for autonomous research agents and long-horizon task executors. Overkill for a chatbot.
3. Cognee — Best for knowledge-graph long-term memory
Cognee is the open-source AI memory platform that puts a knowledge graph at the center. Ingest documents, conversations, or structured data in any format and Cognee builds a graph that survives restarts and grows with use. Retrieval is graph-aware, which means relationship questions (“when did we agree on X?”) return better than vector-only stores.
Where it falls short: Higher setup cost than Mem0. The graph database (NetworkX, Memgraph, or Neo4j depending on config) is another moving part to maintain.
Pricing:
- Free: Self-hosted Cognee OSS is free.
- Paid: Cognee Cloud for managed graph hosting, pricing on application.
Platforms: Python, Docker. Works on Linux, macOS, Windows.
Download: Cognee
Bottom line: The right pick when your memory is relational — meetings, decisions, projects with cross-references — not just facts.
4. Zep — Best for conversational temporal memory
Zep is the memory layer designed around chat: session summaries, user profiles, episode-based recall, and queries like “what did the user say two sessions ago?” The graph-backed long-term store handles temporal reasoning well, and the SDK is friendly to LangChain and direct OpenAI / Ollama wiring.
Where it falls short: The community open-source build is more limited than the cloud product. Self-hosters report some features lagging the hosted version.
Pricing:
- Free: Zep Community Edition is self-host free.
- Paid: Zep Cloud starts at a modest monthly fee for managed hosting and SOC 2 compliance.
Platforms: Docker, Python SDK. Linux, macOS, Windows via Docker.
Download: Zep
Bottom line: The pick when chat-specific memory (sessions, summaries, time-aware queries) is the primary use case.
5. Open WebUI memory — Best for memory tied to a familiar UI
Open WebUI is what most local-LLM users open every day, and the built-in memory feature is the easiest way to add persistent context to a setup you already use. Toggle it in settings, the UI surfaces a “Memories” panel, and the model can write to it via tool calls.
Where it falls short: It’s a feature inside a larger app, not a standalone framework. Programmatic access is via Open WebUI’s API rather than a dedicated memory SDK.
Pricing:
- Free: Fully free and open source.
- Paid: None.
Platforms: Linux, macOS, Windows, Docker. Pairs with Ollama, OpenAI-compatible APIs, and vLLM.
Download: Open WebUI
Bottom line: The lowest-friction memory tool if Open WebUI is already your front end.
6. MemOS — Best for memory layered like an OS
MemOS is the newer entrant from MemTensor. It treats memory in layers — local working memory, archival memory, skill memory — with a feedback-driven retrieval path that the team reports cuts roughly a third of the tokens compared to vector-only setups.
Where it falls short: Newer project, smaller community. Documentation is improving but not at Mem0’s level.
Pricing:
- Free: Fully free and open source.
- Paid: None.
Platforms: Python, Docker. Self-host on Linux.
Download: MemOS on GitHub
Bottom line: Worth watching. Pick it when you want the layered-memory model and you’re comfortable being an early adopter.
7. LangMem — Best for LangChain-native memory primitives
LangMem is the memory module designed to live inside a LangChain or LangGraph agent. It exposes short-term, long-term, and semantic memory APIs that compose with the rest of LangChain, which makes it the obvious pick if your stack is already LangChain.
Where it falls short: Outside LangChain it’s awkward. It’s also still maturing relative to Mem0 and Letta.
Pricing:
- Free: Fully free and open source as part of LangChain.
- Paid: LangSmith / LangGraph Platform for managed hosting, separate pricing.
Platforms: Python. Linux, macOS, Windows.
Download: LangMem (via LangChain)
Bottom line: Default for LangChain users. Skip if you’re not already on the stack.
How to pick the right one
If you want the simplest option: Mem0 with the Python SDK against any OpenAI-compatible local server.
If you need a full agent runtime, not just a library: Letta.
If your memory is relational, not just factual: Cognee with a self-hosted graph backend.
If chat-specific memory (sessions, summaries, time) is the main need: Zep.
If you already live in Open WebUI: turn on the built-in Open WebUI memory before adding anything else.
If you want the newest layered-memory model and you’ll tolerate rough edges: MemOS.
If you’re already a LangChain shop: LangMem.
FAQ
Can these memory tools run fully offline? Yes. Mem0, Letta, Cognee, Open WebUI, MemOS, and LangMem all run with a local embedding model and a local LLM. Embedding generation is the hidden cost — pick a small embedding model if your hardware is modest.
Do I need a vector database? Most picks bring their own. Mem0 ships with sensible defaults (Chroma, Qdrant, or PGVector). Cognee uses a graph DB plus vectors. Open WebUI handles storage internally. You only need to pick a database explicitly if you want to share one across multiple memory tools.
What’s the best memory tool for a self-hosted ChatGPT replacement? Open WebUI with built-in memory is the lowest-friction start. Layer Mem0 on top if you outgrow what the built-in tool offers.
How much memory storage is “a lot”? Personal use rarely passes a few hundred MB on disk even with thousands of memories. Embedding storage dominates; pick a smaller embedding model to keep it tight.
Can I move memories between tools? Mostly not. The schemas differ, and embeddings are model-specific. Pick a tool and commit to it for a year before considering a migration.