Skip to content

← Blog

comparisonopen-sourcememory

6 Best Open-Source Alternatives to Mem0 (2026)

Mem0's self-hosted build lacks graph memory, webhooks, and audit logs. Compare six open-source alternatives on benchmarks, governance, and what's actually free.

By Saber Maram

Statewave is our answer to the question this post asks. What separates it from Mem0 is not a leaderboard position; it is what the free build includes: provenance, signed audit receipts and access policies, which Mem0 either charges for or leaves out of self-hosting.

We build Statewave, so weigh the first entry accordingly. Our head-to-head methodology is public and our benchmark fork is open, so you can diff it against Mem0's upstream and run the comparison yourself.

Open-source Mem0 alternatives covered:

  • Statewave: a memory runtime on Postgres that keeps a record of what each agent saw. Best for support agents, multi-agent pipelines, and regulated data.
  • Graphiti (by Zep): a temporal knowledge graph. Best when facts change over time.
  • Letta: agents that edit their own memory. Best for building the agent from scratch.
  • Cognee: graph plus vector memory over documents and code.
  • LangMem: memory building blocks for LangGraph apps.
  • Supermemory (local): memory and RAG on a single machine.

Mem0 earned its place as the default. It takes three lines of code to add, ships Python and JavaScript SDKs, and offers a hosted API. Mem0 raised $24M in October 2025 and reported API calls rising from 35 million in Q1 to 186 million in Q3 2025. CrewAI, Flowise and Langflow use it natively, and AWS picked it as the exclusive memory provider for its Agent SDK. The GitHub repo had passed 65,000 stars as of September 2026. For personalizing a chat assistant, that is hard to beat.

The problems start when you self-host, need an audit trail, or run several agents against the same memory. This post covers what changes at that point. It then compares six open-source alternatives against the reasons teams actually leave.

Why do teams look for alternatives to Mem0?

Teams rarely leave Mem0 because retrieval looked weak in a demo. They leave when production requirements run into the self-hosted edition. The same four reasons keep coming up.

Fourteen capabilities Mem0's docs list as Platform-only, grouped into retrieval and ranking, data operations, tenancy and visibility, and operations.
Mem0's Platform vs Open Source page lists these as Platform-only, by our count 14 capabilities (as of September 2026). Graph memory was removed from the open-source SDK in v3.

1. The open-source build is a different product

Mem0's Platform vs Open Source page lists what self-hosted users don't get:

  • graph memory, memory decay, temporal reasoning and Dream background consolidation
  • webhooks, memory export, batch updates and deletes, feedback signals, summaries and custom categories
  • app-level scoping, orgs and projects, and a project-wide event log
  • the web dashboard

The same page says the OSS SDK returns a not-supported error if you pass it the decay or temporal parameters. By our count, that is 14 capabilities the page lists as Platform-only (as of September 2026).

Graph memory is the clearest example. When Mem0 moved its open-source SDK to the v3 pipeline, it deleted about 4,000 lines of external graph store drivers, covering Neo4j, Memgraph, Kuzu, Apache AGE and Neptune. Its migration guide tells OSS users who need graph memory to move to the Platform.

Mem0's headline numbers come with a caveat too. The README says its benchmark scores come from the managed platform, which has proprietary optimizations the open-source SDK does not.

2. Graph memory and real retrieval volume start at $249 a month

Mem0's hosted plans, as of September 2026, are:

  • Hobby: free, 1,000 retrievals a month
  • Starter: $19, 5,000 retrievals a month
  • Pro: $249, 50,000 retrievals a month

Graph memory and Dream consolidation start at Pro.

Retrieval limits hit before storage limits do. Picture a support agent handling 300 conversations a day, with three memory lookups per conversation. That is about 27,000 retrievals a month, more than five times the Starter allowance, which puts you on Pro.

3. Audit logs, on-prem and SSO are Enterprise-only

On Mem0's pricing page, on-prem deployment, audit logs, SSO and SLA support appear only in the custom-priced Enterprise plan. Self-hosting doesn't fill that gap. The OSS edition keeps only a history for each individual memory, with no project-wide log of adds, searches and deletes. It can scope memory by user_id, agent_id and run_id, but it has no app_id for separating tenants.

Some teams have to prove what an agent saw before it answered: a support team under GDPR, or a fintech facing an auditor. For them this is the core requirement, not an extra. Governing what the model actually sees happens on the retrieval path, and the retrieval path is exactly where Mem0 OSS keeps no records.

4. You can't reproduce what the agent saw

Mem0 search returns whichever memories rank highest at the moment you query. The OSS build doesn't store the exact set of memories a response was built from. So when a customer asks why the agent said their refund was approved, you end up digging through logs instead of looking up a record. That is the case for an audit trail for agent memory.

What does "open source" actually mean for a memory layer?

An Apache-2.0 badge doesn't guarantee that the free build includes the features you are switching for. We checked Mem0 and the five alternatives that appear most often in these comparisons. Four of those six document a free, self-hosted edition that offers less than the paid one.

  • Mem0: by our count, 14 Platform-only capabilities, and graph memory removed from OSS.
  • Zep: stopped maintaining Community Edition and moved its open-source work to Graphiti. Graphiti is a library, not a memory service.
  • Cognee: using Postgres as the graph store ships as a demo feature. The production-ready version of it is a licensed product.
  • Supermemory: the local build runs as one process on one machine with a single API key. Proprietary extraction models, multi-member orgs and connectors are Enterprise features.

LangMem ships its memory engine in full, and so does Letta, which keeps only cloud-hosted agent memory as a paid service. Statewave has no paid edition at all.

Table of seven memory projects showing what ships in the free self-hosted build against what is reserved for paid or managed, with each labelled fully open, mostly open or open core.
Four of those six, Mem0, Zep, Cognee and Supermemory, hold something back from their self-hosted edition.

Ask every candidate one question: is the feature I'm leaving Mem0 for included in the free build today, under the same license?

Best Mem0 alternatives compared

A quick comparison of open-source memory tools based on architecture, control, auditability, and production readiness, as of September 2026.

ToolMemory modelYou runAudit in the free buildPublic benchmarkBest for
Mem0 OSS (baseline, Apache-2.0)Extracted facts + vector searchVector store, LLM, embedderPer-memory history onlySame-suite run, methodology publicQuick personalization
Statewave (Apache-2.0)Typed memories compiled from events, ranked bundlesPostgres + pgvectorSource links, signed receipts, policiesSame-suite run, methodology publicProduction, support, multi-agent, regulated data
Graphiti (Apache-2.0)Temporal knowledge graphNeo4j, FalkorDB or NeptuneHistorical graph edgesDMR 94.8% (Zep paper)Facts that change over time
Letta (Apache-2.0)Agent-edited memory blocksLetta App ServerGit-tracked memoryLoCoMo 74.0% (Letta blog)Stateful agents from scratch
Cognee (Apache-2.0)Graph + vector over docs and codePluggable storesInspectable evidenceBEAM reportKnowledge-heavy memory
LangMem (MIT)Memory tools + background managerLangGraph storeNone built inNone publishedLangGraph apps
Supermemory local (MIT)Memory + RAG engineOne local processServer logsSelf-reported #1 LongMemEvalSingle-machine memory

Benchmark numbers from different test setups and model stacks can't be compared directly. Only the Mem0 and Statewave rows come from the same run, on a public fork of Mem0's suite that you can clone and rerun yourself.

The 6 best open-source alternatives to Mem0

These alternatives take different approaches to memory, from vector search and knowledge graphs to governed, agent-managed memory.

1. Statewave: governed, reproducible memory for production agents

The smaramwbc/statewave repository on GitHub, described as an open-source memory runtime for AI agents with reproducible, provenance-tagged context bundles.

Statewave is a memory runtime, not a vector store. It works in four steps:

  1. Record: the agent's raw events are saved as immutable, append-only "episodes."
  2. Compile: a compiler turns episodes into typed memories. Each memory carries a confidence score, a validity window and the IDs of the episodes it came from.
  3. Context: at answer time, Statewave builds a ranked context bundle that fits a token budget you set.
  4. Govern: policies, receipts and deletion control what each caller can see and leave a record of what it saw.

The same subject, task and token budget over the same memory state always return the same bytes. That determinism separates compile-then-use from query-time retrieval, where random variation in results leaks into every answer.

Accuracy on Mem0's own benchmark harness for LoCoMo and LongMemEval, comparing Statewave, Mem0 cloud and Mem0 OSS with only the memory backend changed between runs, noting that Mem0 OSS retrieves at most 20 memories per query against roughly 200 for the other two.
Same benchmark code, same judge. Only the memory backend changes between runs.

How we ran the benchmark: We forked Mem0's own benchmark code and changed only the memory backend, with Mem0's judge unchanged and gpt-4o as both answerer and judge. We also applied three fixes to Mem0's client code, and every one of them raises Mem0's scores:

  • a corrected add URL for Mem0 cloud (without it, cloud ingested nothing)
  • a fixed search filter for Mem0 OSS
  • date grounding for Mem0 OSS

One asymmetry runs the other way, and you should weigh it. Mem0's open-source library retrieves at most 20 memories per query by default, against roughly 200 for Statewave and Mem0 cloud. Part of any gap to Mem0 OSS is that retrieval budget rather than ranking quality, which is why the comparison with Mem0 cloud, where budgets are comparable, is the fairer one.

Each result is a single run. LongMemEval used 30 questions, so treat it as directional only. Mem0 publishes higher figures for its newer algorithm, 92.5 on LoCoMo and 94.4 on LongMemEval. Those came from a different model stack than the one our fork runs. You can run the comparison yourself: clone the benchmark repo and diff the fork against upstream. The full methodology is on the benchmarks page.

How Statewave addresses each reason teams leave Mem0:

Why teams leave Mem0What Statewave does
The OSS build is cut downThere is no paid edition. The server, SDKs, connectors and admin console are all Apache-2.0.
Graph and temporal features cost $249The free build ranks memories by kind, recency, task relevance, semantic similarity and whether they are still valid. Older overlapping memories are automatically superseded.
Audit logs and tenancy are Enterprise-onlyHMAC-signed receipts that can be replayed, sensitivity labels with YAML deny and redact policies, tenant isolation through an X-Tenant-ID header, and per-tenant region pinning.
You can't reproduce what the agent sawEvery memory links back to its source episodes, and every context call leaves a receipt.

What the reference repos show:

  • statewave-multi-agent-memory: Three analyst agents ingest conflicting sources at the same time. One records Stripe's old fee of 3.5% + 35¢ and another records the new 2.9% + 30¢. When the two memories reach a word-overlap score of 0.6 or higher, the compiler marks the older one superseded. The synthesis agent only ever sees 2.9%, and you write no merge logic. See how conflict resolution keeps memory clean.
  • statewave-multi-agent-shared-context: A Planner agent deprecates a legacy auth module. Because the Coder agent reads shared context before writing code, it skips the deprecated module instead of rebuilding it. A timeline inspector shows what each agent knew when it acted, and the repo includes a CrewAI tool wrapper.
  • statewave-personal-assistant: Memory is added with two API calls around the LLM call. For a user with six sessions, raw history is about 2,800 tokens. Statewave fits the ranked version into about 761 tokens under an 800-token budget, roughly 73% fewer. See how token-bounded context assembly works.
The Statewave core loop of record, compile, context and govern next to three parallel agents reading and writing one shared subject.
One memory loop, shared by every agent, with a receipt for every context call.

For support teams, Statewave adds session-aware ranking, handoff packs for escalations, health scores from 0 to 100 and SLA tracking. It also offers repeat-issue detection, and connectors feed in history from Zendesk, Intercom, Freshdesk, GitHub, Slack and Jira.

Getting started takes one command: npx @statewavedev/statewave, which boots Statewave in demo mode with the API, admin console and Postgres running locally. It wires Statewave into Claude Code, Cursor, VS Code Copilot and Codex CLI. The project has 708 unit tests and 56 eval assertions.

Honest limits:

  • Self-hosted only, with no managed cloud.
  • No first-class entity graph.
  • Runs on a single Postgres database. Multiple API replicas are verified, but cross-region clustering isn't available.
  • Tenant isolation is enforced in the application, without Postgres row-level security.
  • Bundles are denser than a plain fact store, so each answer uses more tokens.

Best for: teams whose memory must stay in their own infrastructure and be explainable to an auditor or customer. That covers support agents, multi-agent pipelines and regulated SaaS. If you're coming from Mem0, the migration recipe maps user_id to subject_id, add to POST /v1/episodes and search to POST /v1/context. You can have it running locally in about two minutes.

2. Graphiti (by Zep): temporal knowledge graphs

The getzep/graphiti repository on GitHub, described as building real-time knowledge graphs for AI agents.

Graphiti builds a knowledge graph that records when each relationship was true, so an agent can answer questions about how facts changed. In the Zep paper, Zep beat MemGPT on the DMR benchmark, 94.8% to 93.4%, and improved LongMemEval accuracy by up to 18.5% over baseline implementations.

The trade-off is operations. You run Neo4j, FalkorDB or Neptune, and Kuzu support is deprecated. Zep's full memory service is now cloud-only. There are no receipts or access policies.

Best for: CRM, compliance or clinical agents where "who owned this account before March?" is a real question.

3. Letta: agents that manage their own memory

The Letta repository on GitHub, the framework for agents that edit their own memory blocks.

In Letta, the agent edits its own memory blocks. Context is tracked in git, and scheduled "dreaming" consolidates memory in the background. The original repo is now a landing page, and active source lives in letta-code. Letta agents on gpt-4o-mini scored 74.0% on LoCoMo just by storing conversation history in files, and Letta itself took that as a sign that current memory benchmarks may not mean much.

The trade-off: Letta is a framework you adopt, not a layer you drop into an existing agent.

Best for: new agents where you want the agent itself in charge of its memory.

4. Cognee: graph plus vector memory over documents and code

The topoteretes/cognee repository on GitHub, a graph and vector memory engine for documents and code.

Cognee turns text into entities and relationships, and code into a graph of symbols. Its API has four operations: remember, recall, improve and forget. It ships plugins for Claude Code and Codex.

Watch the edition line. Cognee can run graph, vector, cache and metadata on one Postgres instance, but Postgres as the graph store ships as a demo feature, and the production-ready version of it is licensed separately.

Best for: agents that need to reason over documentation, tickets and codebases, not just conversations.

5. LangMem: memory building blocks for LangGraph

The langchain-ai/langmem repository on GitHub, a memory tools library for LangGraph applications.

LangMem is MIT-licensed. It gives agents tools to save and search memory during a conversation, plus a background manager that consolidates what they learn. It plugs natively into LangGraph's store.

Two cautions. The default in-memory store loses everything on restart, so production needs a Postgres-backed store. And the last PyPI release was 0.0.30 in October 2025.

Best for: teams already committed to LangGraph that want the thinnest possible memory layer.

6. Supermemory (local): memory plus RAG on one machine

The supermemoryai/supermemory repository on GitHub, a combined memory and RAG engine behind one API.

Supermemory combines memory and RAG behind the same API as its hosted platform. It reports first place on LongMemEval and LoCoMo, and it publishes MemoryBench so others can compare providers.

The local build runs as one process on one machine with a single API key. Multi-member orgs, connectors and its tuned extraction models are Enterprise features.

Best for: personal assistants, prototypes and air-gapped experiments on a single box.

How do you choose the right Mem0 alternative?

Start from the reason you're leaving Mem0, not from a leaderboard. Five questions settle most evaluations:

  1. Does the free build include the feature you're switching for? Check the vendor's own edition-comparison or pricing page, not a listicle.
  2. Can you prove what the agent saw? If an auditor or customer might ask, you need links back to source events and a per-call record. Of the six here, Statewave is the only one whose free build documents both.
  3. What infrastructure do you run? A graph database, a vector database and an LLM are three systems to patch. Statewave needs one Postgres database. Here is why Postgres-only.
  4. Do several agents or tenants share memory? If so, test conflict handling and tenant boundaries before retrieval quality. See where tenant boundaries belong.
  5. Can you rerun the benchmark yourself? A benchmark you can clone and rerun beats a chart you can't.
A six-step decision tree answered top to bottom, routing auditability to Statewave, changing facts to Graphiti, self-editing memory to Letta, docs and code to Cognee, LangGraph to LangMem, and one machine to Supermemory local.
Pick by requirement, not by star count.

Which tool should you pick?

The fastest test is to run Statewave next to your current setup this afternoon. Boot it with npx @statewavedev/statewave, replay a week of real conversations through the migration recipe, and compare the two context bundles side by side. If you're unsure whether you need memory or retrieval, read AI agent memory vs RAG first.

Mem0, Zep, Graphiti, Letta, Cognee, LangMem and Supermemory are trademarks of their respective owners; used here for factual comparison. Pricing, feature lists and star counts are as of September 2026 and change frequently, so check each vendor's own page before you rely on them.

FAQ

1. Is Mem0 open source?

Yes, Mem0's SDK is Apache-2.0. However, Mem0's Platform vs Open Source page lists capabilities that exist only on the hosted Platform, including graph memory, temporal reasoning and webhooks. By our count there are 14 of them (as of September 2026). Mem0 also says its published benchmark scores reflect platform-only optimizations.

2. Does Mem0's open-source version support graph memory?

No. The v3 pipeline removed the Neo4j, Memgraph, Kuzu, Apache AGE and Neptune drivers from the OSS SDK. Mem0's migration guide points OSS users who need graph memory to the paid Platform.

3. Can I migrate from Mem0 to Statewave without rewriting my agent?

Mostly, yes. Mem0's user_id becomes a Statewave subject_id, add becomes an episode write, and search becomes a context request. Statewave's docs describe a bulk migration that carries each original Mem0 memory ID in the episode's provenance, so you can trace each memory back to where it came from.

4. Are LoCoMo and LongMemEval scores comparable across vendors?

Only when the benchmark code, models and judge are identical. The same system can score very differently on different setups. Statewave's comparison runs all three backends through one benchmark suite with gpt-4o as answerer and judge, and anyone can rerun it.

5. Which Mem0 alternative runs fully offline?

Statewave's heuristic compiler runs entirely locally with the embedding provider set to none or stub, and no data leaves your network. Supermemory local and LangMem with local models can also run offline, though with the limits described above.

6. Is Zep still open source?

Zep stopped maintaining its self-hosted Community Edition. Its open-source work now goes into Graphiti, a temporal knowledge graph library you run on your own graph database.

Discussion

Comments are powered by GitHub Discussions on smaramwbc/statewave. Sign in with your GitHub account to comment.