← Back to Leaderboard
Mmem0ai

mem0ai/mem0

A vector-backed memory layer for AI agents that need to recall past conversations

Engineering Health (Methodology)
A+ · 95/100
Maintenance Activity
● Updated 6d ago
Latest Release
ts-v3.3.1
Commercial License Check
Apache-2.0 · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption23/25
Release Cadence17/20
License Clarity20/20
DockerSelf-HostedAPICLI
Total Stars
★ 70,036
24h Growth
+63
7d Growth
+498
Forks
8,349

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

mem0ai/mem0 Star History (2023-06-20 - 2026-12-04) ALL-TIME STAR HISTORY (2023-06 – 2026-12) +70k in 1263d · avg +55/day 74k 37k 0 2023-06-20: ★ 12023-09-09: ★ 4,6022023-11-25: ★ 5,5892024-02-10: ★ 7,1522024-04-27: ★ 8,0182024-07-13: ★ 8,5632024-09-28: ★ 21,0622024-12-14: ★ 22,4262025-03-01: ★ 24,1612025-05-17: ★ 30,2492025-08-02: ★ 36,6942025-10-18: ★ 40,4632026-01-03: ★ 44,0392026-03-21: ★ 49,7822026-06-06: ★ 57,2072026-08-22: ★ 63,4062026-12-04: ★ 70,036 ★ 70k 2023-06 2025-03 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

Mem0 is an application-level memory layer, not a replacement for the vector database beneath it. The Python integration calls Memory.search() with a scope such as user_id, injects the returned facts into the prompt, and calls Memory.add() after the response. The application still owns answer generation. The extraction path uses an LLM to derive memories from conversation turns, then embeds and indexes them for later recall.

The monorepo separates the Python package (mem0/), TypeScript SDK (mem0-ts/), server (server/), and CLI (cli/). The Python manifest declares openai, qdrant-client, pydantic, httpx, and sqlalchemy, with optional NLP and vector-store dependencies. Pluggable model and storage choices let teams change the memory backend without moving the chat-generation loop into Mem0.

Key Capabilities & Differentiators

Memory can be scoped by user, session, or agent. The single-pass, ADD-only extraction design retains earlier facts and also records assistant-confirmed actions. Retrieval combines semantic similarity, BM25, and entity signals; temporal ranking helps distinguish current state from past events and upcoming plans. The Python setup pairs mem0ai[nlp] with spaCy’s en_core_web_sm for enhanced keyword matching and entity extraction. Defaults are gpt-5-mini and text-embedding-3-small.

Managed-platform results under a single-pass top_200 retrieval budget are 92.5 on LoCoMo, 94.4 on LongMemEval, and 64.1 on BEAM (1M). BEAM (1M) used 6.7K tokens with a 1.00 s p50. The managed platform includes proprietary optimizations, so these figures are neither OSS performance estimates nor end-to-end latency targets for an application.

Trade-offs & Limitations

Compared with using Qdrant or pgvector directly, Mem0 supplies custom logic that a vector store does not: extracting durable facts from chat, scoping them, and ranking them for recall. If the application already has an explicit schema and deterministic update rules, direct storage is simpler and more predictable. ADD-only extraction preserves history but leaves potentially conflicting facts in play; temporal ranking helps retrieval, but it does not guarantee an authoritative current value.

Extraction adds a model call to the write path, and retrieval adds work before generation. Budget model costs, vector-store growth, and provider rate limits separately from chat inference. The Apache-2.0 self-hosted stack gives operators control over that API deployment, while the managed platform reduces operational work and includes optimizations not available in OSS. Neither an authenticated API nor a scope filter replaces application-level tenant authorization.

Hardware & Deployment Guide

For embedded use, install mem0ai on Python >=3.10,<4.0 or install mem0ai via npm for the TypeScript SDK. For a shared API, run cd server && make bootstrap, or use docker compose up -d from server/ and complete the browser setup. Self-hosted authentication is enabled by default. The default OpenAI model path requires outbound API access but no local GPU; a network-isolated deployment must replace those external dependencies and validate the chosen stack.

Pin the Python and TypeScript releases separately. Python v2.2.1 excludes rejected inserts from ADD results, history, and entity links, and raises an error if none of the extracted memories can be inserted. TypeScript ts-v3.3.1 stops injecting OpenAI default models and base URLs into non-OpenAI provider configurations.

Integration: Memory.search() retrieves scoped context before generation; Memory.add() extracts memories after the turn.
Write model: Single-pass, ADD-only extraction retains past facts and treats assistant-confirmed actions as memory candidates.
Hybrid retrieval: The Python nlp extra and en_core_web_sm enable the documented setup for BM25 matching and entity extraction alongside semantic retrieval.
Backend integration: The Python manifest includes qdrant-client and lists Chroma, Weaviate, Pinecone, and FAISS among optional vector-store dependencies.
Deployment: cd server && make bootstrap starts the self-hosted stack, creates an admin, and issues the first API key.
Write integrity: Python v2.2.1 no longer records vector-store rejections as successful ADD events.
Best For

Assistants and support agents that need to recall preferences, prior decisions, and confirmed actions across sessions, without building their own extraction and retrieval pipeline.

Skip If

You only need static document RAG, a deterministic profile store, or network-isolated operation and cannot validate a stack that replaces the default external model APIs.

Reviewed on 2026-12-02 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

DockerSelf-HostedAPICLI
# 1. Install
npm install -g @mem0/cli      # or: pip install mem0-cli

# 2. Sign up as an agent (replace `claude-code` with your name)
mem0 init --agent --agent-caller claude-code

# 3. Add a memory
mem0 add "I am using mem0"

# 4. Search
mem0 search "am I using mem0"

Comparison vs. Top RAG, Data & Memory Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
mem0 ★70k+498PythonApache-2.0A vector-backed memory layer for AI agents that need to recall past conversation
Memori17.9k+337Python—An SDK-based agent memory layer for persistent state across sessions.
OpenViking43.2k+255PythonAGPL-3.0A directory-scoped RAG database for inspectable agent knowledge and memory
hindsight64.7k+884PythonMITA bank-based memory service that turns agent interactions into durable knowledge

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/mem0ai/mem0.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

mem0ai/mem0 Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about mem0

How do I integrate Mem0 into an existing chat application?

Call Memory.search() before generating a response, filter it with the application’s authenticated user identifier, and pass the returned memories into the prompt. After the response, call Memory.add() with the conversation turns you want it to process. Keep authorization in the application: a user_id search filter is not an access-control check.

Do I need a GPU, and where does runtime overhead come from?

The default OpenAI extraction and embedding path does not need a local GPU. Size the app or server and vector store for write volume and query concurrency, and measure provider latency and rate limits. If you choose local models, CPU, RAM, and VRAM requirements depend on the models, serving runtime, and concurrency; there is no single Mem0 hardware target.

Can I self-host Mem0 commercially and keep sensitive data on-premises?

Apache-2.0 permits commercial use and self-hosting, subject to its terms, including applicable notice obligations when redistributing. That license does not cover every external model or service. Self-hosting the API does not keep data on-premises if calls still go to external model providers; review those data paths, access controls, retention, and deletion separately.

When should I choose Mem0 over Qdrant or pgvector directly?

Use Qdrant or pgvector directly if your application already defines what to store, how to update it, and how to retrieve it. Choose Mem0 to avoid building conversation-to-memory extraction and scoped recall yourself. Keep authoritative profile fields in a system of record rather than inferring current state from append-only memories.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining mem0ai/mem0? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature mem0ai/mem0 on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare