Mem0 Documentation — Universal Memory Layer for AI Agents
by Mem0
Give your agent memory that survives the session — hosted or self-hosted.
Overview
Mem0's documentation covers a universal memory layer that sits between an agent and its LLM, extracting durable facts from conversations and retrieving only the relevant ones instead of replaying the full history. It splits into two tracks that share the same API surface: the managed Mem0 Platform, which advertises a four-line integration with providers managed server-side, and the Apache-2.0 open-source package you self-host via Docker Compose. Core Concepts explains the extraction-and-retrieval pipeline, the memory scopes (user, agent, app and run), and the add, search, update and delete operations. Platform sections document graph memory, entity-scoped memory, custom categories, keyword search, reranking, hybrid retrieval, temporal reasoning, memory decay and expiration, direct import and export, webhooks and audit logs. The open-source track documents explicit provider wiring for 16-plus LLMs (OpenAI, Anthropic, Bedrock, Google AI, Groq, DeepSeek, Mistral, Ollama, LM Studio, LiteLLM, vLLM), 12-plus embedding providers, 25-plus vector stores including Qdrant as the default plus PGVector, Chroma, Milvus, Pinecone, Redis, Elasticsearch, OpenSearch, Supabase, FAISS and Weaviate, and five reranker options. Roughly 40 integration guides cover LangChain, LangGraph, LlamaIndex, CrewAI, AutoGen, Agno, the OpenAI Agents SDK, Google ADK, Mastra, the Vercel AI SDK, LiveKit, Pipecat, ElevenLabs, Claude Code and Cursor, and a large Cookbooks section ships runnable reference implementations. The project is backed by the arXiv paper 'Building Production-Ready AI Agents with Scalable Long-Term Memory' (2504.19413).
At a Glance
- Topic
- Agentic
- Level
- Intermediate
- Format
- Documentation
- Cost
- Freemium
- Duration
- ~3-4 hours to work through the quickstarts and core concepts, then reference
- Provider
- Mem0
- Hands-on
- Yes — code/exercises
- Certificate
- None
What You’ll Learn
- ✓Model agent memory as user, agent, app and run scopes
- ✓Wire the add/search/update/delete memory operations into an existing agent loop
- ✓Choose between the managed Mem0 Platform and the self-hosted open-source package
- ✓Configure open-source Mem0 with your own LLM, embedder and vector store
- ✓Use graph memory and entity-scoped filters to keep different users' facts separated
- ✓Apply reranking, hybrid retrieval, temporal reasoning and memory decay to cut recall noise
- ✓Add persistent memory to LangGraph, CrewAI or the OpenAI Agents SDK
Highlights
- •62.5k GitHub stars under Apache-2.0 — the memory layer most agent frameworks integrate with first
- •Publishes benchmark numbers you can argue with: 92.5 on LoCoMo, 94.4 on LongMemEval, ~0.9s p50 retrieval at a ~7K-token budget
- •The hosted platform and the self-hosted build share the same API surface, so a prototype can move without a rewrite
- •Documented against 25+ vector stores and 16+ LLM providers, including fully local Ollama and vLLM setups
- •Those benchmark claims are contested — Zep's 'Is Mem0 SOTA in Agent Memory?' teardown and several competing Show HN launches dispute the LoCoMo methodology, so re-measure on your own data
Who It’s For
Best For
- ✓AI engineers adding long-term memory to a chatbot or support agent
- ✓Teams whose agents blow the context window replaying conversation history
- ✓Developers comparing agent-memory options such as Letta, Zep or Graphiti before committing
- ✓Anyone who needs a self-hosted, provider-agnostic memory store for compliance reasons
Prerequisites
- •Working Python or TypeScript, and having built at least one LLM call loop
- •Familiarity with embeddings and vector search — memories are stored and retrieved as vectors
- •For the self-hosted path: Docker Compose and the ability to run your own vector database
FAQ
What is Mem0 Documentation — Universal Memory Layer for AI Agents?
Mem0's official documentation for the memory layer that gives AI agents persistent, self-improving recall across sessions. Written for engineers who already have an agent and are watching it forget everything between conversations, or blow the context window replaying whole transcripts. It covers both the managed Mem0 Platform and the Apache-2.0 self-hosted build, and after working through it you can add scoped long-term memory to a LangGraph, CrewAI or OpenAI Agents SDK application while choosing your own LLM, embedder and vector store.
Is Mem0 Documentation — Universal Memory Layer for AI Agents free?
Mem0 Documentation — Universal Memory Layer for AI Agents offers free content, with paid options for certificates or premium features.
What level is Mem0 Documentation — Universal Memory Layer for AI Agents for?
Mem0 Documentation — Universal Memory Layer for AI Agents is aimed at a intermediate audience. Recommended background: Working Python or TypeScript, and having built at least one LLM call loop, Familiarity with embeddings and vector search — memories are stored and retrieved as vectors, For the self-hosted path: Docker Compose and the ability to run your own vector database.
How long does Mem0 Documentation — Universal Memory Layer for AI Agents take?
Expect roughly ~3-4 hours to work through the quickstarts and core concepts, then reference. Most learners work through it at their own pace.
What will I learn from Mem0 Documentation — Universal Memory Layer for AI Agents?
You'll learn: Model agent memory as user, agent, app and run scopes; Wire the add/search/update/delete memory operations into an existing agent loop; Choose between the managed Mem0 Platform and the self-hosted open-source package; Configure open-source Mem0 with your own LLM, embedder and vector store; Use graph memory and entity-scoped filters to keep different users' facts separated; Apply reranking, hybrid retrieval, temporal reasoning and memory decay to cut recall noise; Add persistent memory to LangGraph, CrewAI or the OpenAI Agents SDK.
Topics
Sources
This page was written from 4 sources, 1 on domains other than docs.mem0.ai.
- 1.docs.mem0.ai — docs.mem0.aivendor
- 2.docs.mem0.ai — overviewvendor
- 3.docs.mem0.ai — llms.txtvendor
- 4.github.com — mem0