All Repos
RAG & RetrievalPythonApache-2.0

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.

#agentic-memory#agentic-memory-system#agents#ai#ai-agents#chatgpt#genai#llm
View on GitHub 68kGitHub stars

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

  1. Clone & open

    bash
    git clone https://github.com/mem0ai/mem0.git
    cd mem0
    claude
  2. Let Claude read it

    Ask “/init” to generate a CLAUDE.md, then have Claude explain, run, or extend the codebase. It reads files on demand.

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

Catalog data refreshed . Something wrong? Report it.