Letta alternatives in 2026: open source memory for AI agents
What are the best Letta alternatives in 2026? For a memory layer you add to any agent, Mem0. For memory as a knowledge graph that tracks time, Graphiti from Zep. For graph plus vector memory with an MCP server, Cognee. For memory inside LangGraph agents, LangMem and LangGraph. For a memory system with its own server and hybrid retrieval, MemOS. For a memory API with an MCP server, Supermemory. For user profiles in chatbots, Memobase. For local search over code, docs and files that coding agents call over MCP, XERJ.
Key number: Letta moved its active source to letta-ai/letta-code (3,928 stars, release v0.34.72 on 27 Nov 2026); the original letta-ai/letta repository has 25,572 stars. Mem0 has 69,584 stars, Cognee 33,684 and Graphiti 33,164.
Stars, licences and latest releases from the GitHub API on 28 Nov 2026. Features from each project README and docs on the same day.
TL;DR Letta (formerly MemGPT) builds stateful agents that rewrite their own memory, and its current code lives in Letta Code, an agent harness. Teams look at alternatives when they want memory they can add to an agent they already have, a knowledge graph, an MCP server for coding agents, or a Python library instead of a full harness. Pick Mem0 for a drop in memory layer, Graphiti or Cognee for graph memory, and LangMem if you build on LangGraph.
Find the Letta alternative that fits
Sort by
| Tool | What it is | Best for | Latest release | Licence | Stars |
|---|---|---|---|---|---|
| Letta | Stateful agent harness (formerly MemGPT): agents rewrite their own memory, skills and prompts | Agents that learn over long horizons | Letta Code v0.34.72, 27 Nov 2026 | Apache 2.0 | 3,928 (letta-code) |
| Mem0 | Memory layer for AI agents and apps, with Python and TypeScript SDKs | Adding memory to an agent you already have | v2.2.1 (Python), 25 Sep 2026 | Apache 2.0 | 69,584 |
| Graphiti (Zep) | Real time knowledge graphs for AI agents, with an MCP server | Memory that tracks how facts change over time | v0.32.1, 24 Nov 2026 | Apache 2.0 | 33,164 |
| Cognee | Open source AI memory platform that builds graph and vector memory, with an MCP server | Long term memory built from your documents | v1.6.11, 26 Nov 2026 | Apache 2.0 | 33,684 |
| LangMem | LangChain library for long term memory in LangGraph agents | Memory for agents built on LangGraph | no GitHub releases (published on PyPI) | MIT | 1,793 |
| LangGraph | Framework for resilient, stateful agents with persistence and a memory store | Building the agent and its memory in one framework | 1.2.24, 20 Nov 2026 | MIT | 45,532 |
| MemOS | Memory operating system for LLMs and agents, with hybrid retrieval and skill reuse | A full memory system with its own server | v2.0.36, 9 Nov 2026 | Apache 2.0 | 12,529 |
| Supermemory | Memory and context engine with an app and an MCP server; can run fully locally | A memory API shared across AI assistants | server-v0.0.9, 12 Oct 2026 | MIT | 31,883 |
| Memobase | User profile based long term memory for chatbot applications | Remembering users in a chatbot | no GitHub releases | Apache 2.0 | 2,968 |
| XERJ | Local search engine and MCP server for agents: BM25, vector and hybrid search over code, docs and files, with cited answers | Searchable memory for coding agents | v1.0.0-rc.105, 23 Nov 2026 | Apache 2.0 | 22,476 |
Read https://xerj.org/compare/letta-alternatives-2026.md. Ask me what my agent must remember (users, documents, code or past sessions), which framework it runs on, where it runs and whether it needs MCP, then tell me which Letta alternative fits and how to move its memory.
Pick one in ten seconds
- A memory layer you add to any agent: Mem0.
- Memory as a knowledge graph that tracks time: Graphiti from Zep.
- Graph plus vector memory with an MCP server: Cognee.
- Memory for LangGraph agents: LangMem, or LangGraph itself.
- A full memory system with its own server: MemOS.
- A memory API with an MCP server: Supermemory.
- User profiles in a chatbot: Memobase.
- Searchable memory for coding agents over MCP: XERJ.
Why people look for a Letta alternative
Letta, first released as MemGPT, made agents that manage their own memory popular. Its active code now lives in Letta Code, a stateful agent harness with a CLI, an app server and messaging channels, while the original repository keeps the retired V1 API server on an archive branch. Teams compare alternatives when they want memory they can add to an agent they already built, a knowledge graph, an MCP server for coding agents, or a small Python library. The table above filters for each.
When to choose Mem0
Choose Mem0 when you already have an agent and want to add memory with a few SDK calls in Python or TypeScript. It is Apache 2.0 licensed and has the most stars on this page. See Mem0 alternatives 2026 and XERJ vs Mem0.
When to choose Graphiti or Cognee
Choose Graphiti, the open source engine behind Zep, when facts change and the agent must know what was true when; it builds a knowledge graph in real time and ships an MCP server. Choose Cognee to turn documents and conversations into graph and vector memory, also with an MCP server. Read knowledge graphs for agent memory.
When to choose LangMem or LangGraph
Choose LangMem when your agent runs on LangGraph and you want tools to extract, store and recall memories. Choose LangGraph when you want the agent loop, persistence and memory store in one MIT licensed framework, the way Letta bundles them.
When to choose MemOS, Supermemory or Memobase
Choose MemOS for a full memory system with hybrid retrieval and its own server. Choose Supermemory for a memory API and app that many assistants can share over MCP and that can run fully locally. Choose Memobase when the main job is remembering facts about each user of a chatbot; its last push was in January 2026.
Where XERJ fits
Most tools here store what an agent learns from chats. XERJ is a new way for AI to search for data: a local search engine for agents, with a neurosymbolic model inside, that indexes code, docs and files on your machine and returns cited answers over CLI and MCP. Coding agents use it as memory they can search and check. See best memory for AI coding agents, best MCP memory servers for Claude Code, and for memory built on rules, neurosymbolic AI frameworks such as Lemmalog and Hillock.
How we checked
Stars and the latest release of each project come from the GitHub API on 28 Nov 2026. For Letta we list Letta Code, where its README says active development happens now. LangMem and Memobase publish no GitHub releases. Features and MCP support come from each README and repository layout. We did not benchmark recall or latency for this page; for that, see the AI agent memory benchmark.
Read next
- Mem0 alternatives 2026
- Best memory for AI coding agents 2026
- Best MCP memory servers for Claude Code
- XERJ vs agent memory tools
- What is agentic memory?
- Neurosymbolic AI frameworks 2026
- All comparisons
FAQ
What is the best alternative to Letta?
Mem0 is the most popular memory layer to add to an existing agent. For graph memory pick Graphiti or Cognee, and for LangGraph agents pick LangMem.
Is Letta still open source?
Yes. Letta Code, where the README says active development now happens, is Apache 2.0 licensed. The original letta-ai/letta repository keeps the retired V1 API server on an archive branch.
Letta vs Mem0: what is the difference?
Letta is an agent harness: the agent manages and rewrites its own memory. Mem0 is a memory layer you call from any agent you already have.
Which Letta alternatives have an MCP server?
Graphiti, Cognee and Supermemory ship MCP servers in their repositories. XERJ is an MCP server for search over local code, docs and files.
Is there a free, self hosted Letta alternative?
Yes. Every tool on this page is open source under MIT or Apache 2.0, and Mem0, Graphiti, MemOS, Memobase and Supermemory can run on your own servers.
Evidence
- Letta: github.com/letta-ai/letta (README: active source moved to letta-code) and github.com/letta-ai/letta-code
- Mem0: github.com/mem0ai/mem0
- Graphiti: github.com/getzep/graphiti (mcp_server directory)
- Cognee: github.com/topoteretes/cognee (cognee-mcp directory)
- LangMem: github.com/langchain-ai/langmem
- LangGraph: github.com/langchain-ai/langgraph
- MemOS: github.com/MemTensor/MemOS
- Supermemory: github.com/supermemoryai/supermemory
- Memobase: github.com/memodb-io/memobase
- GitHub API stars, licences and releases, 28 Nov 2026.