Letta does two jobs at once: it runs your agent, and it manages that agent's memory. Most lists of Letta alternatives mix tools that do only one of those jobs, which makes them hard to compare. This page splits them:
- Memory layers give an agent you already run a memory. You keep your loop.
- Agent runtimes run the agent loop for you, with some memory built in. You replace Letta's server with a framework in your own code.
We make Threadless AI, one of the memory layers below, so read its entry with that in mind; we say where it is the wrong choice too. Facts about other tools come from their own documentation, linked, as checked on the date above.
What Letta is
Letta was founded by the creators of MemGPT at UC Berkeley (about). MemGPT proposed "virtual context management": paging information between a model's limited window and outside storage, the way an operating system pages between RAM and disk (paper).
Today a Letta agent is the durable object in your application: you create it once and send it messages, and Letta runs the loop, calls the model and manages the context (agent SDK). Its memory is MemFS, a git repository of Markdown files the agent reads, writes and reorganises, with background "dreaming" subagents that consolidate lessons (MemFS). Memory is shared across an agent's conversations (stateful agents). Letta is Apache-2.0 and self-hostable; Free covers up to 3 agents, Pro is $20 a month (pricing).
Why look for a Letta alternative
- Your agent has to run inside Letta. If your tools, streaming, retries and model calls already live in your own code, adopting Letta means moving the agent onto its server.
- Letta changed direction in 2026. In March it named Letta Code its flagship and began "sunsetting a set of server-side features in favor of stronger client-side and runtime-native replacements" (Letta's next phase). Its main repository says the retired V1 API server now lives on an archive branch (GitHub). Teams built on the older server API are re-evaluating.
- Memory is per agent. One agent's memory spans all its conversations. Some products need memory scoped to one conversation or one user instead.
- Older messages are summarised. As a conversation nears the context limit, Letta summarises older messages and keeps recent ones in view (conversations). Some teams want the exact older messages back, with their dates, when the conversation returns to them.
Memory layers or agent runtimes?
| If you | Look at |
|---|---|
| Already have an agent loop and want it to remember | A memory layer |
| Want a framework to run the loop, tools and state | An agent runtime |
| Want an agent that edits its own memory files | Stay on Letta |
Memory layers: keep your loop
| What it is | Who builds the prompt | Scope | Who writes memories | Open source | |
|---|---|---|---|---|---|
| Mem0 | Store you add to and search | You | User, agent, app or run | Mem0's LLM | Apache-2.0 |
| Zep | Temporal knowledge graph, context block | You, with Zep's block | User graph | Zep | Graphiti |
| Supermemory | Store for chat, documents and files | You, or its wrapper | Namespace | Supermemory's models | SDKs |
| Cognee | Knowledge graph plus vectors | You | Datasets and sessions | Cognee's pipeline | Apache-2.0 |
| Honcho | Reasons about users; returns context | You, from its context call | Workspace, peer, session | Honcho | AGPL-3.0 |
| Hindsight | Banks with retain, recall, reflect | You | A bank per user or agent | Hindsight's LLM | MIT |
| LangMem | Memory library for LangGraph | You | Namespaces | Your agent's model, or a manager | MIT |
| Threadless AI | Returns the whole OpenAI request | Threadless AI, for your call | One conversation | Your agent's model notes key facts, with a note tool | No |
Mem0
A memory layer you add messages to and search before a call; its LLM extracts the memories (how it works). Versus Letta: it leaves your loop alone, but you build the prompt and manage the history. See Mem0 alternatives.
Zep
A temporal knowledge graph per user whose facts carry validity dates, returned as a context block (facts). Versus Letta: stronger on facts that change; its self-hosted Community Edition is no longer maintained (announcement). See Zep alternatives.
Supermemory, Cognee, Honcho and Hindsight
Stores whose own models extract memories from what you add. Supermemory adds documents and connectors (how it works); Cognee builds an open-source graph (introduction); Honcho returns a token-bounded blend of summary and recent messages in OpenAI format (get context); Hindsight runs semantic, keyword, graph and temporal search together (docs). See Supermemory alternatives.
LangMem
LangChain's MIT library: tools that let a LangGraph agent's own model store and search memories in the hot path, plus a background manager (LangMem). Versus Letta: the closest in spirit, since the agent writes its own memory, but you host it inside LangGraph.
Threadless AI
Hosted memory for OpenAI agents. Before every model call your agent sends what is new to decorate and gets back the whole request, with the history managed; it submits that to OpenAI with its own key and calls report with the reply. Like Letta, the context window is managed and the agent's own model writes its memory: here, the model notes key facts with a note tool before older messages stop being sent word for word, and those facts stay in view. Unlike Letta, older messages are not summarised: the exact older messages that matter come back, with their dates, when the conversation turns to them. Nothing runs on our side but memory, and the SDK falls back to the local tail of recent messages if Threadless AI cannot be reached.
Do not choose it if you need memory shared across an agent's conversations, a provider other than OpenAI, self-hosting, or published benchmarks today: it has none of those. Prices are being finalised (pricing). See Threadless AI vs Letta.
Agent runtimes: replace the server
| Short-term memory | Long-term memory | License | |
|---|---|---|---|
| LangGraph | Thread state saved by a checkpointer | JSON documents in a store, under namespaces | MIT |
| OpenAI Agents SDK | Sessions: SQLite, OpenAI Conversations, Redis and others | Sessions keep the history; pair with a memory layer for facts | MIT |
| CrewAI | A unified Memory class | Same class, stored in LanceDB by default | MIT |
| Mastra | Message history per thread | Working memory and semantic recall | Apache-2.0 core |
LangGraph
A framework for agent graphs. Short-term memory is thread state: "State is persisted to a database using a checkpointer so the thread can be resumed at any time." Long-term memory is saved "within custom namespaces" as JSON documents in a store (memory). MIT (GitHub). Pair it with LangMem for memory the agent writes itself.
OpenAI Agents SDK
OpenAI's MIT-licensed agent framework. Its sessions "automatically maintain conversation history across multiple agent runs", with SQLite as the default and a server-managed option on OpenAI's Conversations API; OpenAIResponsesCompactionSession wraps a session to compact long conversations (sessions). Sessions keep history; deciding what a long conversation should still show the model is left to you or a memory layer. See OpenAI compaction vs a memory layer.
CrewAI
A framework for teams of agents. Its memory is "a single Memory class that replaces separate short-term, long-term, entity, and external memory types", stored in LanceDB under ./.crewai/memory by default (memory). MIT (GitHub).
Mastra
A TypeScript agent framework whose memory combines message history per thread, working memory ("persistent, structured information about the user, the application, or the task") and semantic recall (memory). The core is Apache-2.0; code in its ee/ directories is under an enterprise licence (GitHub).
Keep your loop, add memory
The common path off Letta is a runtime plus a memory layer: the runtime runs the loop and tools, and the memory layer decides what the model remembers. If your runtime calls OpenAI and your problem is a long conversation outgrowing the window, Threadless AI wraps the call your code already makes:
from openai import OpenAI
from threadlessai import NOTE_RESULT, Threadless, is_note_call
openai = OpenAI()
memory = Threadless()
def send(memory_id: str, new_messages: list[dict]):
request = memory.chat.decorate(memory_id, new_messages, {"model": "gpt-5", "tools": [memory.chat.note_tool]})
reply = openai.chat.completions.create(**request)
memory.chat.report(memory_id, reply)
return replyAnswer any note call with NOTE_RESULT (is_note_call identifies it). The quickstart has the full tool loop.
Benchmarks
| System | Result | Who ran it | On what |
|---|---|---|---|
| Letta | LoCoMo 74.0% | Letta | Plain file tools with GPT-4o mini (blog) |
| Mem0 | LoCoMo 92.5, LongMemEval 94.4 | Mem0 | Its managed platform (research) |
| Zep | LongMemEval 71.2% | Zep | gpt-4o (paper) |
| Threadless AI | None published | Runs in progress; we will publish scores with the method |
Each figure is the vendor's own, with different models and judges. The agent runtimes publish no memory benchmarks.
Migrating from Letta
- Export your agents and their memory repositories before you change anything.
- Choose the loop. Write it with the OpenAI SDK directly, or adopt a runtime from the table above.
- Move the persona and durable facts from the agent's root memory files into your system message.
- Choose the memory scope. Per agent maps to a Mem0
agent_idor a LangGraph namespace; per conversation maps to a Threadless AI memory. - Wire the memory layer around each model call, and seed live conversations with their recent history.
- Test on real conversations before you retire the Letta agents.
Questions people ask
What is the best alternative to Letta?
It depends which half of Letta you need. To keep your own agent loop, use a memory layer such as Mem0, Zep or Threadless AI. To have a framework run the agent, use LangGraph, the OpenAI Agents SDK, CrewAI or Mastra, usually with a memory layer beside it.
Is Letta open source?
Yes. letta-ai/letta and letta-ai/letta-code are Apache-2.0, and Letta can be self-hosted (GitHub).
What happened to MemGPT?
MemGPT became part of Letta in September 2024; its creators founded the company, and the open-source repository is now letta-ai/letta (MemGPT is now part of Letta).
Letta vs Mem0: what is the difference?
Letta runs the agent and the agent edits its own memory. Mem0 is a store you add memories to and search from your own loop. See Mem0 vs Zep vs Letta.
Can I use Letta's memory without Letta agents?
Letta's memory belongs to its agents, so you use it by running an agent on Letta. For memory without moving your agent, use a memory layer.
Does the OpenAI Agents SDK have long-term memory?
It has sessions, which store and replay conversation history, and a compaction session for long conversations (sessions). For facts that outlast what fits in the window, pair it with a memory layer.