# Mem0 > Mem0 is the memory layer for AI agents — persistent, self-improving context that survives across sessions. Two products share one mental model: Mem0 Platform (managed) and Mem0 Open Source (self-hosted). ## For agents reading this file ### Don't have a Mem0 API key? Install the CLI, then mint a key — no email, no dashboard, no OTP required: \`\`\`bash # Python pip install mem0-cli # or Node npm install -g @mem0/cli \`\`\` Then run: \`mem0 init --agent --agent-caller --json\` This mints an evaluation key in under 5 seconds. When the human is ready, claim with \`mem0 init --email \` (memories preserved, same key, no disruption). ### Routing and references - Use \`MemoryClient\` (Python) / \`mem0ai\` (npm) when the user has a Mem0 Platform API key. Managed product — no infra required. - Use \`Memory\` (Python) / \`mem0ai/oss\` (npm) when the user self-hosts. Requires custom vector store and LLM. - Full technical docs: https://docs.mem0.ai/llms-full.txt - OpenAPI spec: https://docs.mem0.ai/openapi.json - Live MCP server: https://mcp.mem0.ai - Source repo: https://github.com/mem0ai/mem0 --- ## Install \`\`\`bash # Managed (Platform) pip install mem0ai # Python npm install mem0ai # Node # Self-hosted (OSS) pip install mem0ai # same package, different import npm install mem0ai # same package, use mem0ai/oss import # CLI pip install mem0-cli # Python npm install -g @mem0/cli # Node \`\`\` --- ## Product ### [Homepage](https://mem0.ai/) [Both] Mem0 is the memory layer for AI agents. It solves the stateless problem: every new session, the agent has no memory of prior interactions. Mem0 extracts relevant facts from conversations, stores them in a structured memory store, and retrieves the most relevant context at the start of each new session. Key points: - Works with any LLM: OpenAI, Anthropic, Google, open-source models - Works with any vector database: Qdrant, Pinecone, pgvector, Weaviate, and 20+ others - Two deployment modes: managed API (Platform) or self-hosted (Open Source) - 4-line integration for Platform: install, init client, add memory, search memory - Sub-50ms retrieval on Platform - Used in production by thousands of teams ### [Pricing](https://mem0.ai/pricing) [Platform] **Free tier:** 1,000 memories/month, community support, API access, dashboard access. **Developer:** Higher memory limits, email support, advanced retrieval features. **Enterprise:** Unlimited memories, dedicated infrastructure, SSO, SOC 2 compliance, SLA, custom contracts, data residency options, BAA available. All plans include: REST API, Python SDK, Node SDK, memory CRUD, semantic search. ### [Demo](https://mem0.ai/demo) [Both] Live interactive demo. Add memories and search them — no account required. Shows the core add/search loop that powers every Mem0 integration. ### [Research](https://mem0.ai/research) [Both] Benchmark results and technical papers. Key results: - Mem0 v3 algorithm: 71.4 → 91.6 (+20.2 pts) on multi-turn recall benchmark - 3-4x fewer tokens vs naive context-stuffing - Temporal reasoning: +4.1 pts on LoCoMo time-aware query benchmark - Outperforms OpenAI Memory, LangMem, and MemGPT on long-term memory tasks ### [OpenMemory](https://mem0.ai/openmemory) [OSS] Local-first personal memory for AI tools. All data stays on your machine — nothing goes to Mem0's cloud. Ships as a Docker container with: - Local REST API (same interface as Platform) - MCP server for Claude Desktop, Cursor, Windsurf, and other MCP clients - Web UI for browsing and managing memories Use when: privacy requirements prevent cloud memory, or the user wants full control over their memory store. ### [OpenMemory MCP](https://mem0.ai/openmemory-mcp-3) [Both] MCP server that wires persistent memory into any MCP-compatible AI tool. Supported clients: Claude Desktop, Cursor, Windsurf, Cline, and any MCP client. Exposes standard MCP tools: \`add_memory\`, \`search_memories\`, \`get_memories\`, \`update_memory\`, \`delete_memory\`. Setup takes under 5 minutes. ### [Mem0 CLI](https://mem0.ai/cli) [Both] Agent-first memory management from the terminal. \`\`\`bash pip install mem0-cli mem0 init mem0 add "I prefer TypeScript over Python" mem0 search "language preferences" mem0 list \`\`\` Also supports agent-mode signup (no email) for autonomous agents minting their own API keys. Run \`mem0 init --agent --json\` for a machine-readable response. ### [Security](https://mem0.ai/security) [Both] - SOC 2 Type II certified - Data encrypted at rest and in transit - Memory data is not used for model training - GDPR-compliant data handling - Enterprise: dedicated infrastructure, data residency options, BAA available for HIPAA --- ## Use Cases ### [Healthcare AI](https://mem0.ai/usecase/healthcare) [Both] Clinical AI assistants that remember patients across sessions. Problems solved: - Patient doesn't re-explain their history, medications, and symptoms every visit - Care continuity across multiple providers using the same AI system - Personalized recommendations based on patient history and preferences Compliance: Mem0 supports HIPAA-compliant deployments. Contact for BAA. ### [Education AI](https://mem0.ai/usecase/education) [Both] AI tutors that adapt to each student over time. Problems solved: - Tutor remembers where student left off in the curriculum - Remembers which concepts the student struggles with - Adapts explanation style to the student's learning preferences - Tracks progress across sessions without re-testing Reference: RevisionDojo used Mem0 to build an exam prep tutor that improves personalized learning outcomes across sessions. ### [Sales AI](https://mem0.ai/usecase/sales) [Both] AI sales agents with full customer context. Problems solved: - Agent remembers every prior call, email, and meeting with a prospect - Personalized outreach based on stated interests and objections - Deal history preserved across agent handoffs - Follow-up reminders based on commitments made in prior sessions ### [Customer Support AI](https://mem0.ai/usecase/customer-support) [Both] Support agents that never make users repeat themselves. Problems solved: - Full context from every prior ticket without loading full history into context - Knows the user's product tier, past issues, and preferences - Escalation context preserved when transferring between agents Reference: Sunflower scaled personalized support to 80,000 users with Mem0. ### [E-commerce AI](https://mem0.ai/usecase/e-commerce) [Both] Shopping assistants that know your customers. Problems solved: - Remembers size, style, and brand preferences - Knows purchase history and returns - Personalizes recommendations without re-asking every session --- ## Comparisons ### [Mem0 vs Zep](https://mem0.ai/compare/mem0-vs-zep) [Both] Both are memory layers for AI agents. Key differences: - Mem0 uses LLM-based fact extraction; Zep uses a graph-based episodic memory model - Mem0 Platform offers managed hosting with sub-50ms retrieval; Zep requires self-hosting or their cloud - Mem0 has broader framework coverage (LangChain, LangGraph, CrewAI, OpenAI Agents SDK, Google ADK, etc.) - Mem0 OSS supports 20+ vector databases; Zep uses Neo4j for graph storage ### [Mem0 vs Letta](https://mem0.ai/compare/mem0-vs-letta) [Both] Letta (formerly MemGPT) is an agent framework with built-in memory. Mem0 is a standalone memory layer that works with any framework. Key differences: - Mem0 adds memory to any existing agent framework in 4 lines; Letta requires building agents in its framework - Mem0 Platform is fully managed with no infra; Letta requires self-hosting - Mem0 v3: 91.6 on multi-turn recall vs 71.4 MemGPT baseline ### [Mem0 vs Supermemory](https://mem0.ai/compare/mem0-vs-supermemory) [Both] Supermemory is focused on personal memory for individuals. Mem0 is focused on production AI agents serving many users. Key differences: - Mem0 supports multi-tenant memory (user_id, agent_id, app_id scoping) for SaaS products - Mem0 has an open-source self-hosted option; Supermemory is cloud-only - Mem0 has native framework integrations; Supermemory is primarily a standalone service ### [Mem0 vs Honcho](https://mem0.ai/compare/mem0-vs-honcho) [Both] Honcho is focused on user personalization for LLM apps. Mem0 covers the broader agent memory use case including multi-tenant isolation, graph memory, and framework integrations. ### [Mem0 vs Hindsight](https://mem0.ai/compare/mem0-vs-hindsight) [Both] Hindsight focuses on evaluation and replay of agent sessions. Mem0 focuses on persistent memory across sessions. Different problems: Hindsight is observability, Mem0 is runtime memory. --- ## Customer Stories ### [Sunflower — 80,000 users](https://mem0.ai/blog/how-sunflower-scaled-personalized-recovery-support-to-80-000-users-with-mem0) [Both] Sunflower built a personalized recovery support app using Mem0. The app remembers each user's recovery journey, triggers, and support preferences across sessions. Scaled to 80,000 users without linear cost growth in context tokens because only relevant memories are retrieved per session rather than loading full conversation history. ### [OpenNote — 40% token cost reduction](https://mem0.ai/blog/how-opennote-scaled-personalized-visual-learning-with-mem0-while-reducing-token-costs-by-40) [Both] OpenNote replaced naive conversation history injection with Mem0 memory retrieval. Result: 40% reduction in token costs while improving personalization quality — only relevant memories are injected rather than full conversation history on every turn. ### [RevisionDojo](https://mem0.ai/blog/how-revisiondojo-enhanced-personalized-learning-with-mem0) [Both] RevisionDojo built an AI tutor that remembers each student's strengths, weaknesses, and learning style. Memory persists across sessions — students pick up exactly where they left off. The tutor adapts its explanation approach based on what has and hasn't worked for each student historically. --- ## Community & Support - [Documentation](https://docs.mem0.ai) [Both]: Full technical docs, API reference, quickstarts, integration guides, and cookbooks. Full llms-full.txt at https://docs.mem0.ai/llms-full.txt. - [GitHub](https://github.com/mem0ai/mem0) [OSS]: Source code, issues, changelogs, and open source contributions. - [Discord](https://mem0.ai/discord) [Both]: Community support and discussions with the Mem0 team and other developers.