Mem0 adds a persistent memory layer to AI assistants and agents, storing user, session and agent state. It is available as a Python/npm library, a self-hosted server, or a managed cloud platform.
Overview
Mem0 ("mem-zero") is memory infrastructure for AI assistants and agents. It extracts facts from conversations, stores them, and retrieves the relevant ones when a user interacts again. This lets an application remember user preferences and history across sessions instead of resending long chat histories.
Memory is kept at several levels: user, session and agent. The current algorithm uses single-pass extraction that only adds memories, treats facts generated by the agent as first-class, links entities across memories, and combines semantic, BM25 keyword and entity matching in retrieval. It also includes time-aware retrieval. The project reports benchmark results on LoCoMo, LongMemEval and BEAM, and says the evaluation framework is open-sourced. It notes that the managed platform includes optimizations not present in the open-source SDK.
There are three ways to use it. The library installs with pip or npm and suits prototyping. A self-hosted server runs with docker compose and includes a dashboard and authentication. The cloud platform is a managed service with API keys. A command-line tool manages memories from the terminal. Mem0 needs an LLM, with an OpenAI model as the default, and supports other LLMs and embedding models.
The project also ships agent skills for coding assistants such as Claude Code, Cursor and Codex, and lists integrations including LangGraph and CrewAI. The website describes enterprise options such as SOC 2, HIPAA, BYOK, audit logging and deployment on Kubernetes, private cloud or air-gapped environments.
Key features
- Multi-level memory for user, session and agent
- Single-pass memory extraction
- Hybrid retrieval with semantic, BM25 and entity matching
- Time-aware retrieval
- Python and Node.js SDKs
- Self-hosted server with dashboard and API keys
- Command-line tool
- Agent skills for AI coding assistants
Use cases
- Personalized AI assistants
- Customer support bots that recall past tickets
- Healthcare assistants tracking patient preferences
- Sales assistants with persistent context
- Adaptive tutoring and learning tools