Skip to content

Commit 583b07b

Browse files
authored
release: merge dev-v2.0.23 into main (#2085)
## Description Please include a summary of the change, the problem it solves, the implementation approach, and relevant context. List any dependencies required for this change. Related Issue (Required): Fixes #issue_number ## Type of change Please delete options that are not relevant. - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Refactor (does not change functionality, e.g. code style improvements, linting) - [ ] Documentation update ## How Has This Been Tested? Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration - [ ] Unit Test - [ ] Test Script Or Test Steps (please provide) - [ ] Pipeline Automated API Test (please provide) ## Checklist - [ ] I have performed a self-review of my own code | 我已自行检查了自己的代码 - [ ] I have commented my code in hard-to-understand areas | 我已在难以理解的地方对代码进行了注释 - [ ] I have added tests that prove my fix is effective or that my feature works | 我已添加测试以证明我的修复有效或功能正常 - [ ] I have created related documentation issue/PR in [MemOS-Docs](https://github.com/MemTensor/MemOS-Docs) (if applicable) | 我已在 [MemOS-Docs](https://github.com/MemTensor/MemOS-Docs) 中创建了相关的文档 issue/PR(如果适用) - [ ] I have linked the issue to this PR (if applicable) | 我已将 issue 链接到此 PR(如果适用) - [ ] I have mentioned the person who will review this PR | 我已提及将审查此 PR 的人 ## Reviewer Checklist - [ ] closes #xxxx (Replace xxxx with the GitHub issue number) - [ ] Made sure Checks passed - [ ] Tests have been provided
2 parents 16dcbe6 + 906b45b commit 583b07b

83 files changed

Lines changed: 3657 additions & 789 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 177 additions & 345 deletions
Large diffs are not rendered by default.

README_ZH.md

Lines changed: 302 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,302 @@
1+
<div align="center">
2+
<h1 align="center">
3+
<a href="https://memos.openmem.net/">
4+
<img src="https://statics.memtensor.com.cn/logo/memos_color_m.png" alt="MemOS Logo" width="48"/>
5+
</a>&nbsp;
6+
MemOS 2.0&ensp;Stardust(星尘)
7+
</h1>
8+
9+
<p align="center">
10+
<a href="https://memos-docs.openmem.net/home/overview/"><img src="https://img.shields.io/badge/Docs-Get--Start-002FA7?labelColor=gray&style=for-the-badge&logo=googledocs&logoColor=white" alt="Docs"></a>
11+
<a href="https://arxiv.org/abs/2507.03724"><img src="https://img.shields.io/badge/ArXiv-2507.03724-B31B1B?labelColor=gray&style=for-the-badge&logo=arxiv&logoColor=white" alt="ArXiv"></a>
12+
<a href="https://x.com/MemOS_dev"><img src="https://img.shields.io/badge/Follow-MemOS-000000?labelColor=gray&style=for-the-badge&logo=x&logoColor=white" alt="X"></a>
13+
<a href="https://discord.gg/Txbx3gebZR"><img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fdiscord.com%2Fapi%2Fv10%2Finvites%2FTxbx3gebZR%3Fwith_counts%3Dtrue&query=%24.approximate_presence_count&suffix=%20online&label=Discord&color=404EED&labelColor=gray&style=for-the-badge&logo=discord&logoColor=white" alt="Discord"></a>
14+
<br>
15+
<a href="https://github.com/IAAR-Shanghai/Awesome-AI-Memory"><img src="https://img.shields.io/badge/Resources-Awesome--AI--Memory-8A2BE2?labelColor=gray&style=for-the-badge&logo=awesomelists&logoColor=white" alt="Resources"></a>
16+
</p>
17+
18+
<p align="center">
19+
<strong>让 Agent 拥有持续记忆与成长能力</strong><br/>
20+
</p>
21+
22+
<p align="center">
23+
<a href="README.md">English</a> | <strong>中文</strong>
24+
</p>
25+
</div>
26+
27+
28+
<div align="center">
29+
<img width="1660" height="664" alt="MemOS Plugin Banner" src="https://github.com/user-attachments/assets/9d15dde2-196e-4f71-a364-dd5a33062117" />
30+
</div>
31+
32+
---
33+
34+
## 👾 MemOS:面向 LLM 与 AI Agent 的记忆操作系统
35+
36+
**MemOS** 是一个面向 LLM 与 AI Agent 的记忆操作系统,统一了长期记忆的**存/取/管**,内置 **KB****多模态****工具记忆****企业级** 优化,实现上下文感知与个性化的交互。
37+
38+
### 核心特性
39+
40+
- **统一记忆 API**:用单一 API 完成记忆的增、删、改、查——以图结构组织,可检视、可编辑,不是黑盒向量库。
41+
- **多模态记忆**:原生支持文本、图像、工具轨迹与人格,在同一记忆系统中统一检索与推理。
42+
- **多 Cube 知识库管理**:将多个知识库组合为可复用的记忆 Cube,实现跨用户、项目与 Agent 的隔离、受控共享与动态组合。
43+
- **MemScheduler 异步写入**:以异步方式执行记忆操作,毫秒级延迟,保障高并发下的生产稳定性。
44+
- **记忆反馈与修正**:通过自然语言反馈精炼记忆——可纠正、补充或替换已有记忆,持续演进。
45+
46+
### News
47+
48+
- **2026-07-02** · 🏆 **MemOS 在 Agent 与用户记忆榜单上全面领先**
49+
在 MemOS 的加持下,**OpenClaw** 在五个 Agent 任务上的平均任务完成率从 **36.63% 提升到 50.87%**。MemOS 在 **LoCoMo** 取得 **92.34****LongMemEval** 取得 **93.40**,并在 **OmniMemEval**(覆盖 14 款商业记忆产品、十个数据集的统一评测)中领先。
50+
51+
- **2026-05-09** · 🧠 **memos-local-plugin 2.0**
52+
**Hermes Agent****OpenClaw** 官方本地记忆插件。单一核心驱动自演化记忆:L1 轨迹、L2 策略、L3 世界模型与结晶化 Skill,本地优先存储 + 反馈驱动检索。
53+
54+
- **2026-04-10** · 👧🏻 **MemOS Hermes Agent 本地插件**
55+
官方 Hermes Agent 记忆插件发布:混合检索(FTS5 + 向量)、智能去重、分层技能演化、多 Agent 协作。100% 本地,零云依赖。
56+
57+
- **2026-03-08** · 🦞 **MemOS OpenClaw 插件——云端与本地**
58+
官方 OpenClaw 记忆插件发布。**云插件**:托管记忆服务,token 用量降低 72%,支持多 Agent 记忆共享([MemOS-Cloud-OpenClaw-Plugin](https://github.com/MemTensor/MemOS-Cloud-OpenClaw-Plugin))。**本地插件**`v1.0.0`):100% 端侧记忆,持久化 SQLite,混合检索(FTS5 + 向量),任务摘要与技能演化,多 Agent 协作,配套完整记忆查看器面板。
59+
60+
61+
62+
## 📊 性能表现
63+
64+
MemOS 在多个评测榜单中处于领先地位——与主流商业记忆产品横向对比,覆盖 5 个用户记忆榜单和 5 个 Agent 记忆任务。
65+
66+
67+
| 榜单 | 分数 |
68+
| --------------- | ----- |
69+
| LoCoMo | 88.83 |
70+
| LongMemEval | 89.20 |
71+
| PersonaMem v2 | 40.58 |
72+
| HaluMem | 80.91 |
73+
| BEAM-10M | 56.75 |
74+
| GDPVal | 62.07 |
75+
| LiveCodeBench | 64.96 |
76+
| OmniMath | 61.00 |
77+
| SWE-Bench | 38.46 |
78+
| BrowseComp-Plus | 23.85 |
79+
80+
81+
评测框架 OmniMemEval——[https://github.com/MemTensor/OmniMemEval](https://github.com/MemTensor/OmniMemEval)
82+
83+
## 🎯 MemOS 适用于
84+
85+
MemOS 为 AI agent 提供长期记忆能力,典型场景:
86+
87+
- AI 助手:保持上下文一致的连续对话
88+
- 客服系统:召回历史工单与用户信息,提供针对性帮助
89+
- 个性化 agent:适应用户偏好,持续学习与调整
90+
- 多 agent 协作:共享或隔离的记忆空间
91+
92+
93+
94+
## 🚀 快速开始
95+
96+
MemOS 提供四种使用方式,按你的场景选择。
97+
98+
99+
| | Cloud API | 本地部署 | OpenClaw 云插件 | 本地插件 |
100+
| ---- | ------------ | ----------------- | ------------------------ | ----------------------- |
101+
| 适合谁 | 自建应用,全托管 | 自建基础设施的团队 | OpenClaw 用户,零运维 | Hermes/OpenClaw,100% 端侧 |
102+
| 启动方式 | 申请 API Key | docker compose up | openclaw plugins install | npm install + 配置 |
103+
| 依赖设施 | 无(托管) | Neo4j + Qdrant | 无(使用 MemOS Cloud) | 无(本地 SQLite) |
104+
| 数据存放 | MemOS Cloud | 你的服务器 | MemOS Cloud | 你的机器 |
105+
106+
### ☁️ 使用 Cloud API(托管)
107+
108+
想通过全托管服务给应用加记忆——无需自建任何基础设施。
109+
110+
**1. 申请 API Key:**
111+
112+
-[MemOS 控制台](https://memos-dashboard.openmem.net/cn/quickstart/?source=landing) 注册。
113+
- 进入 **API Keys** 复制你的 Key(以 `mpg-` 开头),请妥善保存在服务端。
114+
115+
**2. 写入与检索记忆:**
116+
117+
```python
118+
import requests
119+
120+
API_KEY = "mpg-..." # 请保存在服务端
121+
base = "https://memos.memtensor.cn/api/openmem/v1"
122+
headers = {"Authorization": f"Token {API_KEY}", "Content-Type": "application/json"}
123+
124+
# 1. 写入一条记忆
125+
requests.post(f"{base}/add/message", headers=headers, json={
126+
"user_id": "alice",
127+
"conversation_id": "conv_001",
128+
"messages": [{"role": "user", "content": "I like strawberry"}],
129+
})
130+
131+
# 2. 检索记忆
132+
res = requests.post(f"{base}/search/memory", headers=headers, json={
133+
"query": "What do I like?",
134+
"user_id": "alice",
135+
})
136+
print(res.json())
137+
```
138+
139+
**下一步:**
140+
141+
- [MemOS Cloud 快速开始](https://memos-docs.openmem.net/memos_cloud/quick_start/)——几分钟内接入 MemOS Cloud 并启用记忆。
142+
- [MemOS Cloud 平台](https://memos.openmem.net/?from=/quickstart/)——探索云端控制台、功能与工作流。
143+
144+
### 🖥️ 本地部署 MemOS 服务
145+
146+
想把 MemOS 作为 REST 服务跑在自己的机器或集群上。
147+
148+
**方式 A — Docker(推荐):**
149+
150+
```bash
151+
git clone https://github.com/MemTensor/MemOS.git
152+
cd MemOS
153+
cp docker/.env.example .env # 在 .env 中填入你的 API key
154+
cd docker
155+
docker compose up # 启动 MemOS API + Neo4j + Qdrant
156+
```
157+
158+
API 服务地址:`http://localhost:8000`
159+
160+
**方式 B — 用 uvicorn 启动(不用 Docker):**
161+
162+
```bash
163+
git clone https://github.com/MemTensor/MemOS.git
164+
cd MemOS
165+
cp docker/.env.example .env # 在 .env 中填入你的 API key
166+
# 确保 Neo4j 和 Qdrant 已启动,然后:
167+
cd src
168+
uvicorn memos.api.server_api:app --host 0.0.0.0 --port 8000 --workers 1
169+
```
170+
171+
所有配置项(LLM、embedder、向量库、图库、调度器)见 `[docker/.env.example](./docker/.env.example)`。完整部署指南:[https://memos-docs.openmem.net/open_source/getting_started/rest_api_server/](https://memos-docs.openmem.net/open_source/getting_started/rest_api_server/)
172+
173+
**试用 API:**
174+
175+
```python
176+
import requests, json
177+
178+
headers = {"Content-Type": "application/json"}
179+
base = "http://localhost:8000/product"
180+
181+
# 1. 创建记忆 cube
182+
requests.post(f"{base}/create_cube", headers=headers, data=json.dumps({
183+
"cube_name": "Alice's memory",
184+
"owner_id": "alice",
185+
"cube_id": "alice_cube",
186+
}))
187+
188+
# 2. 写入一条记忆
189+
requests.post(f"{base}/add", headers=headers, data=json.dumps({
190+
"user_id": "alice",
191+
"writable_cube_ids": ["alice_cube"],
192+
"messages": [{"role": "user", "content": "I like strawberry"}],
193+
"async_mode": "sync",
194+
}))
195+
196+
# 3. 检索记忆
197+
res = requests.post(f"{base}/search", headers=headers, data=json.dumps({
198+
"query": "What do I like?",
199+
"user_id": "alice",
200+
"readable_cube_ids": ["alice_cube"],
201+
}))
202+
print(res.json())
203+
```
204+
205+
206+
207+
### 🧠 MemOS 插件:为你的 AI agent 提供持久记忆 ✨
208+
209+
你的 OpenClaw 和 Hermes Agent 现在拥有**最佳**记忆系统——选择***云服务******自部署***即可开始 🏃🏻
210+
211+
212+
| 🔌 插件 | 💡 核心特性 | 🧩 资源 |
213+
| ----------------------------------------------------------------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
214+
| 🧠 **[memos-local-plugin 2.0](https://github.com/MemTensor/MemOS/tree/main/apps/memos-local-plugin)** | | 🌐 [官网](https://memos-claw.openmem.net/) · 📖 [文档](https://memos-docs.openmem.net/cn/openclaw/local_plugin) · 🐙 [GitHub](https://github.com/MemTensor/MemOS/tree/main/apps/memos-local-plugin) · 📦 [NPM](https://www.npmjs.com/package/@memtensor/memos-local-plugin) |
215+
| ☁️ **[OpenClaw 云插件](https://github.com/MemTensor/MemOS/tree/main/apps/MemOS-Cloud-OpenClaw-Plugin)** | | 🖥️ [MemOS 控制台](https://memos-dashboard.openmem.net/login/) · 📖 [完整教程](https://memos-docs.openmem.net/openclaw/guide#_4-update-plugin) |
216+
217+
218+
219+
220+
#### 1. OpenClaw 云插件
221+
222+
使用 OpenClaw,想通过 MemOS Cloud 获得持久记忆——无需自建基础设施。
223+
224+
- **仓库:** [MemTensor/MemOS ·](https://github.com/MemTensor/MemOS/tree/main/apps/MemOS-Cloud-OpenClaw-Plugin) `apps/MemOS-Cloud-OpenClaw-Plugin`
225+
- **NPM:** `[@memtensor/memos-cloud-openclaw-plugin](https://www.npmjs.com/package/@memtensor/memos-cloud-openclaw-plugin)`
226+
- **控制台:** [https://memos-dashboard.openmem.net/](https://memos-dashboard.openmem.net/)
227+
- **教程:** [https://memos-docs.openmem.net/openclaw/guide](https://memos-docs.openmem.net/openclaw/guide)
228+
229+
安装:
230+
231+
```bash
232+
openclaw plugins install @memtensor/memos-cloud-openclaw-plugin@latest
233+
openclaw gateway restart
234+
```
235+
236+
插件在每次 agent 运行前从 MemOS Cloud 召回记忆,运行结束后把新消息写回。
237+
238+
#### 2. 本地插件(memos-local-plugin 2.0)
239+
240+
使用 Hermes Agent 或 OpenClaw,想要 100% 端侧记忆——数据不离开本机。
241+
242+
- **仓库:** [MemTensor/MemOS ·](https://github.com/MemTensor/MemOS/tree/main/apps/memos-local-plugin) `apps/memos-local-plugin`
243+
- **NPM:** `[@memtensor/memos-local-plugin](https://www.npmjs.com/package/@memtensor/memos-local-plugin)`
244+
- **文档:** [https://memos-docs.openmem.net/cn/openclaw/local_plugin](https://memos-docs.openmem.net/cn/openclaw/local_plugin)
245+
- **查看器面板:**`apps/memos-local-plugin/viewer/`
246+
247+
安装(macOS / Linux):
248+
249+
```bash
250+
curl -fsSL https://raw.githubusercontent.com/MemTensor/MemOS/main/apps/memos-local-plugin/install.sh | bash
251+
```
252+
253+
安装(Windows PowerShell):
254+
255+
```powershell
256+
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"
257+
```
258+
259+
需先安装 Node.js,且已安装 OpenClaw 或 Hermes。安装器会自动识别 OpenClaw 与 Hermes,将插件部署到对应的 agent 主目录(`~/.hermes/plugins/``~/.openclaw/plugins/`),写入初始 `config.yaml`,并按需重启 agent 运行时。
260+
261+
特性:混合检索(FTS5 + 向量)、智能去重、分层技能演化(L1 轨迹 / L2 策略 / L3 世界模型)、多 agent 协作、本地优先 SQLite 存储。
262+
263+
## 🤝 社区
264+
265+
- **GitHub Issues:** [https://github.com/MemTensor/MemOS/issues](https://github.com/MemTensor/MemOS/issues)
266+
- **GitHub Discussions:** [https://github.com/MemTensor/MemOS/discussions](https://github.com/MemTensor/MemOS/discussions)
267+
- **Discord:** [https://discord.gg/Txbx3gebZR](https://discord.gg/Txbx3gebZR)
268+
- **微信:** 扫码加入微信群。
269+
270+
<div align="center">
271+
<img src="https://statics.memtensor.com.cn/memos/qr-code.png" alt="QR Code" width="300" />
272+
</div>
273+
274+
275+
276+
## 📚 引用
277+
278+
如果在研究中使用 MemOS,请引用:
279+
280+
```bibtex
281+
@article{li2025memos_long,
282+
title={MemOS: A Memory OS for AI System},
283+
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},
284+
journal={arXiv preprint arXiv:2507.03724},
285+
year={2025},
286+
url={https://arxiv.org/abs/2507.03724}
287+
}
288+
289+
@article{li2025memos_short,
290+
title={MemOS: An Operating System for Memory-Augmented Generation (MAG) in Large Language Models},
291+
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},
292+
journal={arXiv preprint arXiv:2505.22101},
293+
year={2025},
294+
url={https://arxiv.org/abs/2505.22101}
295+
}
296+
```
297+
298+
299+
300+
## ⚖️ 许可证
301+
302+
MemOS 基于 [Apache 2.0 许可证](./LICENSE) 开源。

0 commit comments

Comments
 (0)