Summary: Mem0, Zep and Letta all promise that your AI agent will "remember" users between sessions, but they solve different problems. Mem0 is a lightweight add-and-search memory API with a generous free tier, Zep builds a temporal context graph and bills by the size of the data you send it, and Letta makes the agent itself the long-lived object, with memory stored as files the agent edits. This guide compares how each one works, what the free plans really include, and which one fits which kind of project.
Why "memory" is a separate layer at all
A chat model only knows what is inside its current context window. If a user told your support bot last week that they are vegetarian, or that their account is on the annual plan, that fact is gone the moment the conversation ends unless you store it somewhere and feed it back in. You can do this yourself with a vector database (we compared the main options in Pinecone vs Qdrant vs Weaviate for Your First RAG App), but then you also have to decide which sentences are worth keeping, how to resolve conflicts when a fact changes, and how to rank old facts against new ones.
Memory layers package those decisions. The three tools below take noticeably different positions on who decides what to remember: a service-side extractor (Mem0), a knowledge graph that tracks when facts were true (Zep), or the agent itself (Letta).
Mem0: add messages, search facts
Mem0's hosted Platform has the smallest learning curve of the three. The official quickstart boils down to four steps:
- Install the SDK with
pip install mem0ai(Python) ornpm install mem0ai(JavaScript). A CLI is also available as@mem0/cliormem0-cli. - Create a
MemoryClientwith the API key from the Mem0 dashboard. - Call
client.add(messages, user_id="user123")with a normal list of user and assistant messages. - Later, call
client.search("What are my dietary restrictions?", filters={"user_id": "user123"})and pass the returned memories to your model.
The interesting part is step 3. Mem0 does not store your messages verbatim; it extracts separate facts. In the docs example, one user sentence ("I'm a vegetarian and allergic to nuts") becomes two stored memories, each returned later with a relevance score and categories. You never write extraction prompts yourself.
Mem0 also ships an open-source version (the Memory class) for self-hosting, and the docs say some Platform features such as advanced retrieval and custom categories may not be available there. Check which one a tutorial assumes before copying its code.
Zep: a temporal context graph
Zep is heavier but more structured. Its v4 agent memory quickstart works like this:
- Install
zep-cloud(Python),@getzep/zep-cloud(TypeScript) or the Go SDK, and setZEP_API_KEY. - Create a Zep user for each of your app's users with
client.user.create(...), including at least a first name, and store the returned UUID next to your own user ID. - Create a thread per conversation with
client.thread.create(user_uuid=...). - Send each message with
client.thread.add_messages(...). You can also push business events (a purchase, a support ticket, a played song) as JSON or plain text withclient.graph.episode.add(...). - Before each model call, fetch a "Context Block" with
client.thread.get_context(thread_uuid)and place it in the prompt.
The Context Block is assembled from semantic, full-text and graph search, using the four most recent thread messages as the query, and it can include a user summary plus facts with date ranges showing when each one was valid. That date tracking is Zep's main selling point: if a customer changed plans in March, the graph can tell the old fact from the current one. You can also define a context template (for example, a profile section, the top 10 facts and the top 5 entities) to control the format.
One detail from the docs that many guides skip: Zep tells you to treat the Context Block as untrusted data and keep it out of system or developer messages, because it can contain text written by end users or pulled from documents.
Letta: the agent is the durable object
Letta has moved well beyond being "a memory API". Its current product is an agent harness with a web app, a CLI and an Agent SDK, built on the idea that you create an agent once and resume it from anywhere. Memory belongs to the agent:
- You can set starting memory at creation time with
personaandhumanshortcuts, or a fullmemorylist of label and value pairs. - Each memory entry becomes a Markdown file in a git-backed repository the agent owns (Letta calls this MemFS). Files under
system/are in the system prompt every turn; everything else stays out of context until the agent reads it. - "Dreaming" runs background subagents that review recent conversations and update memory, triggered after a set number of steps or on context compaction.
The SDK is JavaScript/TypeScript (@letta-ai/letta-agent-sdk). The cloud backend needs a Letta API key, while the local backend needs no account; running the runtime yourself requires Node.js 22.19 or newer. If you only want to bolt memory onto an existing chatbot, Letta asks you to rethink more of your app than Mem0 or Zep do. If you are building long-running assistants or coding agents, that is exactly the point.
Plans and free limits compared
All figures below come from each vendor's official pricing page on the verification date. Prices are in US dollars per month.
| Item | Mem0 | Zep | Letta |
|---|---|---|---|
| Free plan | Free: unlimited end users; first 30 days 10,000 adds and 1,000 retrievals a month with model calls on Mem0; with your own LLM key 50,000 adds and 10,000 retrievals a month | 10,000 credits a month, no rollover or auto top-up; 2 projects; variable rate limits; lower-priority processing | $0: limited agents, 5 MiB storage per memory repository, limited Letta Auto usage, bring your own API keys |
| First paid tier | No public paid tier; usage-based billing past free limits with a monthly cap you set, then Custom | Flex $125 (50,000 credits, then $25 per 10,000); Flex Plus $375 (200,000 credits, then $75 per 40,000) | Pro $20 (Letta Auto quota, up to 20 stateful agents, 50 MiB storage); API Plan $20 plus $0.10 per active agent and $0.00015 per second of tool execution |
| What you pay for | Add and retrieval requests | Data ingested: 1 credit per Episode up to 350 bytes, +1 per extra 350 bytes; retrieval and storage cost 0 credits | Model usage through Letta, active agents and tool time |
| Best fit | Adding user memory to an existing chatbot quickly | Apps where facts change over time and business data matters | Long-lived agents that should learn and manage their own memory |
Zep's billing model deserves a closer look. Because you pay for what you send in, not for reads, the size of each message matters. The pricing FAQ gives the examples itself: a 640-byte Episode costs 2 credits, a 1,200-byte Episode costs 4. If you push long JSON events into the graph, trim fields you do not need before sending them. Mem0 is the reverse: retrievals are the scarcer free resource (1,000 a month in the first 30 days without your own key), so cache search results within a session instead of searching on every turn.
Editor's note
Who it's for: Mem0 suits solo developers and small teams who want user memory working in an afternoon. Zep suits support, sales and account tools where the "current truth" about a customer changes and you have CRM or event data to feed in. Letta suits people building persistent assistants or coding agents in TypeScript who are fine adopting its whole agent model.
Who it's not for: If your bot only answers questions from fixed documents, you need retrieval over documents, not user memory; a RAG setup like the one in our Dify help-docs chatbot playbook is simpler.
Gotchas and fixes:
- Mem0 returns an empty list after add. According to Mem0's FAQ this is often expected: definitional questions ("What is backpropagation?") and general knowledge without personal context are not extracted as memories. Test with a personal statement before assuming a bug.
- Old Mem0 code fails on the current SDK. Mem0's docs note that parameters such as
output_format,api_version,async_modeandenable_graphwere removed in the current major version; follow the migration guide instead of patching calls one by one. - Zep mixes up people. The quickstart warns to give at least a first name (ideally a last name) when creating users, and to include the user's name or ID in business data, so the graph links facts to the right person.
- Zep Context Block in the system prompt. Don't put it there. Place it after the conversation history and before the latest user request, and replace the previous block each turn rather than appending another one.
- Letta memory not visible to the agent. Only files under
system/are always in context; anything else must be read on demand, so put must-know facts there.
How to choose in five minutes
Pick Mem0 if
You already have a working chatbot and want it to stop asking returning users the same questions. Its add/search API maps cleanly onto an existing message loop, and the free tier with your own LLM key (50,000 adds a month) is enough to run a real beta.
Pick Zep if
Facts about your users change and you care about which version is current, or you want to merge chat history with events from your product. Budget for at least the $125 Flex plan once you leave prototyping, since the free plan has variable rate limits and lower-priority processing.
Pick Letta if
The agent itself is your product: a teammate-style assistant that runs for weeks, uses tools, and should get better over time. Start on the free plan with your own model keys, and remember that heavy tool use drains Letta Auto quota faster, which Letta's own pricing page says plainly.
Whichever you choose, log what memory is being injected and what it costs per conversation. A tracing tool makes that easy; see our Langfuse playbook for finding costly and bad LLM answers. The official pricing screenshots are at the end of this post.
FAQ
Q: Can I try all three without paying?
A: Yes. Mem0 and Letta both have $0 plans, and Zep gives 10,000 free credits a month. The limits differ a lot, so check the table above before you plan a launch on a free tier.
Q: Does Zep charge me every time my agent reads memory?
A: No. Zep's pricing page lists 0 credits for retrieval, storage, threads, users and graph storage; credits are used when you send Episodes (messages or data) in, and webhook invocations cost 1/8 credit where available.
Q: Can I self-host instead of using the cloud?
A: Mem0 has an open-source Memory class, Letta's agent harness is open source with a local backend and a self-hosted App Server, and Zep offers deployment in your own VPC on its Enterprise plan.
Start with the smallest tool that solves today's memory problem, and switch only when your data model actually outgrows it.
Official screenshots: Mem0 pricing page, Zep pricing page (plans and credits), Letta pricing documentation, captured by lightmind24.
Last verified: 2026-11-04
Sources: Mem0 pricing, Mem0 Platform quickstart, Mem0 FAQs, Zep pricing, Zep agent memory quickstart, Letta pricing, Letta Agent SDK memory.
댓글
댓글 쓰기