mem0
mem0ai/mem0 · Updated
The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.
mem0ai/mem0 is a Python repository in the RAG & Retrieval category with 68,044 stars and 8,063 forks on GitHub, released under the Apache-2.0 license, last updated 2d ago.
How to install mem0 in your AI client
Setup for Claude Code, Claude Desktop, Cursor, Codex, Windsurf, Cline and VS Code — copy-paste ready.
How to install mem0 in Claude CodeAnthropic's agentic CLI
Clone & open
bashgit clone https://github.com/mem0ai/mem0.git cd mem0 claudeLet Claude read it
Ask “/init” to generate a CLAUDE.md, then have Claude explain, run, or extend the codebase. It reads files on demand.
How to install mem0 in Claude DesktopDesktop app (MCP config)
Clone the repository
bashgit clone https://github.com/mem0ai/mem0.gitOpen in your AI editor
Open the folder in your assistant and ask it to index the codebase, then reference files in chat.
How to install mem0 in CursorAI-first code editor
Clone & open in Cursor
bashgit clone https://github.com/mem0ai/mem0.gitIndex & chat
Open the folder — Cursor indexes it automatically. Use @Codebase in chat to ask about it or scaffold from it.
How to install mem0 in Codex CLIOpenAI coding agent
Clone
bashgit clone https://github.com/mem0ai/mem0.gitPoint Codex at it
Run codex in the repo root; add setup notes to AGENTS.md so the agent knows how to build & test.
How to install mem0 in WindsurfCodeium's agentic IDE
Clone & open
bashgit clone https://github.com/mem0ai/mem0.gitUse Cascade
Windsurf indexes the workspace; ask Cascade to explain or reuse modules from the repo.
How to install mem0 in ClineVS Code autonomous agent
Clone the repository
bashgit clone https://github.com/mem0ai/mem0.gitOpen in your AI editor
Open the folder in your assistant and ask it to index the codebase, then reference files in chat.
How to install mem0 in VS CodeCopilot / MCP support
Clone the repository
bashgit clone https://github.com/mem0ai/mem0.gitOpen in your AI editor
Open the folder in your assistant and ask it to index the codebase, then reference files in chat.
Documentation
Full README<strong>🎃 Register here →</strong> · Contributors get priority
Learn more · Join Discord · Demo
<strong>📄 Benchmarking Mem0's token-efficient memory algorithm →</strong>
New Memory Algorithm (April 2026)
| Benchmark | Old | New | Tokens | Latency p50 | | --- | --- | --- | --- | --- | | LoCoMo | 71.4 | 92.5 | 7.0K | 0.88s | | LongMemEval | 67.8 | 94.4 | 6.8K | 1.09s | | BEAM (1M) | — | 64.1 | 6.7K | 1.00s | | BEAM (10M) | — | 48.6 | 6.9K | 1.05s |
All benchmarks run on the same production-representative model stack. Single-pass retrieval (one call, no agentic loops) at a top_200 retrieval budget. Scores reflect Mem0's managed platform, which includes proprietary optimizations not available in the open-source SDK; open-source users should expect directionally similar gains but not identical numbers.
What changed:
- Single-pass ADD-only extraction -- one LLM call, no UPDATE/DELETE. Memories accumulate; nothing is overwritten.
- Agent-generated facts are first-class -- when an agent confirms an action, that information is now stored with equal weight.
- Entity linking -- entities are extracted, embedded, and linked across memories for retrieval boosting.
- Multi-signal retrieval -- semantic, BM25 keyword, and entity matching scored in parallel and fused.
- Temporal Reasoning -- time-aware retrieval that ranks the right dated instance for queries about current state, past events, and upcoming plans.
See the migration guide for upgrade instructions. The evaluation framework is open-sourced so anyone can reproduce the numbers.
Research Highlights
- 92.5 on LoCoMo -- +21 points over the previous algorithm
- 94.4 on LongMemEval -- +27 points, with 98.2 on assistant memory recall
- 64.1 on BEAM (1M) -- production-scale memory evaluation at 1M tokens
- Read the full paper
Introduction
Mem0 ("mem-zero") enhances AI assistants and agents with an intelligent memory layer, enabling personalized AI interactions. It remembers user preferences, adapts to individual needs, and continuously learns over time—ideal for customer support chatbots, AI assistants, and autonomous systems.
Key Features & Use Cases
Excerpt — the full document is on GitHub.
More RAG & Retrieval repositories
- RAG & Retrieval143k
awesome-llm-apps
100+ AI Agents, Agent Skills and RAG Apps - Free and Open Source.
PythonApache-2.0Shubhamsaboo/awesome-llm-apps
- RAG & Retrieval92k
PaddleOCR
Turn any PDF or image document into structured data for your AI. A powerful, lightweight OCR toolkit that bridges the gap between images/PDFs and LLMs. Supports 100+ languages.
PythonApache-2.0PaddlePaddle/PaddleOCR
- RAG & Retrieval85k
hello-agents
📚 《从零开始构建智能体》——从零开始的智能体原理与实践教程
Pythondatawhalechina/hello-agents
- RAG & Retrieval80k
Prompt-Engineering-Guide
🐙 Guides, papers, lessons, notebooks and resources for prompt engineering, context engineering, RAG, and AI Agents.
MDXMITdair-ai/Prompt-Engineering-Guide
- RAG & Retrieval68k
anything-llm
Stop renting your intelligence. Own it with AnythingLLM. Everything you need for a powerful local-first agent experience
JavaScriptMITMintplex-Labs/anything-llm
- RAG & Retrieval59k
serviette
A no-code RAG server that keeps answers in sync with your documents. Works with 8 vector databases. Built on Pathway.
PythonMITpathwaycom/serviette
Catalog data refreshed . Something wrong? Report it.