Agents & Multi-Agent

Mem0: Universal Memory Layer for AI Agents

mem0ai/mem0

Mem0 is an open-source memory layer for AI agents and assistants, enabling personalized, long-term memory across user sessions. It provides multi-level memory retention, hybrid retrieval, and temporal reasoning through Python and npm SDKs, a self-hosted server, or a managed cloud platform.

★ 62.5KStars
⑂ 7.3KForks
666Open issues
PythonLanguage
Apache-2.0License
Q@project.QualityScoreEditorial score

Project screenshots

Screenshot of Mem0: Universal Memory Layer for AI Agents Screenshot of Mem0: Universal Memory Layer for AI Agents

Overview

Mem0 ('mem-zero') enhances AI assistants and agents with an intelligent memory layer that remembers user preferences, adapts to individual needs, and continuously learns over time. The project introduced a new memory algorithm (April 2026) that uses single-pass ADD-only extraction, entity linking, multi-signal retrieval (semantic, BM25 keyword, and entity matching), and temporal reasoning. Benchmark improvements reported on the managed platform include 92.5 on LoCoMo, 94.4 on LongMemEval, and 64.1 on BEAM (1M tokens). The open-source SDK may yield directionally similar but not identical results, as managed platform benchmarks include proprietary optimizations. The repository is written primarily in Python, is not archived, and is actively maintained.

Key features

  • Multi-level memory: User, Session, and Agent state retention with adaptive personalization
  • Single-pass ADD-only extraction with no UPDATE/DELETE overwrites
  • Entity linking across memories for retrieval boosting
  • Multi-signal retrieval fusing semantic, BM25 keyword, and entity matching
  • Temporal reasoning for time-aware retrieval
  • Cross-platform SDKs (Python and npm) and a CLI
  • Self-hosted server with auth and dashboard, or managed cloud platform
  • Agent skills for AI coding assistants (Claude Code, Codex, Cursor, Windsurf, OpenCode, OpenClaw)
  • Integrations with Langgraph, CrewAI, and a browser extension for ChatGPT, Perplexity, and Claude

Requirements, installation and quick start

Library (Python): pip install mem0ai. Library (npm): npm install mem0ai. For enhanced hybrid search: pip install mem0ai[nlp] followed by python -m spacy download en_core_web_sm. CLI: npm install -g @mem0/cli or pip install mem0-cli. Self-hosted server: cd server && make bootstrap (recommended), or cd server && docker compose up -d for manual setup.

Usage

Instantiate Memory in Python, search for relevant memories using memory.search with a user_id filter, inject retrieved memories into the LLM system prompt, generate a response, then call memory.add with the full message history to store new memories. CLI usage includes: mem0 init, mem0 add "<text>" --user-id <id>, and mem0 search "<query>" --user-id <id>. Agent signup is available via mem0 init --agent --agent-caller <name>.

Model compatibility and use cases

Defaults to OpenAI gpt-5-mini as the LLM and text-embedding-3-small as the embedding model. Supports a variety of LLMs and embedders; configuration details are available in the repository's supported LLMs and supported embeddings documentation.

License and risk notes

Licensed under Apache-2.0. See the LICENSE file in the repository for details.

Editorial verification 2026-08-09: repository URL, owner, description, license and repository statistics were reviewed. License metadata: Apache-2.0. README was fetched for the channel draft; re-check repository dependencies, releases and model terms before production use.

Release and maintenance

New memory algorithm introduced in April 2026 with single-pass ADD-only extraction, agent-generated facts as first-class data, entity linking, multi-signal retrieval, and temporal reasoning. A migration guide from OSS v2 to v3 is available. The evaluation framework is open-sourced for reproducibility.

Firecrawl

firecrawl/firecrawl

★ 161.1KTypeScript

LangChain

langchain-ai/langchain

★ 143.6KPython

RAGFlow

infiniflow/ragflow

★ 86.7KGo