What it is: Mem0 (pronounced "mem-zero") is an open-source memory layer for AI agents. It sits between your loop and your model, extracts the durable facts out of a conversation, stores them per user, and hands the relevant ones back on the next turn — so your agent stops forgetting everything the moment a request ends.
Who it's for: Anyone building an assistant, agent, or app where the user expects it to remember — preferences, past decisions, who they are — across sessions, without you re-sending the entire chat history on every call.
The problem it solves#
A stateless model is amnesiac by design. Each request starts from nothing, so the naive fix is to paste the whole conversation back into the prompt every time. That works for a few turns and then falls apart: you pay for those tokens on every call, and past a point the model degrades even with a million-token window — long context is not the same thing as long-term memory. Mem0 replaces "carry everything" with "store the few facts that matter, retrieve only those."
How you use it — two calls#
The open-source SDK exposes a Memory class. You write after a turn and read before the next one:
from mem0 import Memory
memory = Memory()
# After a turn: extract and store what matters, keyed to the user
memory.add("I prefer dark mode and I ship on Fridays", user_id="alice")
# Before the next turn: pull back the relevant facts
results = memory.search("What does alice prefer?",
filters={"user_id": "alice"},
top_k=3)
add() doesn't just dump the string — it runs an LLM pass to pull out the durable facts and dedupe them against what's already stored. search() returns the memories relevant to the current query, which you then splice into your prompt. That's the whole contract: write memories, search memories, scoped by user_id.
Under the hood it's configurable — the default LLM is gpt-5-mini and the default embedding model is text-embedding-3-small, but you can swap in other providers and point it at your own vector store. The managed Platform swaps the Memory class for a MemoryClient that talks to Mem0's cloud instead of your infrastructure; the add/search shape stays the same.
Mem0 is not the brain and not the loop. It's the part that remembers — so the brain can stay stateless and cheap.
Open-source vs. managed#
- Open-source (Apache-2.0):
pip install mem0ai, bring your own vector store and LLM, self-host with Docker. Nothing leaves your infrastructure. This is the path when data residency or cost control matters. - Managed Platform (app.mem0.ai): hosted storage, dashboard, and API keys, with a free Hobby tier for prototyping and paid plans above it (check mem0.ai/pricing for current tiers). This is the path when you want persistence working today and don't want to operate the storage layer.
About those benchmark numbers#
Mem0 markets strong scores: 92.5 on LoCoMo and 94.4 on LongMemEval with single-pass retrieval (one call, no agentic loop). Take them as a reason to shortlist, not a verdict. They're the vendor's own figures on its managed platform, and LoCoMo is close to saturated in 2026 — once managed systems all cluster in the low 90s, the headline number stops separating a good system from a great one. The honest test is your own: run your real traffic through it, measure whether the right facts come back and what each retrieval costs, and compare against the alternatives before you commit.
The one-line take#
If your agent should remember its users and you don't want to build extraction, dedup, and retrieval from scratch, Mem0 gives you a persistent memory layer in two calls — open-source when you need to own the data, managed when you need it working today.



