Short answer: Pick LangMem if your agent is a LangGraph app and you want memory tools that store into LangGraph’s own store. Pick Mem0 if you want a memory layer you can run as a library or a server, outside any one framework, and Mem0 publishes benchmark numbers you can check. Both are open source. Hindsight is a serious third option, especially for long histories.
Sources: the Mem0 README and the LangMem README, both read 2026-11-29. Stars, license and last push from the GitHub API on 2026-11-29: Mem0 69,597 stars, Apache-2.0, last push 2026-11-27; LangMem 1,794 stars, MIT, last push 2026-11-16. LangMem’s PyPI release is 0.0.30.
What each one is
| Mem0 | LangMem | |
|---|---|---|
| Made by | Mem0 (mem0ai) | LangChain (langchain-ai) |
| Form | Python and Node library, self-hosted server (Docker), managed cloud | Python library that works with LangGraph |
| Install | pip install mem0ai, npm install mem0ai | pip install -U langmem |
| Where memories live | Your vector store (the migration guide mentions Qdrant), via the library or server; or the managed cloud | LangGraph’s long-term memory store (InMemoryStore for tests, AsyncPostgresStore for production, per the LangMem README) |
| License | Apache 2.0 | MIT |
| Works outside LangGraph | Yes, any app that calls its API | The tools need LangGraph’s store, so it is built for LangGraph |
How each one writes and recalls
Mem0 extracts facts from what you send it and stores them. Its README describes single-pass retrieval: one call, no agent loop, at a top_200 retrieval budget. Your code calls memory.add(messages, user_id=...) and memory.search(query, filters=...), or you run its server and call it over HTTP.
LangMem has two modes, both described in its README:
- Hot path. The agent gets memory tools (
create_manage_memory_toolandcreate_search_memory_tool) and decides when to save or search, as it chats. - Background. A memory manager extracts, consolidates and updates knowledge after the conversation, without the agent calling anything.
LangMem’s intro also mentions prompt refinement to change agent behavior over time.
What the numbers show
Mem0’s README reports these numbers for its own platform (April 2026 algorithm):
| Benchmark | Mem0 score | Tokens per call |
|---|---|---|
| LoCoMo | 92.5 | 7.0K |
| LongMemEval | 94.4 | 6.8K |
| BEAM (1M) | 64.1 | 6.7K |
| BEAM (10M) | 48.6 | 6.9K |
Source: Mem0 README, read 2026-11-29. The README says these are Mem0’s own runs, and that they “reflect Mem0’s managed platform, which includes proprietary optimizations not available in the open-source SDK”. Open-source users should expect lower scores.
LangMem’s README has no benchmark numbers. So there is no published accuracy comparison between the two. Do not read the Mem0 numbers as a LangMem score.
Where Hindsight fits
Hindsight is MIT-licensed, with the full server in the open-source release. It has an integration for LangGraph, and it works with 60+ other tools (see the LangMem vs Hindsight page for the head-to-head). Hindsight’s BEAM figures are 73.9 at 1M tokens and 64.1 at 10M, as listed on Mem0’s comparison page, which Mem0 wrote, so treat them as vendor-run. Mem0’s own figures on the same test are 64.1 and 48.6. Check them on your own data before you rely on either.
Hindsight’s limits: it returns more context per retrieval by default, so set max_tokens lower; and it is a separate server to run or buy. If you want memory without a second service, LangMem’s store-based approach is simpler.
Choosing
- Stay in LangGraph and want a small change: LangMem. Its tools work in
create_react_agentwith the store you already run. - Share memory between apps, or use it outside LangGraph: Mem0. It has a server and a cloud option.
- Long histories and published BEAM numbers matter most: compare Mem0 and Hindsight on your own tasks; both post long-history numbers.
Related
- LangMem alternatives: more options if neither fits.
- LangMem vs Hindsight: the head-to-head with Hindsight.
- Mem0 vs Hindsight: the same comparison for Mem0.
- Agent memory leaderboard: every system’s published numbers, with who ran each one.