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.
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 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 last received commits 7 days ago.
- What is it written in?
- Mainly TypeScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 13, 2026, and from our analysis. They are not legal advice.
Star history
- mem0ai/mem068,918 ★ · +6,984
| Repository | 2026-07-28 | 2026-11-13 |
|---|---|---|
| mem0ai/mem0 | 61.9k | 68.9k |
6,984 Stars in the last 108 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial 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 and vim keybindings" --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. 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.
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's Python package depends on qdrant-client, and the README mentions a platform migration guide for importing hosted Qdrant vectors into Mem0 Platform. 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.2.1 of the Python SDK, v3.3.1 of the Node SDK and v0.3.2 of the DeepSeek plugin. 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 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 to expect directionally similar gains but not identical numbers), and check the migration guide if you upgrade from an older version.
Frequently asked questions
Can Mem0 be self-hosted?
Yes. The self-hosted route is a Docker Compose stack started with `cd server && make bootstrap`, which starts the stack, creates an admin and issues the first API key, or `cd server && docker compose up -d` followed by a browser wizard at localhost:3000. Self-hosted auth is on by default, and the project's comparison table lists a dashboard and auth and API keys for the self-hosted tier while marking its advanced features as Teasers rather than included.
What are the best alternatives to Mem0 for AI agent memory?
The useful answer from the package metadata is about the storage layer Mem0 sits on. The core package depends on qdrant-client, and an optional vector-stores group adds roughly two dozen packages including chromadb, weaviate-client, pinecone, faiss-cpu, pymilvus, redis, elasticsearch, oracledb and psycopg. The llms group similarly covers groq, together, litellm, ollama and the Google and Vertex clients, while openai sits in the required dependencies.
Who is the founder of Mem0 AI?
No individual founder is named in the package metadata or the opening of the README. The Python package metadata lists the author as Mem0 with a [email protected] contact, and the project overview links a Y Combinator company profile alongside the mem0.ai site.
Official sources
Where this project is recommended
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/mem0ai-mem0)Star history chart for your README
[](https://hysenlabs.com/projects/mem0ai-mem0)Was this useful?