Mem0
Drop-in memory infrastructure for AI agents and apps
About
Mem0 is an open-source memory layer that gives AI agents and assistants long-term memory: it extracts facts from conversations and stores them in a vector store so agents can recall user preferences and past context across sessions. Memories are scoped by user, agent, or run, with add/search/update/delete operations and hybrid retrieval (semantic + BM25 keyword + entity linking). The Python/TypeScript library runs locally with any configured LLM, while a self-hosted server and a managed cloud platform add dashboards, auth, and advanced features such as graph memory. The project is a Y Combinator S24 company with a published research paper and an open-source evaluation framework.
What it can do
- • Long-term memory with add/search/update/delete scoped by user_id, agent_id, run_id
- • Single-pass fact extraction from conversations (ADD-only in the latest algorithm)
- • Hybrid retrieval: semantic + BM25 keyword + entity linking, score-fused
- • Multi-level memory: user, session, and agent state with personalization
- • Pluggable LLMs, embeddings, and vector stores (OpenAI defaults)
- • Self-hosted server with dashboard and API-key auth
- • Managed cloud platform (app.mem0.ai) with advanced features (graph memory, temporal reasoning, decay)
- • MCP server, CLI (`mem0 add`/`mem0 search`), Python and TypeScript SDKs
Setup
- Install the library:
pip install mem0ai(ornpm install mem0ai). - Set your model keys — the defaults are OpenAI's
gpt-5-mini(LLM) andtext-embedding-3-small(embedder), so exportOPENAI_API_KEYor reconfigure to local providers to keep memory text on your machine. - (Privacy) Disable the default telemetry:
export MEM0_TELEMETRY=false. - Use it in code:
from mem0 import Memory; memory = Memory(), thenmemory.add(messages, user_id="alice")andmemory.search(query, user_id="alice")to recall before generating a response. - (Optional) Self-hosted server:
cd server && docker compose up -d; auth is on by default — setADMIN_API_KEYand register an admin via the wizard (orAUTH_DISABLED=truefor local dev only). - (Optional) Managed cloud: sign up at app.mem0.ai and use the API key; the MCP endpoint is
https://mcp.mem0.ai/mcp.
Prerequisites
Python 3.9+ or Node 18+; an LLM and an embedding model (OpenAI key by default; local models configurable); a vector store (defaults provided by the library); Docker for the self-hosted server.
Use cases
Works with
Trust score — 9/10
Scored 9/10 (verified tier, metrics-v1). Evidence: 67,047 GitHub stars (log-scaled vs catalog peers); blended with ~2,020,516 monthly package downloads; last push 0d ago; 100 releases/12mo; 820 open issues. Manual review: telemetry on by default (opt-out); default OpenAI backend sends memory text off-machine; platform-only features. License: Apache-2.0.
★ 67,047 GitHub stars
How the trust score is built
Full methodology →- Adoption · stars/downloads, log-scaled vs peers
- 9.0/10
- Maintenance · recency, releases, issue load
- 9.5/10
- Openness · license + docs
- 10.0/10
- Manual review · sanity read + red-flag check
- 8.0/10
- · 67,047 GitHub stars (log-scaled vs catalog peers)
- · blended with ~2,020,516 monthly package downloads
- · last push 0d ago; 100 releases/12mo; 820 open issues
- · manual review: telemetry on by default (opt-out); default OpenAI backend sends memory text off-machine; platform-only features
Sources
Every fact above was checked against these sources. Where a claim comes from the provider and couldn't be independently verified, the text says so.