Glean 拾遗
Daily /2026-06-18 / Persistent Memory Engine for AI: Auto-Extract, Update, and Forget Intelligently

Persistent Memory Engine for AI: Auto-Extract, Update, and Forget Intelligently

Source github.com Glean’d 2026-06-18 06:00 Read 14 min
AI summary

Supermemory is a memory and context layer for AI. It automatically extracts facts from conversations, builds and maintains user profiles, resolves contradictions, and intelligently forgets expired information. Combining hybrid search (RAG + memory), document processing, and live connectors (Google Drive, GitHub, etc.) into one API, it gives AI agents instant, personalized context. With plugins for Claude Code, Cursor, and more, it targets both developers integrating memory into apps and users wanting persistent AI memory across tools.

Original · 14 min
github.com ↗
§ 1

Supermemory is an open-source memory and context engine that gives AI assistants persistent, evolving memory across conversations. It automatically extracts facts, builds user profiles, resolves contradictions, and forgets expired information — all through a single API or MCP server. Ranked #1 on three major AI memory benchmarks (LongMemEval, LoCoMo, ConvoMem), it is suitable for both end users who want a smarter AI companion and developers who need to add memory and RAG to their own AI products.

Supermemory 是一个开源的记忆与上下文引擎,旨在为 AI 助手提供跨会话的持久化、进化式记忆。它能自动从对话中提取事实、构建用户画像、解决矛盾信息,并遗忘过期的数据——所有这些都通过单一 API 或 MCP Server 完成。该项目在 LongMemEval、LoCoMo、ConvoMem 三大主流 AI 记忆基准测试中均排名第一,既适合希望拥有更聪明 AI 助手的大众用户,也适合需要为自己的 AI 产品添加记忆与 RAG 能力的开发者。

§ 2

Current AI assistants are stateless by design: they treat each conversation as a blank slate, forgetting preferences, project context, and personal facts between sessions. Traditional RAG only retrieves raw document chunks — it doesn't understand that a user's stated preference has changed over time. Supermemory solves this by introducing a dedicated memory layer that tracks facts as first-class entities, handles temporal updates (new info supersedes old), resolves contradictions, and auto-expires temporary data. This allows the AI to remember not just what you said, but what you mean.

当前的 AI 助手本质上是无状态的:每个对话都是一张白纸,会在会话间忘记用户的偏好、项目背景和个人事实。传统 RAG 只能检索原始文档片段,无法理解用户偏好会随时间变化。Supermemory 通过引入专用记忆层解决了这个问题:它将事实作为一等实体进行追踪,处理时间维度上的更新(新信息取代旧信息),解决矛盾,并自动过期临时数据。这让 AI 不仅能记住你说过什么,更能理解你想表达什么。

§ 3

Supermemory bundles several integrated capabilities. The Memory Engine extracts facts from conversations, resolves contradictions (e.g., 'I love SF' then 'I just moved to NYC'), and auto-forgets expired info. User Profiles are automatically maintained per user, returning a combination of static long-term facts and dynamic recent context in one ~50ms API call. Hybrid Search combines RAG over your knowledge base documents with personalized memory context in a single query, so you don't have to choose between 'what the docs say' and 'what the user prefers.' It also includes real-time Connectors (Google Drive, Gmail, Notion, OneDrive, GitHub) and Multi-modal Extractors for PDFs, images (OCR), videos (transcription), and code (AST-aware chunking).

Supermemory 集成了多项核心能力。记忆引擎从对话中提取事实、处理矛盾(比如用户先说“我爱旧金山”,后来又表示“我刚搬到纽约”),并自动遗忘过期信息。用户画像为每个用户自动维护,一次 API 调用(约 50ms)即可同时获取长期静态事实和近期动态上下文。混合搜索将知识库文档的 RAG 检索与个性化记忆上下文合并到一次查询中,你无需在“文档说了什么”和“用户偏好什么”之间二选一。此外还包括实时连接器(Google Drive、Gmail、Notion、OneDrive、GitHub)和多模态提取器(PDF、图片 OCR、视频转录、代码 AST 感知分块)。

§ 4

The project is a monorepo with a TypeScript core. It runs on Cloudflare Workers and Pages with a PostgreSQL database via Drizzle ORM, and leverages Cloudflare KV for caching. The memory engine sits at the core: when you call client.add(), it extracts facts, updates user profiles, detects temporal changes and contradictions, and stores the structured memory. On client.profile() or client.search.memories(), it retrieves the relevant profile summary and memory facts. The MCP server (apps/mcp/) provides a standardized interface for AI tools like Claude Desktop, Cursor, and VS Code. External data is ingested through connectors (Google Drive, Notion, etc.) or file uploads, then processed by the extractors into searchable chunks. Benchmarks can be run using the open-source MemoryBench tool included in the monorepo.

该项目是一个 TypeScript 核心的 monorepo(单体仓库)。它运行在 Cloudflare Workers 和 Pages 上,使用 PostgreSQL 数据库(通过 Drizzle ORM)以及 Cloudflare KV 做缓存。记忆引擎位于核心:当你调用 client.add() 时,它会提取事实、更新用户画像、检测时间变化和矛盾,并将结构化记忆存储起来。当调用 client.profile()client.search.memories() 时,它会返回相关的画像摘要和记忆事实。MCP server(apps/mcp/)为 Claude Desktop、Cursor、VS Code 等 AI 工具提供了标准化接口。外部数据通过连接器(Google Drive、Notion 等)或文件上传导入,再由提取器处理成可搜索的分块。自带的 MemoryBench 工具可运行基准测试。

§ 5

Supermemory can be used in two primary modes. For end users, install the MCP server into Claude Desktop, Cursor, or other MCP-compatible clients with a single command: npx -y install-mcp@latest https://mcp.supermemory.ai/mcp --client claude --oauth=yes. Once configured, the AI automatically saves and recalls memories and can inject a user profile via /context. For developers, install the npm or pip package: npm install supermemory / pip install supermemory. Then initialize the client, call client.add() to store conversational content, and client.profile() or client.search.memories() to retrieve context. The library provides drop-in wrappers for popular frameworks like Vercel AI SDK, LangChain, and Mastra.

Supermemory 提供两种主要使用模式。终端用户模式:使用一条命令即可将 MCP 服务器安装到 Claude Desktop、Cursor 或其他兼容 MCP 的客户端:npx -y install-mcp@latest https://mcp.supermemory.ai/mcp --client claude --oauth=yes。配置完成后,AI 会自动保存和回忆记忆,并可通过 /context 注入用户画像。开发者模式:安装 npm 或 pip 包:npm install supermemory / pip install supermemory。然后初始化客户端,调用 client.add() 存储对话内容,再通过 client.profile()client.search.memories() 获取上下文。该库还为 Vercel AI SDK、LangChain、Mastra 等主流框架提供了直接可用的封装。

§ 6

Supermemory is most valuable for AI-powered applications where personalization and long-term context are critical: AI coding assistants that remember project conventions, customer support bots that track user history and preferences, and personal AI companions that learn from repeated interaction. It is also ideal for multi-agent systems where shared context across agents is needed. However, the project has notable dependencies on Cloudflare's ecosystem (Workers, D1/KV, R2), so self-hosting requires familiarity with that stack. While the core engine is open source under MIT, the managed cloud service at supermemory.ai adds convenience features and a hosted dashboard. Privacy-sensitive or fully offline deployments will need to self-host. The memory ontology is proprietary to Supermemory, meaning migrating to a different memory system may involve data transformation.

Supermemory 最适合那些对个性化和长期上下文有高要求的 AI 应用:能记住项目惯例的 AI 编码助手、追踪用户历史与偏好的客服机器人,以及能从重复交互中学习的人 AI 陪伴应用。对于需要跨 agent 共享上下文的复杂多 agent 系统来说,它也是非常理想的选择。不过,该项目高度依赖 Cloudflare 生态(Workers、D1/KV、R2),自部署需要对这套技术栈熟悉。虽然核心引擎以 MIT 协议开源,但托管在 supermemory.ai 的云服务提供了更多便利功能和仪表板。对隐私敏感或需要完全离线部署的场景,需要自托管。此外,它的记忆本体是 Supermemory 私有的,迁移到其他记忆系统可能需要数据转换。

Open source ↗