Model or dataset
mem0ai/mem0 avatar
mem0ai/mem0

Mem0: A Memory Layer for AI Agents with a New Single-Pass Algorithm

Mem0 stores and retrieves user, session, and agent memories so AI applications can carry preferences and context across conversations.

65,344 stars7,656 forksTypeScriptApache-2.0

At a glance

What is it?
Mem0 is an open-source memory layer that stores user, session, and agent memories for AI applications. This review covers its new April 2026 algorithm, self-hosted options, and the trade-offs you should check before adopting it.
Who is it for?
Adopt Mem0 if you are building an AI assistant, customer support bot, or autonomous agent that needs persistent user preferences across sessions, and you are comfortable with either a managed cloud platform or running a Docker-based server. Skip it if you need fully offline operation with no external LLM calls, or if your memory workload requires frequent updates and deletions, since the new algorithm is ADD-only.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What Mem0 Actually Does

Mem0 is a memory layer for AI applications. It stores user, session, and agent memories so that an assistant can recall preferences and context across conversations. The README positions it for customer support chatbots, AI assistants, and autonomous systems. The core idea is that instead of stuffing all history into a prompt, you extract and store the important facts, then retrieve them when needed. This is a specific problem: LLMs are stateless, and every conversation starts from zero unless you persist something externally. Mem0 gives you an API to add and search memories, with the storage and retrieval logic handled for you.

The New Algorithm: Single-Pass ADD-Only Extraction

The April 2026 algorithm change is the most significant part of this release. The README states the new approach uses single-pass ADD-only extraction: one LLM call, no UPDATE or DELETE operations. Memories accumulate; nothing is overwritten. This is a deliberate design choice. The claimed benefits are better benchmark scores and lower token usage. The README reports LoCoMo at 92.5, LongMemEval at 94.4, and BEAM scores of 64.1 and 48.6 for 1M and 10M tokens respectively. These numbers come from Mem0's managed platform, which includes proprietary optimizations. The README explicitly warns that open-source users should expect directionally similar gains but not identical numbers. That caveat matters. If you rely on the open-source SDK, you cannot assume you will get 92.5 on your own stack. The algorithm also adds entity linking and multi-signal retrieval, which combines semantic, BM25 keyword, and entity matching in parallel. Temporal reasoning is included, which ranks dated instances based on whether the query is about current state, past events, or upcoming plans.

Three Ways to Run It: Library, Server, Cloud

The README presents three deployment modes. The library is for testing and prototyping: `pip install mem0ai` or `npm install mem0ai`. For enhanced hybrid search with BM25 and entity extraction, you install `mem0ai[nlp]` and download a spaCy model. The self-hosted server is for teams running their own infrastructure. The recommended command is `cd server && make bootstrap`, which starts the stack, creates an admin, and issues the first API key. Alternatively, `docker compose up -d` starts the stack, and you finish setup via a browser wizard at http://localhost:3000. Self-hosted auth is on by default. If you upgrade from a pre-auth build, you need to set `ADMIN_API_KEY` or use `AUTH_DISABLED=true` for local development. The cloud platform is for zero-ops production use. The README also mentions a CLI, installed via `npm install -g @mem0/cli` or `pip install mem0-cli`. The CLI lets you run `mem0 init`, `mem0 add "Prefers dark mode" --user-id alice`, and `mem0 search "What does Alice prefer?" --user-id alice`.

Agent Signup and the CLI Flow

One interesting feature is the agent signup flow. The README says AI agents can mint a working API key in under five seconds, with no email, dashboard, or OTP. The commands are: `npm install -g @mem0/cli`, then `mem0 init --agent --agent-caller claude-code`, then `mem0 add "I am using mem0"`, then `mem0 search "am I using mem0"`. A human owner can later claim the account with `mem0 init --email <their-email>`, and memories are preserved. This is a practical answer to the problem of agents needing credentials without human friction. The CLI works for human users too, with `--user-id` flags to scope memories. This makes Mem0 accessible from a terminal, which is useful for quick tests or scripting.

Limitations and Wrong-Tool Cases

The ADD-only design is a genuine limitation. If your application needs to correct or delete a memory, the algorithm never overwrites. The README says memories accumulate; nothing is overwritten. That means outdated or wrong memories persist unless you have a separate mechanism to remove them. The README does not describe such a mechanism for the new algorithm. For use cases like healthcare, where patient records need corrections, this could be a problem. Also, the benchmark scores are from the managed platform, not the open-source SDK. The README is explicit about that. So if you self-host, you cannot claim the same performance. Another limitation is the dependency on an LLM for extraction. Every add operation makes an LLM call, which adds cost and latency. For high-volume memory writes, this could be expensive. The README does not provide cost estimates for the open-source path.

Alternatives: How Mem0 Differs

A common alternative is to use a vector database directly, such as Qdrant, with your own embedding and retrieval logic. Mem0 itself uses Qdrant for vectors in the cloud platform, and the README mentions a migration guide for hosted Qdrant vectors. The difference is that Mem0 adds a layer of extraction and entity linking on top of raw vector storage. With a raw vector DB, you store whatever text you choose, and retrieval is purely semantic. Mem0's approach uses an LLM to extract structured memories, links entities across memories, and fuses multiple retrieval signals. That is a higher-level abstraction, but it also means you are tied to Mem0's extraction logic and its LLM calls. If you want full control over what gets stored and how it is retrieved, a direct vector DB gives you that. Mem0 gives you convenience at the cost of flexibility.

Maintenance and License Considerations

Mem0 is licensed under Apache-2.0, which is permissive for commercial use. The repository is actively maintained, with recent releases including v2.0.19 of the Python SDK and plugin releases for Strands and DeepSeek. The README points to a migration guide for upgrading from OSS v2 to v3, which suggests that version upgrades may require changes. The self-hosted server has its own upgrade notes, particularly around auth. You will need to track those notes if you run the server. The open-source evaluation framework is available, so you can reproduce benchmark numbers on your own infrastructure. That is a concrete way to verify whether the algorithm meets your needs before committing.

Editorial conclusion

Adopt Mem0 if you are building an AI assistant, customer support bot, or autonomous agent that needs persistent user preferences across sessions, and you are comfortable with either a managed cloud platform or running a Docker-based server. Skip it if you need fully offline operation with no external LLM calls, or if your memory workload requires frequent updates and deletions, since the new algorithm is ADD-only. Before adopting, verify your exact retrieval latency with your own LLM stack, confirm the open-source SDK matches the benchmark scores (the README says they do not), and check the migration guide if you upgrade from an older version.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
  4. Release notes
Community notes

Community notes