关于 Memos
MemOS 是面向 LLM 和 AI Agent 的记忆系统,通过可检查的记忆图谱存储、检索和管理持久上下文。它支持多模态数据、可组合知识库,并可托管、自托管或本地部署。
主要功能
- 01统一的记忆添加、检索、编辑和删除 API
- 02可检查的图结构记忆
- 03支持文本、图像、工具轨迹和角色设定
- 04可组合且可隔离的知识库单元
- 05异步摄取记忆
- 06通过自然语言修正记忆
适用场景
- 01为 Agent 提供持久对话上下文
- 02回忆客户支持历史记录
- 03依据记忆的偏好个性化 Agent
- 04在多个 Agent 间共享或隔离记忆
MCP 相关
README 介绍了 MemOS API 和面向 Agent 运行时的插件,但未说明 MCP 服务或 MCP 客户端集成。
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
工具
10收录的工具列表 · 更新于 3 周前
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| conversation_first_message | string | 是 | 整个对话线程中用户发送的第一条消息。用于生成 conversation_id。 |
| messages | array | 是 | 包含角色和内容信息的消息数组 |
详细介绍
提示
新增:将 MemOS 连接到 DeepSeek Harness(
dsh)为 DeepSeek Harness 添加自动召回、后台捕获、混合检索和本地 Memory Viewer——由与各个 Agent 生态系统中相同的 MemOS 核心提供支持。
👾 MemOS:面向 LLM 和 AI Agent 的记忆操作系统
MemOS 是面向 LLM 和 AI Agent 的记忆操作系统,统一管理长期记忆的存储/检索/管理,支持构建感知上下文且个性化的交互,并内置知识库、多模态、工具记忆和企业级优化。
主要功能
- 统一记忆 API:通过单一 API 添加、检索、编辑和删除记忆——以图结构组织,专为可检查、可编辑而设计,而非黑盒嵌入存储。
- 多模态记忆:原生支持文本、图像、工具轨迹和角色设定,可在同一记忆系统中一并检索和推理。
- 多知识库管理:将多个知识库作为可组合的记忆立方体进行管理,实现用户、项目和 Agent 之间的隔离、受控共享和动态组合。
- 通过 MemScheduler 异步摄取:异步执行记忆操作,实现毫秒级延迟,确保高并发生产环境的稳定性。
- 记忆反馈与纠正:通过自然语言反馈优化记忆,随着时间推移纠正、补充或替换现有记忆。
新闻
-
2026-08-17 · 🐋 MemOS 接入 DeepSeek Harness MemOS 现在通过本地和云端插件为 DeepSeek Harness 提供持久记忆。DSH 可以在任务开始前自动回忆相关上下文,并在成功完成一轮交互后保留新的经验,无需修改其核心。
-
2026-07-02 · 🏆 MemOS 在 Agent 和用户记忆基准测试中取得进展 使用 MemOS 后,OpenClaw 在五项 Agent 任务中的平均完成率从 36.63% 提升至 50.87%。MemOS 在 LoCoMo 上也取得了 88.83 分,在 LongMemEval 上取得了 89.20 分,并在 OmniMemEval 中领先。OmniMemEval 是一项统一评测,涵盖十个数据集上的 14 种商业记忆产品。
-
2026-05-09 · 🧠 memos-local-plugin 2.0 面向 Hermes Agent 和 OpenClaw 的官方本地记忆插件。一个核心支持跨 L1 轨迹、L2 策略、L3 世界模型和结晶技能不断演进的记忆,并采用本地优先存储和由反馈驱动的检索。
-
2026-04-10 · 👧🏻 MemOS Hermes Agent 本地插件 Hermes Agent 官方记忆插件上线:混合检索(FTS5 + 向量)、智能去重、分层技能演进、多 Agent 协作。100% 本地运行,不依赖云端。
-
2026-03-08 · 🦞 MemOS OpenClaw 插件 — 云端与本地 OpenClaw 官方记忆插件上线。云端插件:托管记忆服务,可降低 72% 的令牌用量并支持多 Agent 共享记忆(MemOS-Cloud-OpenClaw-Plugin)。本地插件(
v1.0.0):100% 设备端记忆,支持持久化 SQLite、混合搜索(FTS5 + 向量)、任务摘要与技能演进、多 Agent 协作,以及完整的 Memory Viewer 仪表板。
📊 性能
MemOS 在多项基准测试中领先,测试将其与主流商业记忆产品进行对比,涵盖 5 项用户记忆任务和 5 项 Agent 记忆任务。
| 基准测试 | 得分 |
|---|---|
| LoCoMo | 88.83 |
| LongMemEval | 89.20 |
| PersonaMem v2 | 40.58 |
| HaluMem | 80.91 |
| BEAM-10M | 56.75 |
| GDPVal | 62.07 |
| LiveCodeBench | 64.96 |
| OmniMath | 61.00 |
| SWE-Bench | 38.46 |
| BrowseComp-Plus | 23.85 |
评测通过 OmniMemEval 进行 — https://github.com/MemTensor/OmniMemEval。
🎯 MemOS 的用途
MemOS 为 AI Agent 提供长期记忆。常见用途:
- 具备连贯性、富含上下文的 AI 助手对话
- 可回忆过往工单和用户历史的客户支持
- 能够适应个人偏好的个性化 Agent
- 使用共享或隔离记忆进行多 Agent 协作
🚀 快速开始
MemOS 围绕四种接入方式构建。选择适合你场景的方式。
| Cloud API | 自托管 | MemOS Cloud Plugin | 本地插件 | |
|---|---|---|---|---|
| 最适合 | 你的应用,完全托管 | 使用自有基础设施的团队 | OpenClaw 用户,无需运维 | DeepSeek Harness、Hermes 或 OpenClaw;设备端运行 |
| 设置 | 获取 API 密钥 | docker compose up | openclaw plugins install | npm install + 针对具体 Agent 进行设置 |
| 所需基础设施 | 无(托管服务) | Neo4j + Qdrant | 无(使用 MemOS Cloud) | 无(本地 SQLite) |
| 数据存储位置 | MemOS Cloud | 你的服务器 | MemOS Cloud | 你的设备 |
☁️ 使用 Cloud API(托管服务)
你希望通过完全托管的服务为应用添加记忆,无需运行任何基础设施。
1. 获取 API 密钥:
- 在 MemOS 控制台注册。
- 前往 API Keys 并复制密钥(以
mpg-开头)。请将其保存在服务端。
2. 添加和搜索记忆:
import requests
API_KEY = "mpg-..." # keep this server-side
base = "https://memos.memtensor.cn/api/openmem/v1"
headers = {"Authorization": f"Token {API_KEY}", "Content-Type": "application/json"}
# 1. Add a memory
requests.post(f"{base}/add/message", headers=headers, json={
"user_id": "alice",
"conversation_id": "conv_001",
"messages": [{"role": "user", "content": "I like strawberry"}],
})
# 2. Search memories
res = requests.post(f"{base}/search/memory", headers=headers, json={
"query": "What do I like?",
"user_id": "alice",
})
print(res.json())
后续步骤:
- MemOS Cloud 入门指南 — 连接 MemOS Cloud,几分钟内启用记忆。
- MemOS Cloud 平台 — 探索 Cloud 控制台、功能和工作流。
🖥️ 自托管 MemOS 服务
你希望在自己的机器或集群上将 MemOS 作为 REST 服务运行。
选项 A — Docker(推荐):
git clone https://github.com/MemTensor/MemOS.git
cd MemOS
cp docker/.env.example .env # fill in your API keys in .env
cd docker
docker compose up # starts MemOS API + Neo4j + Qdrant
API 的服务地址为 http://localhost:8000。
选项 B — 使用 uvicorn 运行(不使用 Docker):
git clone https://github.com/MemTensor/MemOS.git
cd MemOS
cp docker/.env.example .env # fill in your API keys in .env
# Ensure Neo4j and Qdrant are running, then:
cd src
uvicorn memos.api.server_api:app --host 0.0.0.0 --port 8000 --workers 1
所有配置选项(LLM 提供商、嵌入模型、向量数据库、图数据库、调度器)请参阅 docker/.env.example-full。完整的部署指南请访问 https://memos-docs.openmem.net/open_source/getting_started/rest_api_server/。
试用 API:
import requests, json
headers = {"Content-Type": "application/json"}
base = "http://localhost:8000/product"
# 1. Create a memory cube
requests.post(f"{base}/create_cube", headers=headers, data=json.dumps({
"cube_name": "Alice's memory",
"owner_id": "alice",
"cube_id": "alice_cube",
}))
# 2. Add a memory
requests.post(f"{base}/add", headers=headers, data=json.dumps({
"user_id": "alice",
"writable_cube_ids": ["alice_cube"],
"messages": [{"role": "user", "content": "I like strawberry"}],
"async_mode": "sync",
}))
# 3. Search memories
res = requests.post(f"{base}/search", headers=headers, data=json.dumps({
"query": "What do I like?",
"user_id": "alice",
"readable_cube_ids": ["alice_cube"],
}))
print(res.json())
🧠 MemOS 插件:为 AI Agent 提供持久记忆 ✨
MemOS 为 OpenClaw、Hermes 和 DeepSeek Harness 提供共享的本地记忆核心;托管版 MemOS Cloud 插件 适用于 OpenClaw 和 DeepSeek Harness 🏃🏻
| 🔌 插件 | 💡 核心功能 | 🧩 资源 |
|---|---|---|
| 🧠 memos-local-plugin 2.0 | 🌐 网站 · 📖 文档 · 🐙 GitHub · 📦 NPM | |
| ☁️ MemOS Cloud 插件 | 🖥️ MemOS 控制台 · 📖 完整教程 |
1. MemOS Cloud 插件
使用 MemOS Cloud 为 OpenClaw 或 DeepSeek Harness 提供持久记忆,无需运行任何基础设施。
- 仓库: MemTensor/MemOS ·
apps/MemOS-Cloud-OpenClaw-Plugin - NPM:
[@memtensor/memos-cloud-openclaw-plugin](https://www.npmjs.com/package/@memtensor/memos-cloud-openclaw-plugin) - 控制台: https://memos-dashboard.openmem.net/
- 教程: https://memos-docs.openmem.net/openclaw/guide
安装:
openclaw plugins install @memtensor/memos-cloud-openclaw-plugin@latest
openclaw gateway restart
该插件会在每次 Agent 运行前从 MemOS Cloud 中检索记忆,并在运行结束后将新消息保存回去。
DeepSeek Harness
通过其原生插件机制将 DeepSeek Harness 连接到 MemOS Cloud。在每个用户请求的第一个模型步骤之前,插件会从云端召回相关记忆;一轮对话成功结束后,它会将新的用户和助手消息保存回 MemOS Cloud。
-
将云插件安装到默认的 DSH
web配置中:npx @deepseek-ai/dsh plugin --profile web add @memtensor/memos-cloud-dsh-plugin@latest -
将 API Key 添加到
~/.dsh/.credentials.yaml:MEMOS_API_KEY: mpg-your-key -
将最简插件配置添加到
~/.dsh/settings.yaml:memos-cloud: apiKeyEnv: MEMOS_API_KEY -
重启 DSH Web 配置:
npx @deepseek-ai/dsh web
云插件采用故障开放模式:即使 MemOS Cloud 临时中断,也不会影响当前 DSH 任务。
2. 本地插件(OpenClaw、Hermes 和 DeepSeek Harness)
你使用 DeepSeek Harness、Hermes Agent 或 OpenClaw,并希望记忆 100% 保留在设备上——没有任何内容会离开你的设备。
- 代码仓库: MemTensor/MemOS ·
apps/memos-local-plugin - NPM:
[@memtensor/memos-local-plugin](https://www.npmjs.com/package/@memtensor/memos-local-plugin) - 文档: https://memos-docs.openmem.net/cn/openclaw/local_plugin
- DeepSeek Harness: 集成详情
- 查看器仪表板: 查看
apps/memos-local-plugin/viewer/
为 DeepSeek Harness 安装(macOS / Linux):
curl -fsSL https://raw.githubusercontent.com/MemTensor/MemOS/main/apps/memos-local-plugin/install.sh | bash -s -- --agent dsh --profile web
为 OpenClaw 或 Hermes 安装(macOS / Linux):
curl -fsSL https://raw.githubusercontent.com/MemTensor/MemOS/main/apps/memos-local-plugin/install.sh | bash
安装(Windows PowerShell):
irm https://raw.githubusercontent.com/MemTensor/MemOS/main/apps/memos-local-plugin/install.ps1 -OutFile "$env:TEMP\memos-install.ps1"; powershell -ExecutionPolicy Bypass -File "$env:TEMP\memos-install.ps1"
需要 Node.js,并且已安装 DeepSeek Harness、OpenClaw 或 Hermes。安装程序会将 MemOS 部署到所选的 Agent 运行时;DeepSeek Harness 目标会将其安装为树外 DSH bundle,而 OpenClaw 和 Hermes 目标会在各自的 Agent 主目录中写入初始 config.yaml。
功能:混合检索(FTS5 + 向量)、智能去重、分层技能演进(L1 traces / L2 policies / L3 world model)、多 Agent 协作、本地优先的 SQLite 存储。
🤝 社区
- GitHub Issues: https://github.com/MemTensor/MemOS/issues
- GitHub Discussions: https://github.com/MemTensor/MemOS/discussions
- Discord: https://discord.gg/Txbx3gebZR
- 微信: 扫描二维码加入群聊。
📚 引用
如果你在研究中使用 MemOS,请引用:
@article{li2025memos_long,
title={MemOS: A Memory OS for AI System},
author={Li, Zhiyu and Song, Shichao and Xi, Chenyang and Wang, Hanyu and Tang, Chen and Niu, Simin and Chen, Ding and Yang, Jiawei and Li, Chunyu and Yu, Qingchen and Zhao, Jihao and Wang, Yezhaohui and Liu, Peng and Lin, Zehao and Wang, Pengyuan and Huo, Jiahao and Chen, Tianyi and Chen, Kai and Li, Kehang and Tao, Zhen and Ren, Junpeng and Lai, Huayi and Wu, Hao and Tang, Bo and Wang, Zhenren and Fan, Zhaoxin and Zhang, Ningyu and Zhang, Linfeng and Yan, Junchi and Yang, Mingchuan and Xu, Tong and Xu, Wei and Chen, Huajun and Wang, Haofeng and Yang, Hongkang and Zhang, Wentao and Xu, Zhi-Qin John and Chen, Siheng and Xiong, Feiyu},
journal={arXiv preprint arXiv:2507.03724},
year={2025},
url={https://arxiv.org/abs/2507.03724}
}
@article{li2025memos_short,
title={MemOS: An Operating System for Memory-Augmented Generation (MAG) in Large Language Models},
author={Li, Zhiyu and Song, Shichao and Wang, Hanyu and Niu, Simin and Chen, Ding and Yang, Jiawei and Xi, Chenyang and Lai, Huayi and Zhao, Jihao and Wang, Yezhaohui and others},
journal={arXiv preprint arXiv:2505.22101},
year={2025},
url={https://arxiv.org/abs/2505.22101}
}
⚖️ 许可证
MemOS 根据 Apache 2.0 许可证 授权。
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。