8 Best Open-Source AI Memory Tools for LLM Agents in 2026
Compare the 8 best open-source AI memory tools for LLM agents in 2026: Mem0, Cognee, Zep, Graphiti, Letta, LangMem and more, with licenses, MCP support, and honest tradeoffs.
description: "Compare the 8 best open-source AI memory tools for LLM agents in 2026: Mem0, Cognee, Zep, Graphiti, Letta, LangMem and more, with licenses, MCP support, and honest tradeoffs."
LLM agents are only as good as what they remember. A model that starts every session from zero will re-ask your preferences, lose track of decisions, and confidently contradict last week's plan. The fix is a memory layer: infrastructure that stores what happened, retrieves the relevant parts, and feeds them back into the agent.
Going open source for that layer buys you three things: you can self-host it, you can read the code that holds your data, and nobody can rug-pull the API out from under you. The tradeoff is that you run it.
This is a research-based comparison of the eight most relevant open-source memory tools as of September 2026, drawn from public docs and pricing pages. I have not benchmarked each one hands-on, so treat this as a map of the territory, not a lab report. The ranking below is ordered by how quickly a typical team gets value, not by a single score.
The shortlist at a glance
| Tool | License | Graph support | MCP support | Self-hostable | Best for |
|---|---|---|---|---|---|
| Mem0 | Apache 2.0 | Partial (via Neo4j add-on) | Limited | Yes | Per-user memory, fastest setup |
| Cognee | Apache 2.0 | Yes (native, graph-first) | Yes | Yes | Graph reasoning over document knowledge |
| Zep | Apache 2.0 | Yes (via Graphiti) | Limited | Yes | Long conversation histories with timelines |
| Letta | Apache 2.0 | No | No | Yes | Stateful agents that manage their own memory |
| Graphiti | Apache 2.0 | Yes (core focus) | No | Yes | Building your own temporal graph pipeline |
| LangMem | MIT | No | Partial | Partial | Teams already on LangGraph |
| Supermemory | MIT | No | No | Yes | Simple personal memory API |
| MemGPT | Apache 2.0 | No | No | Yes | Research and reference architecture |
1. Mem0
Mem0 is the shortest path from zero to an agent that remembers its users. It extracts facts and preferences from conversations and stores them in vector storage, with an optional Neo4j graph backend for teams that want relationships too. The Python SDK is clean and the setup is genuinely an afternoon's work.
Pros: fastest time-to-integration in this list; per-user memory profiles that persist across sessions; both self-hosted and managed cloud options; the largest community around any tool here.
Cons: graph support is an add-on, not native, so multi-hop reasoning is limited; less suited to heavy document ingestion or domain ontologies; MCP support is limited compared to the graph-first tools.
Pick Mem0 when you need personalization memory for a chatbot or assistant and you want it working this week.
2. Cognee
Cognee takes the opposite approach from Mem0: instead of extracting facts into flat storage, it ingests documents, audio, images, and API data through a modular ECL (Extract, Cognify, Load) pipeline and builds a traversable knowledge graph, queried with hybrid graph-plus-vector retrieval. It is Apache 2.0, self-hostable down to fully local deployments, and ships native MCP support. Cognee lists production deployments including Bayer and the University of Wyoming.
Pros: the most complete graph-native architecture in this list; broadest ingestion (30+ sources, multi-modal); native MCP support; full self-hosting including air-gapped setups; multi-tenancy and RDF ontology support for domain-specific schemas.
Cons: the architecture takes more initial configuration than vector-only tools; the learning curve is steeper if your team is new to knowledge graphs; building the graph costs LLM tokens, which is wasted on a tiny corpus.
Pick Cognee when your agents need to reason across connected, multi-source knowledge and you want to own the deployment.
3. Zep
Zep is a memory store for assistants and agents built around long-term conversation memory with temporal awareness. It uses Graphiti as its graph engine to build temporally ordered knowledge graphs from dialogue, with fact versioning and contradiction resolution when the user changes their mind. REST API plus Python and TypeScript SDKs, with a managed Zep Cloud tier if you do not want to self-host.
Pros: strong temporal reasoning through the Graphiti integration; production-tested for long conversation histories; good multi-tenancy and session isolation.
Cons: graph capabilities arrive via Graphiti as a dependency rather than a unified architecture; limited MCP support; narrower ingestion scope than full ECL-style pipelines.
Pick Zep when your core problem is long conversation memory where facts change over time.
4. Letta
Letta, formerly MemGPT, is an agent framework rather than a memory add-on. It gives agents a hierarchical memory model: in-context blocks for persona and active task state, archival storage with vector search for everything else, and agents that self-manage what stays in the context window. If you want the runtime to own the agent loop, this is the category leader.
Pros: strong framework for stateful agent personas; good multi-agent coordination with shared memory access; self-hostable with an active community; managed Letta Cloud available.
Cons: no native graph storage or multi-hop relational reasoning; no native MCP support; the context-window-centric design limits knowledge-heavy workloads.
Pick Letta when you are building long-running autonomous agents and want memory built into the runtime instead of bolted on.
5. Graphiti
Graphiti is the temporal knowledge graph engine that powers Zep, released as a standalone open-source library. It builds temporally aware graphs from unstructured and semi-structured data, with contradiction detection, fact versioning, and bi-temporal modeling (tracking both when something happened and when it was recorded). It integrates with Neo4j and compatible graph databases.
Pros: deep, principled temporal graph modeling; excellent as a standalone engine for custom memory architectures; solid foundation for teams already on Neo4j.
Cons: a library, not a full memory solution, so expect real integration work; no MCP support or agent framework integrations out of the box; not self-sufficient for production without additional tooling.
Pick Graphiti when time is the primary dimension of your data and you want to build the pipeline yourself.
6. LangMem
LangMem is LangChain's memory library for LangGraph agents: primitives for extracting, storing, and retrieving memories at user, thread, and namespace level, integrated with LangGraph's state model and observable through LangSmith. MIT licensed.
Pros: smooth integration if you already live in the LangChain stack; clean namespace abstraction for memory isolation; good observability via LangSmith.
Cons: tightly coupled to LangChain, which limits portability; no native graph support; partial self-hosting story since full managed deployment leans on LangChain infrastructure.
Pick LangMem when your agents are already built on LangGraph and you want memory that speaks its language.
7. Supermemory
Supermemory is the simplest tool on this list: a personal and application memory layer with a straightforward REST API for storing and retrieving memories, document and URL ingestion, and Docker-based self-hosting. MIT licensed, with a hosted option.
Pros: extremely simple setup for lightweight use cases; good for individual developers prototyping memory features; minimal infrastructure footprint.
Cons: no graph support or relational reasoning; not designed for enterprise-scale or complex agent architectures; limited integration ecosystem; no MCP support.
Pick Supermemory when you want the smallest possible thing that remembers stuff across your apps.
8. MemGPT
MemGPT is the research project that started this whole category: OS-inspired virtual memory paging for LLM context, with agents that move information between in-context and archival tiers. It has largely been superseded by Letta for production use, but it remains the reference architecture and a solid starting point for academic work.
Pros: pioneering architecture with a well-documented research foundation; good for experimentation and teaching.
Cons: superseded by Letta for real deployments; no graph support; not production-ready at enterprise scale; no MCP support.
Pick MemGPT when you are studying or teaching agent memory rather than shipping it.
When open source is not the answer
Everything above assumes you want to run infrastructure. Sometimes you do not. If the goal is simply that your AI tools remember things across sessions without you operating databases, the honest alternative is a managed memory layer.
That is what Vilix AI is: shared memory over MCP that auto-saves conversation turns, retrieves with semantic RAG, and keeps the same memory available across devices through server-side storage. You can list, update, delete, or export everything from any connected AI or the dashboard, with per-user isolation and last-write-wins semantics. It connects to Claude, Codex, Cursor, OpenClaw, Hermes, Manus, and Lovable, takes about ten minutes to set up, and has a free tier plus a 7-day Pro trial with no credit card.
Two honest caveats. First, Vilix AI is not open source, so if owning the code and the deployment is the requirement, pick from the list above. Second, like every MCP memory tool, the model itself decides when to call the memory tools, and models sometimes skip the call unless nudged. No vendor in this category has fully solved that; ask about it before you commit to anyone.
I build Vilix AI, a shared memory layer for AI tools.