
Mem0 vs Zep vs Membase: Which AI Agent Memory Layer to Use in 2026
Disclosure: Membase is our product. Mem0 and Zep are the two most established memory layers, and for many projects one of them is the right choice. We say where. Pricing, licenses and features were checked on each vendor's pricing page, docs and GitHub in October 2026; see "How we compared" at the end.
Quick links: Get a free Membase API key · Python SDK · MCP server · Docs
TL;DR
All three give AI agents long-term memory through an API and an MCP server. They differ in how memory is stored and whose memory it is.
- Mem0 extracts facts from conversations and scopes them by
user_id. It's the most widely used memory layer, open source under Apache 2.0, with request-based pricing. Pick it for per-user memory inside a multi-tenant app. - Zep builds a temporal knowledge graph that records when each fact was true. Its engine, Graphiti, is open source; Zep Cloud adds team MCP access and enterprise controls. Pick it when facts change over time and you need their history.
- Membase learns your material into timestamped episodes and shares one memory between your agents and your AI tools (Claude Code, Cursor, Codex, ChatGPT, Claude), with per-app access and a source on every result. Free in beta. Pick it when several agents and AI tools should share one memory.
Mem0 vs Zep vs Membase at a glance
| Mem0 | Zep | Membase | |
|---|---|---|---|
| Best for | Per-user memory in a multi-tenant app | Facts that change over time; enterprise context | One memory shared by your agents and AI tools |
| Memory model | Extracted facts, linked by entities | Temporal knowledge graph (facts with validity time) | Timestamped episodes in topic trees, each tied to its source |
| Scoped by | user_id, agent_id, run_id, app_id | Users, threads, and shared graphs | Account (the tenant) and Memories (topics) |
| Changing facts | Newer facts supersede older ones (Dream, on Platform) | Old facts are marked invalid with a timestamp | No overwrite; episodes keep time and source |
| MCP | Hosted: mcp.mem0.ai/mcp | Hosted Memory MCP (Zep Cloud); Graphiti MCP (self-run, experimental) | Hosted: api.app.membase.com/mcp-http; local mode |
| For chat apps | Through MCP | Plugin for Claude and ChatGPT team workspaces | MCP for Claude and ChatGPT; Chrome extension for 6 chat apps |
| SDKs | Python, TypeScript | Python, TypeScript, Go | Python, TypeScript, CLI, REST |
| Self-hosting | Open-source library (Docker) | Graphiti only; Zep Cloud also offers BYOC | Local mode; compiled engine |
| License | Apache 2.0; Platform managed | Graphiti Apache 2.0; Zep Cloud proprietary | Proprietary engine; SDKs, CLI, MCP public |
| Pricing | Free · $19 · $249 · Enterprise | Free (10K credits) · $125 · $375 · Enterprise | Free in beta · Paid plans coming soon |
| Compliance | SOC 2 Type 1, HIPAA | SOC 2 Type 2, HIPAA | None published yet |
| Maturity | 60K+ GitHub stars | Graphiti ~31K GitHub stars | Beta, launched 2026 |
What each one is
Mem0 is the most widely adopted memory layer for AI agents. You send conversation turns to add; Mem0 extracts durable facts ("User prefers aisle seats") and you call search before the next model call. It comes as an open-source library you host and as Mem0 Platform, a managed API with graph memory, webhooks and background consolidation.
Zep stores memory as a Context Graph built by Graphiti. Each user has a graph built from their conversation threads and any business data you add. When new data contradicts a fact, Zep keeps the old fact and records when it stopped being true. Zep returns a ready-made Context Block for your prompt.
Membase, built by Unibase, is a memory layer that your code and your AI tools share. You add notes, documents, web pages or chat exports to a Memory; a learning run turns them into timestamped episodes. Your agents reach it through the SDK or REST, AI tools through MCP, and chat apps through the Chrome extension.
6 differences that decide the choice
1. How memory is stored
| How it works | Strong at | Weak at | |
|---|---|---|---|
| Mem0 | An LLM extracts facts from messages; facts that mention the same entities are linked | Short, durable user facts; fast to start | Keeping the original context of a fact |
| Zep | Messages and data become graph nodes and edges; each fact has the time it became true and stopped being true | "What was true in March?"; facts that change | Setup and per-write LLM cost if you self-host Graphiti |
| Membase | Material is narrated into episodes that keep who said what, and when; episodes sit in topic trees | Tracing an answer back to a document; mixed material (notes, files, chats) | No entity graph; no automatic "current truth" |
2. Whose memory it is
This decides most cases.
- Mem0: your application owns memory about its users. One API key reaches all of them, and each call carries a
user_id. - Zep: also application-centric. You create a Zep user for each of your users; each gets a graph. Shared graphs hold context that isn't owned by one user, such as product knowledge.
- Membase: the account is the tenant, and a Memory is a topic, not an end user. If your product serves many people, each connects their own Membase account by OAuth consent or their own key. There is no app-wide key that reaches every user's memory.
What that means for you: for a SaaS product with thousands of end users behind your backend, Mem0 or Zep fits better today. For agents you run yourself or with your team, or a product where users bring and own their memory, Membase fits better.
3. When facts change
- Mem0 Platform: a background process (Dream) marks older facts outdated when newer ones contradict them and merges duplicates. The open-source library stays additive; you call
updateordelete. - Zep: contradiction is built into the graph. The old fact stays, with the time it was invalidated, so you can ask what was true at any point.
- Membase: doesn't overwrite. Each episode carries its time and source, so the newest statement comes back with its context, and the model sees both.
If you need a maintained "current truth", use Mem0 Platform. If you need history, use Zep. If you need to show where an answer came from, use Membase.
4. AI tools and MCP
All three run a hosted MCP server, aimed at different users.
| Mem0 MCP | Zep Memory MCP | Membase MCP | |
|---|---|---|---|
| Endpoint | https://mcp.mem0.ai/mcp | https://api.getzep.com/mcp | https://api.app.membase.com/mcp-http |
| Built for | A developer's own memory in coding tools | Company teams; members sign in with Google Workspace or OIDC | Individuals and teams; any account can connect |
| Clients | Claude, Claude Code, Codex, Cursor, Windsurf, VS Code | Claude and ChatGPT through an org plugin; Cursor and others directly | Claude, ChatGPT, Claude Code, Cursor, Codex and any MCP client |
| Permissions | User, agent, app or run filters | Per-member user graph; writes gated per connection | Read-only by consent; developer keys add write access per Memory |
| Billing | Within your Mem0 plan | Per MCP seat | Free in beta |
Zep's plugin route for Claude and ChatGPT expects team workspace plans (Claude Team or Enterprise, ChatGPT Business or Enterprise). Membase connects to individual accounts as a custom connector or plugin, and its Chrome extension also saves context from Gemini, Grok, DeepSeek and Kimi.
Add Membase to Claude Code:
claude mcp add --transport http membase https://api.app.membase.com/mcp-http \
--header "Authorization: Bearer $MEMBASE_API_KEY"
More options: Best MCP Memory Servers in 2026
5. Self-hosting and license
- Mem0: the library is Apache 2.0, with a Docker setup for a self-hosted server. Graph memory, Dream and the dashboard are Platform features.
- Zep: the Zep server is cloud-only (the old Community Edition was discontinued in 2025). You can self-host Graphiti under Apache 2.0 with Neo4j, FalkorDB or Amazon Neptune, plus LLM calls on each write. Zep Cloud also offers bring-your-own-cloud deployment.
- Membase:
pip install 'unibaseio-membase[local]'runs memory on your machine with your own model key. The engine is compiled and proprietary; the SDKs, CLI and MCP server are public.
If you need source code you can read and change, choose Mem0 or Graphiti.
6. Price, compliance and maturity
Pricing (each vendor's pricing page, October 2026):
| Free | Paid | |
|---|---|---|
| Mem0 | 10K adds and 1K retrievals a month | Starter $19 · Pro $249 (graph memory) · Enterprise |
| Zep | 10K credits a month | Flex $125 (50K credits) · Flex Plus $375 · Enterprise; annual billing is discounted |
| Membase | Free in beta | Paid plans coming soon |
Mem0 meters requests: retrievals run out first when several agents share a project. Zep meters credits for data you ingest. Membase's free plan includes an allowance for model turns; after that you can connect your own model key.
Compliance: Mem0 lists SOC 2 Type 1 and HIPAA; Zep lists SOC 2 Type 2 and HIPAA. Membase is in beta and has no published certifications yet. If you need the paperwork now, choose Mem0 or Zep.
The same task in all three
Save a decision, then retrieve it.
Mem0 Platform
from mem0 import MemoryClient
client = MemoryClient(api_key="...")
client.add([{"role": "user", "content": "We picked Postgres for the ledger service."}],
user_id="alice")
client.search("what database is the ledger on?", filters={"user_id": "alice"})
Zep
from zep_cloud.client import Zep
from zep_cloud import AddMessage
client = Zep(api_key="...")
user = client.user.create(user_id="alice")
thread = client.thread.create(user_uuid=user.uuid_)
client.thread.add_messages(thread.uuid_, messages=[
AddMessage(name="Alice", role="user", content="We picked Postgres for the ledger service.")
])
context = client.thread.get_context(thread.uuid_).context # a Context Block for your prompt
Membase
from membase import Membase
m = Membase() # reads MEMBASE_API_KEY
m.add("We picked Postgres for the ledger service.", container="mv-...")
m.search("what database is the ledger on?")
The scope argument shows the difference: Mem0 asks which user, Zep asks which thread (and its user), Membase asks which Memory.
What about benchmarks?
All three publish results, and they don't line up:
- Mem0 and Zep have publicly disputed each other's LoCoMo numbers and methods.
- Each vendor uses different reader models, judges and benchmark variants.
- Membase's local memory engine reports 93.1% on LoCoMo, 92.6% on LongMemEval_S and 92.2% on DMR (method). The hosted Membase service does not run this engine today, so these are not measurements of the hosted API. Zep reports 94.8% on DMR in its own paper, so on that benchmark Zep's published number is higher.
We don't put the three side by side. Test each on a sample of your own conversations before you decide.
Which should you choose?
| Your situation | Choose |
|---|---|
| SaaS or consumer app with thousands of end users behind one backend | Mem0 |
| You want open-source code you can self-host and modify | Mem0 (library) or Graphiti |
| Facts change and you need to know what was true when | Zep |
| You need context from business data (CRM, tickets) joined with chat history | Zep |
| Your company wants memory in Claude and ChatGPT team workspaces with SSO | Zep |
| You need SOC 2 or HIPAA documentation today | Mem0 or Zep |
| Several agents share one memory, each with its own scoped key | Membase |
| Claude Code, Cursor, Codex and ChatGPT should read the same memory as your code | Membase |
| Answers must show which document they came from | Membase |
| You want to start free while you build | Membase (free in beta) |
Using two together is reasonable: Mem0 or Zep for per-user memory inside your product, Membase for your team's working memory across agents and AI tools.
Start building with Membase
- Get an API key: app.membase.com → Connect › Developer keys
- Python:
pip install unibaseio-membase· PyPI - TypeScript:
npm install @unibaseio/membase· npm - MCP server: setup guide ·
https://api.app.membase.com/mcp-http - Guide: How to Add Long-Term Memory to an AI Agent
How we compared
We read each vendor's pricing page, documentation and GitHub repository in October 2026: Mem0's pricing, Platform and MCP docs; Zep's pricing, key concepts, SDK and Memory MCP docs and launch post; and Membase's docs and SDK. Benchmark figures are as each vendor published them; we did not re-run them. Membase is our product. Spot an error? Email support@membase.com and we'll fix it.
Sources
- Mem0: pricing · GitHub
- Zep: pricing · key concepts · SDKs · Memory MCP launch · Use Zep in Claude, ChatGPT and Cursor · Graphiti on GitHub
- Membase: research and benchmark method · docs · SDK on GitHub
- Related: Membase vs Mem0 · Mem0 alternatives