面向 AI 的最先进记忆与上下文引擎。
English · 简体中文
在所有主流 AI 记忆基准测试上均排名第一 —— LongMemEval、LoCoMo 和 ConvoMem。
在上下文缩减 99.4% 的情况下,Recall@15 达到 95% · 用户画像耗时约 50 毫秒。
Supermemory 是面向 AI 的记忆与上下文层。在 AI 记忆领域的三大基准测试 LongMemEval、LoCoMo 和 ConvoMem 上均排名第一。
我们是一支研究实验室团队,围绕该引擎构建相关插件与工具。
你的 AI 在每次对话之间都会遗忘一切。Supermemory 能够解决这一问题。
它可以自动从对话中学习、抽取事实、构建用户画像、处理知识更新与冲突、遗忘已过期的信息,并在恰当的时机交付恰当的上下文。涵盖完整的 RAG(检索增强生成)、连接器与文件处理能力 —— 整个上下文栈,统统一套系统搞定。
| 🧠 记忆(Memory) | 从对话中抽取事实。处理时间变化、冲突,以及自动遗忘。 |
| 👤 用户画像(User Profiles) | 自动维护的用户上下文 —— 稳定的事实 + 最近的活动。一次调用,约 50 毫秒。 |
| 🔍 混合检索(Hybrid Search) | 在同一次查询中同时完成 RAG 与记忆检索,把知识库文档与个性化上下文整合在一起。 |
| 🔌 连接器(Connectors) | Google Drive · Gmail · Notion · OneDrive · GitHub —— 通过实时 Webhook 自动同步。 |
| 📄 多模态抽取器 | PDF、图像(OCR)、视频(转写)、代码(基于 AST 的分块)。上传即可用。 |
以上所有能力都构建在统一的记忆结构与本体之上。
使用 Supermemory
🧑💻 我使用 AI 工具
通过插件或 MCP(Model Context Protocol,模型上下文协议)服务器,为 Claude Code、Muse Code、Cursor、Codex 和 OpenCode 提供跨每次对话的持久记忆能力。
你的 AI 会记住你的偏好、项目以及过往讨论,并随着时间推移变得更聪明。
🔧 我正在构建 AI 产品
通过一套 API,即可为你的智能体和应用加入记忆、RAG、用户画像以及连接器能力。
无需配置向量数据库。无需搭建嵌入流水线。无需考虑分块策略。
🖥️ 我想自己运行它
在你的本机上运行最先进级别的记忆能力。一个二进制文件,零配置。 接入任意模型即可使用 —— 也可以配合 Ollama 完全离线运行。
curl -fsSL https://supermemory.ai/install | bash
为你的 AI 赋予记忆
插件与 MCP 服务器能为任何兼容的 AI 助手提供持久记忆能力。一次安装,你的 AI 便会记住你。
Supermemory 插件
Supermemory 内置了面向 Claude Code、Muse Code、Cursor、Codex、OpenCode、OpenClaw 和 Hermes 的插件。
这些插件都是 Supermemory API 的实现,并且全部开源!
你可以在这里找到它们:
- Claude Code 插件:https://github.com/supermemoryai/claude-supermemory
- Muse Code 插件:https://github.com/supermemoryai/muse-supermemory
- Cursor 插件:https://github.com/supermemoryai/cursor-supermemory
- Codex 插件:https://github.com/supermemoryai/codex-supermemory
- OpenClaw 插件:https://github.com/supermemoryai/openclaw-supermemory
- OpenCode 插件:https://github.com/supermemoryai/opencode-supermemory
- Hermes 智能体(Supermemory 记忆提供方):https://github.com/NousResearch/hermes-agent
MCP
服务器地址:
https://mcp.supermemory.ai/mcp
{
"mcpServers": {
"supermemory": {
"url": "https://mcp.supermemory.ai/mcp"
}
}
}
了解更多关于我们的 MCP 的信息:https://supermemory.ai/docs/supermemory-mcp/mcp
你的 AI 获得的能力
| 工具 | 作用 |
|---|---|
memory |
保存或遗忘信息。当你分享值得记住的内容时,AI 会自动调用此工具。 |
recall |
按查询搜索记忆。返回相关记忆以及你的用户画像摘要。 |
context |
在对话开始时将你的完整画像(偏好、最近活动)注入到对话中。在 Cursor 和 Claude Code 中,只需输入 /context。 |
工作原理
安装完成后,Supermemory 会在后台运行:
- 你像往常一样与 AI 对话。 分享偏好、提及项目、讨论问题。
- Supermemory 会抽取并存储重要内容。 包括事实、偏好、项目上下文 —— 而非噪声信息。
- 下一次对话时,你的 AI 已经了解你。 它会回忆起你正在做的事情、你的偏好,以及之前讨论过的内容。
记忆通过 项目(containerTag,容器标签) 进行作用域划分,便于你将工作与个人上下文分开,或按客户、代码仓库或任意维度进行组织。
支持的客户端
Claude Desktop · Cursor · Windsurf · VS Code · Claude Code · OpenCode · OpenClaw · Hermes
MCP 服务器已开源 —— 查看源码。
手动配置
将以下内容添加到你的 MCP 客户端配置中:
{
"mcpServers": {
"supermemory": {
"url": "https://mcp.supermemory.ai/mcp"
}
}
}
使用 Supermemory API 进行开发
如果你正在构建 AI 智能体或应用,Supermemory 通过一套 API 即可为你提供完整的上下文栈 —— 包含记忆、RAG、用户画像、连接器以及文件处理能力。
安装
npm install supermemory # 或:pip install supermemory
快速上手
import Supermemory from "supermemory";
const client = new Supermemory();
// 存储一段对话
await client.add({
content: "User loves TypeScript and prefers functional patterns",
containerTag: "user_123",
});
// 一次调用即可获取用户画像 + 相关记忆
const { profile, searchResults } = await client.profile({
containerTag: "user_123",
q: "What programming style does the user prefer?",
});
// profile.static → ["Loves TypeScript", "Prefers functional patterns"]
// profile.dynamic → ["Working on API integration"]
// searchResults → 按相似度排序的相关记忆
from supermemory import Supermemory
client = Supermemory()
client.add(
content="User loves TypeScript and prefers functional patterns",
container_tag="user_123"
)
result = client.profile(container_tag="user_123", q="programming style")
print(result.profile.static) # 长期事实
print(result.profile.dynamic) # 最近上下文
Supermemory 会自动抽取记忆、构建用户画像,并返回相关的上下文。无需嵌入流水线,无需向量数据库配置,无需考虑分块策略。
框架集成
为各大主流 AI 框架提供即插即用的封装:
// Vercel AI SDK
import { withSupermemory } from "@supermemory/tools/ai-sdk";
const model = withSupermemory(openai("gpt-4o"), { containerTag: "user_123", customId: "conv-1" });
// Mastra
import { withSupermemory } from "@supermemory/tools/mastra";
const agent = new Agent(withSupermemory(config, "user-123", { mode: "full" }));
Vercel AI SDK · LangChain · LangGraph · OpenAI Agents SDK · Mastra · Agno · Claude Memory Tool · n8n
检索模式
// 混合模式(默认)—— 在同一次查询中同时完成 RAG 与记忆检索
const results = await client.search({
q: "how do I deploy?",
containerTag: "user_123",
searchMode: "hybrid",
});
// 返回部署文档(RAG)+ 用户的部署偏好(记忆)
// 仅检索记忆
const results = await client.search({
q: "user preferences",
containerTag: "user_123",
searchMode: "memories",
});
用户画像
传统的记忆机制依赖检索 —— 你必须知道该询问什么。Supermemory 会自动为每个用户维护一份画像:
const { profile } = await client.profile({ containerTag: "user_123" });
// profile.static → ["Senior engineer at Acme", "Prefers dark mode", "Uses Vim"]
// profile.dynamic → ["Working on auth migration", "Debugging rate limits"]
一次调用,约 50 毫秒。注入到你的系统提示中,你的智能体即可立即了解对话对象。
连接器
将外部数据自动同步到你的知识库:
Google Drive · Gmail · Notion · OneDrive · GitHub · Web Crawler
实时 Webhook。文档自动处理、自动分块,并可被检索。
API 一览
| 方法 | 用途 |
|---|---|
client.add() |
存储内容 —— 文本、对话、URL、HTML |
client.profile() |
一次调用即可获得用户画像,并可选地进行检索 |
client.search() |
在记忆与文档之间进行混合检索(通过 searchMode 控制) |
client.search.documents() |
带元数据过滤的文档检索(沿用旧版 v3 响应结构) |
client.documents.uploadFile() |
上传 PDF、图像、视频、代码 |
client.documents.list() |
列出并过滤文档 |
client.settings.update() |
配置记忆抽取与分块行为 |
完整 API 参考 → supermemory.ai/docs
Supermemory 本地版——自己动手运行
在你自己的机器上运行最先进级别的记忆能力。一个二进制文件,零配置。
curl -fsSL https://supermemory.ai/install | bash