Mem0 is an open-source memory layer designed specifically for LLMs and AI agents. It gives AI applications the ability to remember, learn from, and personalize interactions across sessions—much like a human would.
CN: Mem0 是一个专为 LLM 和 AI Agent 设计的开源记忆层。它让 AI 应用能够像人一样,跨会话记住、学习并个性化交互。
Imagine your AI agent is a personal assistant. Without Mem0, every time you walk into the office, the assistant has no idea who you are, what you like, or what you talked about yesterday. You have to reintroduce yourself every single time. With Mem0, the assistant has a notebook that automatically writes down important things about you—your name, preferences, past requests—and reads the relevant notes before every conversation.
CN: 想象你的 AI Agent 是一个私人助理。没有 Mem0,每次你走进办公室,助理都不知道你是谁、喜欢什么、昨天聊了什么。你每次都要重新介绍自己。有了 Mem0,助理有一本笔记本,自动记录关于你的重要信息——你的名字、偏好、过去的请求——并在每次对话前阅读相关笔记。
Core Concepts of Mem0
2.1 Memory Lifecycle (记忆的生命周期)
EN: Mem0 handles memories through a complete lifecycle:
- Extract (提取): Identifies important information from conversations
- Store (存储): Saves structured memories with embeddings in a vector database
- Retrieve (检索): Uses semantic search to find relevant memories
- Update (更新): Smartly updates memories over time, resolving contradictions
- 提取: 从对话中识别重要信息
- 存储: 将结构化记忆连同向量嵌入保存到向量数据库
- 检索: 使用语义搜索查找相关记忆
- 更新: 智能地随时间更新记忆,解决矛盾
2.2 Memory Scopes (记忆的作用域)
EN: Mem0 associates each memory with an identifier, allowing organization by:
- User ID: Personal memories for a specific user
- Agent ID: Memories for a specific agent
- Session: Short-term context within a session
- Organization: Shared memories across an organization
CN: Mem0 将每个记忆与一个标识符关联,允许按以下维度组织:
- User ID: 特定用户的个人记忆
- Agent ID: 特定 Agent 的记忆
- Session: 会话内的短期上下文
- Organization: 跨组织的共享记忆
2.3 Mem0 vs RAG
EN: RAG is for static facts—documents, knowledge bases. AI Memory is for dynamic state—user preferences that evolve, change, and contradict over time. Mem0 is specialized for the memory use case, not a general-purpose RAG tool.
CN: RAG 针对静态事实——文档、知识库。AI Memory 针对动态状态——用户偏好会随时间演变、变化甚至自相矛盾。Mem0 是专门为记忆场景设计的,不是通用 RAG 工具。
Mem0 Architecture
Mem0 uses a hybrid approach:

