Comparison
Mem0 vs Letta: two approaches to agent memory
Mem0 vs Letta for agent memory. Mem0 adds a memory layer to the app you already have; Letta runs agents that own their memory. Compared on model, hosting, fit.
Bookmark
Bookmarks are kept in your free account, so you can find this page again on any device.
Sign in to bookmarkOn this page
A memory layer you call from your own code. It extracts facts from conversations and returns the relevant ones for each new request.
A platform for persistent agents that manage their own memory and identity across sessions, from the team behind MemGPT.
| Mem0 | Letta | |
|---|---|---|
| What you adopt | A library or service beside your existing agent | An agent harness: your agent lives in Letta |
| Who decides what to remember | Mem0's extraction step, on the turns you send | The agent itself, by rewriting its memory blocks |
| Memory scopes | User, session and agent memories | Memory blocks in the agent's context, plus searchable history |
| Ways to run it | Python or Node library, self-hosted server, managed platform | Letta Code CLI, self-hosted App Server, Letta Cloud, TypeScript SDK |
| Install | pip install mem0ai, or npm install mem0ai | npm install -g @letta-ai/letta-code, or uv tool install letta |
| Where memory is stored | Local Qdrant in the library; Postgres with pgvector in the server | On local disk with the App Server, or in Letta Cloud |
| Hosted pricing | Free tier by request volume, then usage-based or custom | Free for 3 agents; Pro $20 a month with model credits |
| Licence | Apache 2.0 | Apache 2.0 |
| Fits best | Adding user memory to an app you already built | Long-lived assistants that keep working across weeks |
Mem0 and Letta both give AI agents long-term memory, at different layers. Mem0 is a memory layer you add to an existing app: it extracts facts from conversations and retrieves them later. Letta runs stateful agents that manage their own memory with tools. Pick Mem0 to add memory without changing frameworks, Letta when the agent itself should persist.
Both deal with the same limit: a model forgets everything between calls, and a context window cannot hold months of history. Rows were checked against each project’s repository and documentation on 25 November 2026.
Pick Mem0 when
You already have an app or agent and want it to remember users. You send Mem0 conversation turns; it extracts facts, stores them with embeddings and entity links, and when a new request comes in you search for relevant memories and put them in the prompt. Memories can be scoped to a user, a session or an agent. Nothing else about your stack changes, and it works with any framework.
You can start with the Python or Node library, run the server yourself with Docker Compose, or use the managed platform. The default setup calls OpenAI for extraction and embeddings, so check where your conversation data goes and swap in other providers if you need to. Mem0’s own feature table marks some advanced features as available in full only on the managed platform, and its published benchmark scores come from that platform; the project says open-source users should expect “directionally similar gains but not identical numbers”. Test the open-source version on your own data before you rely on them.
On the hosted platform, the free tier is measured in add and retrieval requests per month (10,000 adds and 1,000 retrievals in the first 30 days with model calls included, or 50,000 and 10,000 with your own LLM key), with usage-based billing above that and custom plans for graph memory, SSO and on-premises use.
Pick Letta when
You want the agent itself to be persistent: one agent with a stable identity and memory that you talk to from a terminal, a browser or chat channels such as Slack, Telegram and Discord, and that decides what to keep and what to look up. This is the MemGPT idea of treating the context window like memory the agent manages with tools. In Letta Code, the agent rewrites its own memory blocks, can run background “sleep-time” processing to consolidate what it learned, and loads skills from global, project and agent-scoped folders.
Current development happens in the Letta Code repository; the original letta repository now points there, and the retired V1 API server lives on its archive branch. Check that any tutorial you follow matches the current version. Letta Cloud keeps an agent’s memory available across machines, and letta server runs the App Server yourself, keeping agent state on local disk. Letta’s hosted Free plan allows three stateful agents with your own model keys; Pro is $20 a month, includes $20 of model credits and allows 20 agents.
Use neither when
The facts you need already live in a database or documents. Retrieval over that source, or a tool the agent can call, is simpler and easier to keep correct than a second copy of the data in a memory store. The same goes for memory inside one long session: compaction and a scratch file often do the job, as the agent memory and compaction tutorial shows.
Whichever you pick
- Decide what may be remembered. Memories often contain personal data, so give users a way to see and delete them.
- Watch for stale or wrong memories. A bad fact stored once keeps steering later answers, so review what gets written and expire what changes.
- Measure. Compare answers with and without memory on a set of multi-session conversations before you ship it.
- Know where memory is stored and sent. Both tools call a model to decide what to keep, which means conversation text leaves your app unless you run the model yourself.
Memory is one part of keeping an agent’s context useful. The glossary explains compaction and agent memory, and the agent frameworks directory lists the frameworks either tool plugs into. If you are still choosing one, start with LangGraph vs CrewAI.
Check your understanding
Mem0 vs Letta quiz
Memory layer versus stateful agent, when to pick Mem0 or Letta, when to use neither, and the privacy, staleness and measurement checks that apply to both.
6 questions · pass mark 70%
Review
Checked against
Related
- Agent memory
Information an agent keeps beyond a single context window, such as user preferences, past decisions or task notes, and retrieves when needed.
- AI agents
Building systems where models plan and call tools in a loop to complete tasks.
- Context engineering
Deciding what instructions, documents, tools and history a model sees at each step.
- Context window
The maximum number of tokens a model can consider in one request, covering both the input you send and the output it writes.
- Agent memory and compaction in practice
Keep long Claude Code sessions accurate with compaction, CLAUDE.md, auto memory, subagents and a summarise-and-restart routine, and know what survives each.