Skip to content

Commit 6a43b49

Browse files
authored
Dev 20260302 v2.0.8 (#1148)
## 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 84b2d75 + c2f9787 commit 6a43b49

52 files changed

Lines changed: 1611 additions & 1814 deletions

Some content is hidden

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

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,3 +230,5 @@ cython_debug/
230230
outputs
231231

232232
evaluation/data/temporal_locomo
233+
test_add_pipeline.py
234+
test_file_pipeline.py

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
</a>
4343
<a href="https://github.com/IAAR-Shanghai/Awesome-AI-Memory">
4444
<img alt="Awesome AI Memory" src="https://img.shields.io/badge/Resources-Awesome--AI--Memory-8A2BE2">
45-
</a>
45+
</a>
4646
</p>
4747

4848
<p align="center">
@@ -55,7 +55,7 @@
5555
</a> -->
5656

5757
</p>
58-
58+
5959
</div>
6060

6161
<!-- Get Free API: [Try API](https://memos-dashboard.openmem.net/quickstart/?source=github) -->
@@ -154,7 +154,7 @@ Full tutorial → [MemOS-Cloud-OpenClaw-Plugin](https://github.com/MemTensor/Mem
154154

155155
</details>
156156

157-
- **2025-08-07** · 🎉 **MemOS v1.0.0 (MemCube) Release**
157+
- **2025-08-07** · 🎉 **MemOS v1.0.0 (MemCube) Release**
158158
First MemCube release with a word-game demo, LongMemEval evaluation, BochaAISearchRetriever integration, NebulaGraph support, improved search capabilities, and the official Playground launch.
159159

160160
<details>
@@ -192,11 +192,11 @@ Full tutorial → [MemOS-Cloud-OpenClaw-Plugin](https://github.com/MemTensor/Mem
192192

193193
</details>
194194

195-
- **2025-07-07** · 🎉 **MemOS v1.0: Stellar (星河) Preview Release**
195+
- **2025-07-07** · 🎉 **MemOS v1.0: Stellar (星河) Preview Release**
196196
A SOTA Memory OS for LLMs is now open-sourced.
197-
- **2025-07-04** · 🎉 **MemOS Paper Release**
197+
- **2025-07-04** · 🎉 **MemOS Paper Release**
198198
[MemOS: A Memory OS for AI System](https://arxiv.org/abs/2507.03724) is available on arXiv.
199-
- **2024-07-04** · 🎉 **Memory3 Model Release at WAIC 2024**
199+
- **2024-07-04** · 🎉 **Memory3 Model Release at WAIC 2024**
200200
The Memory3 model, featuring a memory-layered architecture, was unveiled at the 2024 World Artificial Intelligence Conference.
201201

202202
<br>
@@ -209,9 +209,9 @@ Full tutorial → [MemOS-Cloud-OpenClaw-Plugin](https://github.com/MemTensor/Mem
209209
- Go to **API Keys** and copy your key
210210

211211
#### Next Steps
212-
- [MemOS Cloud Getting Started](https://memos-docs.openmem.net/memos_cloud/quick_start/)
212+
- [MemOS Cloud Getting Started](https://memos-docs.openmem.net/memos_cloud/quick_start/)
213213
Connect to MemOS Cloud and enable memory in minutes.
214-
- [MemOS Cloud Platform](https://memos.openmem.net/?from=/quickstart/)
214+
- [MemOS Cloud Platform](https://memos.openmem.net/?from=/quickstart/)
215215
Explore the Cloud dashboard, features, and workflows.
216216

217217
### 🖥️ 2、Self-Hosted (Local/Private)
@@ -249,7 +249,7 @@ Full tutorial → [MemOS-Cloud-OpenClaw-Plugin](https://github.com/MemTensor/Mem
249249
```python
250250
import requests
251251
import json
252-
252+
253253
data = {
254254
"user_id": "8736b16e-1d20-4163-980b-a5063c3facdc",
255255
"mem_cube_id": "b32d0977-435d-4828-a86f-4f47f8b55bca",
@@ -265,15 +265,15 @@ Full tutorial → [MemOS-Cloud-OpenClaw-Plugin](https://github.com/MemTensor/Mem
265265
"Content-Type": "application/json"
266266
}
267267
url = "http://localhost:8000/product/add"
268-
268+
269269
res = requests.post(url=url, headers=headers, data=json.dumps(data))
270270
print(f"result: {res.json()}")
271271
```
272272
- Search User Memory
273273
```python
274274
import requests
275275
import json
276-
276+
277277
data = {
278278
"query": "What do I like",
279279
"user_id": "8736b16e-1d20-4163-980b-a5063c3facdc",
@@ -283,7 +283,7 @@ Full tutorial → [MemOS-Cloud-OpenClaw-Plugin](https://github.com/MemTensor/Mem
283283
"Content-Type": "application/json"
284284
}
285285
url = "http://localhost:8000/product/search"
286-
286+
287287
res = requests.post(url=url, headers=headers, data=json.dumps(data))
288288
print(f"result: {res.json()}")
289289
```
@@ -292,8 +292,8 @@ Full tutorial → [MemOS-Cloud-OpenClaw-Plugin](https://github.com/MemTensor/Mem
292292

293293
## 📚 Resources
294294

295-
- **Awesome-AI-Memory**
296-
This is a curated repository dedicated to resources on memory and memory systems for large language models. It systematically collects relevant research papers, frameworks, tools, and practical insights. The repository aims to organize and present the rapidly evolving research landscape of LLM memory, bridging multiple research directions including natural language processing, information retrieval, agentic systems, and cognitive science.
295+
- **Awesome-AI-Memory**
296+
This is a curated repository dedicated to resources on memory and memory systems for large language models. It systematically collects relevant research papers, frameworks, tools, and practical insights. The repository aims to organize and present the rapidly evolving research landscape of LLM memory, bridging multiple research directions including natural language processing, information retrieval, agentic systems, and cognitive science.
297297
- **Get started** 👉 [IAAR-Shanghai/Awesome-AI-Memory](https://github.com/IAAR-Shanghai/Awesome-AI-Memory)
298298
- **MemOS Cloud OpenClaw Plugin**
299299
Official OpenClaw lifecycle plugin for MemOS Cloud. It automatically recalls context from MemOS before the agent starts and saves the conversation back to MemOS after the agent finishes.

docker/Dockerfile.krolik

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# MemOS with Krolik Security Extensions
2-
#
2+
#
33
# This Dockerfile builds MemOS with authentication, rate limiting, and admin API.
44
# It uses the overlay pattern to keep customizations separate from base code.
55

examples/core_memories/general_textual_memory.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,21 +68,9 @@
6868

6969
example_id = "a19b6caa-5d59-42ad-8c8a-e4f7118435b4"
7070

71-
print("===== Extract memories =====")
72-
# Extract memories from a conversation
73-
# The extractor LLM processes the conversation to identify relevant information.
74-
memories = m.extract(
75-
[
76-
{"role": "user", "content": "I love tomatoes."},
77-
{"role": "assistant", "content": "Great! Tomatoes are delicious."},
78-
]
79-
)
80-
pprint.pprint(memories)
81-
print()
82-
8371
print("==== Add memories ====")
84-
# Add the extracted memories to the memory store
85-
m.add(memories)
72+
# Add example memories to the memory store
73+
m.add(example_memories)
8674
# Add a manually created memory item
8775
m.add(
8876
[
Lines changed: 52 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
1-
import json
21
import os
2+
import pprint
33
import uuid
44

55
from memos.configs.memory import MemoryConfigFactory
66
from memos.memories.factory import MemoryFactory
77

88

9-
def print_result(title, result):
10-
"""Helper function: Pretty print the result."""
11-
print(f"\n{'=' * 10} {title} {'=' * 10}")
12-
if isinstance(result, list | dict):
13-
print(json.dumps(result, indent=2, ensure_ascii=False, default=str))
14-
else:
15-
print(result)
16-
17-
189
# Configure memory backend with OpenAI extractor
1910
config = MemoryConfigFactory(
2011
backend="naive_text",
@@ -38,39 +29,55 @@ def print_result(title, result):
3829
# Create memory instance
3930
m = MemoryFactory.from_config(config)
4031

32+
example_memories = [
33+
{
34+
"memory": "I'm a RUCer, I'm happy.",
35+
"metadata": {
36+
"type": "event",
37+
},
38+
},
39+
{
40+
"memory": "MemOS is awesome!",
41+
"metadata": {
42+
"type": "opinion",
43+
},
44+
},
45+
]
46+
47+
example_id = str(uuid.uuid4())
4148

42-
# Extract memories from a simulated conversation
43-
memories = m.extract(
49+
print("==== Add memories ====")
50+
# Add example memories to the memory store
51+
m.add(example_memories)
52+
# Manually create a memory item and add it
53+
m.add(
4454
[
45-
{"role": "user", "content": "I love tomatoes."},
46-
{"role": "assistant", "content": "Great! Tomatoes are delicious."},
55+
{
56+
"id": example_id,
57+
"memory": "User is Chinese.",
58+
"metadata": {"type": "opinion"},
59+
}
4760
]
4861
)
49-
print_result("Extract memories", memories)
50-
51-
52-
# Add the extracted memories to storage
53-
m.add(memories)
54-
55-
# Manually create a memory item and add it
56-
example_id = str(uuid.uuid4())
57-
manual_memory = [{"id": example_id, "memory": "User is Chinese.", "metadata": {"type": "opinion"}}]
58-
m.add(manual_memory)
59-
60-
# Print all current memories
61-
print_result("Add memories (Check all after adding)", m.get_all())
62-
62+
print("All memories after addition:")
63+
pprint.pprint(m.get_all())
64+
print()
6365

64-
# Search for relevant memories based on the query
66+
print("==== Search memories ====")
67+
# Search for memories related to a query
6568
search_results = m.search("Tell me more about the user", top_k=2)
66-
print_result("Search memories", search_results)
67-
69+
pprint.pprint(search_results)
70+
print()
6871

72+
print("==== Get memories ====")
6973
# Get specific memory item by ID
70-
memory_item = m.get(example_id)
71-
print_result("Get memory", memory_item)
72-
74+
print(f"Memory with ID {example_id}:")
75+
pprint.pprint(m.get(example_id))
76+
print(f"Memories by IDs [{example_id}]:")
77+
pprint.pprint(m.get_by_ids([example_id]))
78+
print()
7379

80+
print("==== Update memories ====")
7481
# Update the memory content for the specified ID
7582
m.update(
7683
example_id,
@@ -80,22 +87,26 @@ def print_result(title, result):
8087
"metadata": {"type": "opinion", "confidence": 85},
8188
},
8289
)
83-
updated_memory = m.get(example_id)
84-
print_result("Update memory", updated_memory)
85-
90+
print(f"Memory after update (ID {example_id}):")
91+
pprint.pprint(m.get(example_id))
92+
print()
8693

8794
print("==== Dump memory ====")
8895
# Dump the current state of memory to a file
8996
m.dump("tmp/naive_mem")
9097
print("Memory dumped to 'tmp/naive_mem'.")
9198
print()
9299

93-
100+
print("==== Delete memories ====")
94101
# Delete memory with the specified ID
95102
m.delete([example_id])
96-
print_result("Delete memory (Check all after deleting)", m.get_all())
97-
103+
print("All memories after deletion:")
104+
pprint.pprint(m.get_all())
105+
print()
98106

107+
print("==== Delete all memories ====")
99108
# Delete all memories in storage
100109
m.delete_all()
101-
print_result("Delete all", m.get_all())
110+
print("All memories after delete_all:")
111+
pprint.pprint(m.get_all())
112+
print()

examples/data/mem_cube_tree/textual_memory.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4216,4 +4216,4 @@
42164216
"edges": [],
42174217
"total_nodes": 4,
42184218
"total_edges": 0
4219-
}
4219+
}

examples/mem_feedback/example_feedback.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def init_components():
144144
mem_reader=mem_reader,
145145
searcher=searcher,
146146
reranker=mem_reranker,
147-
pref_mem=None,
147+
pref_feedback=True,
148148
)
149149

150150
return feedback_server, memory_manager, embedder

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
##############################################################################
55

66
name = "MemoryOS"
7-
version = "2.0.7"
7+
version = "2.0.8"
88
description = "Intelligence Begins with Memory"
99
license = {text = "Apache-2.0"}
1010
readme = "README.md"

src/memos/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "2.0.7"
1+
__version__ = "2.0.8"
22

33
from memos.configs.mem_cube import GeneralMemCubeConfig
44
from memos.configs.mem_os import MOSConfig

src/memos/api/config.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,17 @@ def get_polardb_config(user_id: str | None = None) -> dict[str, Any]:
675675
"user_name": user_name,
676676
"use_multi_db": use_multi_db,
677677
"auto_create": True,
678-
"embedding_dimension": int(os.getenv("EMBEDDING_DIMENSION", 1024)),
678+
"embedding_dimension": int(os.getenv("EMBEDDING_DIMENSION", "1024")),
679+
# .env: CONNECTION_WAIT_TIMEOUT, SKIP_CONNECTION_HEALTH_CHECK, WARM_UP_ON_STARTUP_BY_FULL, WARM_UP_ON_STARTUP_BY_ALL
680+
"connection_wait_timeout": int(os.getenv("CONNECTION_WAIT_TIMEOUT", "60")),
681+
"skip_connection_health_check": os.getenv(
682+
"SKIP_CONNECTION_HEALTH_CHECK", "false"
683+
).lower()
684+
== "true",
685+
"warm_up_on_startup_by_full": os.getenv("WARM_UP_ON_STARTUP_BY_FULL", "false").lower()
686+
== "true",
687+
"warm_up_on_startup_by_all": os.getenv("WARM_UP_ON_STARTUP_BY_ALL", "false").lower()
688+
== "true",
679689
}
680690

681691
@staticmethod

0 commit comments

Comments
 (0)