mem0ai /mem0

The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.

★ 68,738⑂ 8,178👁 254⑃ 5,156● 2,366▤ 416◈ 162
PythonApache-2.0Created 2023-06-20mem0.ai
68,738
stars
+61
8,178
forks
254
watchers
5,156
prs
2,366
issues
416
releases
162
discussions

README

🎃 Register here → · Contributors get priority





  
    
  



  Learn more
  ·
  Join Discord
  ·
  Demo



  
    
  
  
    
  
  
    
  
  
    
  
  
    
  
  
    
  



  📄 Benchmarking Mem0's token-efficient memory algorithm →


 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

Core Capabilities:
- Multi-Level Memory: Seamlessly retains User, Session, and Agent state with adaptive personalization
- Developer-Friendly: Intuitive API, cross-platform SDKs, and a fully managed service option

Applications:
- AI Assistants: Consistent, context-rich conversations
- Customer Support: Recall past tickets and user history for tailored help
- Healthcare: Track patient preferences and history for personalized care
- Productivity & Gaming: Adaptive workflows and environments based on user behavior

 🚀 Quickstart Guide 

 Sign up as an agent

AI agents can mint a working Mem0 API key in under five seconds — no email, no dashboard, no OTP. Four commands end-to-end:

bash
 1. Install
npm install -g @mem0/cli       or: pip install mem0-cli

 2. Sign up as an a

Top issues

Discussions

Latest release

Mem0 Node SDK (v3.3.1) ts-v3.3.1 2026-09-25
Bug Fixes:
- Config (OSS): ConfigManager no longer injects OpenAI's default baseURL and model into non-OpenAI LLM providers. The defaults now apply only to openai and openai_structured, so a DeepSeek, xAI, or other provider config without an explicit baseURL or model falls back to that provider's own defaults and env vars (DEEPSEEK_API_BASE, XAI_API_BASE, ...) instead of pointing at OpenAI with an OpenAI model name (7350)
- Vector Stores: Turbopuffer filters now apply every operator (eq, ne, gt, gte, lt, lte, in, nin). Only the range operators were read before, so eq, ne, in, and nin were si

Snapshot: 2026-11-10T09:35:25Z · Data license Apache-2.0 · JSON