COMPARISONS · AGENT MEMORY

Letta alternatives in 2026: open source memory for AI agents

AUTHOR · XERJ documentation team · REVIEWED BY · XERJ engineering team · PUBLISHED · 2026-11-28 · UPDATED · 2026-11-28
SHORT ANSWER · UPDATED 2026-11-28

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.

TOOL · FILTER

Find the Letta alternative that fits

I need

Sort by

ToolWhat it isBest forLatest releaseLicenceStars
LettaStateful agent harness (formerly MemGPT): agents rewrite their own memory, skills and promptsAgents that learn over long horizonsLetta Code v0.34.72, 27 Nov 2026Apache 2.03,928 (letta-code)
Mem0Memory layer for AI agents and apps, with Python and TypeScript SDKsAdding memory to an agent you already havev2.2.1 (Python), 25 Sep 2026Apache 2.069,584
Graphiti (Zep)Real time knowledge graphs for AI agents, with an MCP serverMemory that tracks how facts change over timev0.32.1, 24 Nov 2026Apache 2.033,164
CogneeOpen source AI memory platform that builds graph and vector memory, with an MCP serverLong term memory built from your documentsv1.6.11, 26 Nov 2026Apache 2.033,684
LangMemLangChain library for long term memory in LangGraph agentsMemory for agents built on LangGraphno GitHub releases (published on PyPI)MIT1,793
LangGraphFramework for resilient, stateful agents with persistence and a memory storeBuilding the agent and its memory in one framework1.2.24, 20 Nov 2026MIT45,532
MemOSMemory operating system for LLMs and agents, with hybrid retrieval and skill reuseA full memory system with its own serverv2.0.36, 9 Nov 2026Apache 2.012,529
SupermemoryMemory and context engine with an app and an MCP server; can run fully locallyA memory API shared across AI assistantsserver-v0.0.9, 12 Oct 2026MIT31,883
MemobaseUser profile based long term memory for chatbot applicationsRemembering users in a chatbotno GitHub releasesApache 2.02,968
XERJLocal search engine and MCP server for agents: BM25, vector and hybrid search over code, docs and files, with cited answersSearchable memory for coding agentsv1.0.0-rc.105, 23 Nov 2026Apache 2.022,476

Stars and latest releases from the GitHub API on 28 Nov 2026; licences from the API. Tick boxes to keep only the tools that do all of them; sort by stars, newest release or name.
PASTE THIS TO YOUR AI AGENT. IT DOES THE REST 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

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

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