Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
9f1c37b
fix: Add Unicode sanitization for cloud embedders
anatolykoptev Feb 7, 2026
e260982
fix: activation memory config crashes get_default() with OpenAI backend
anatolykoptev Feb 7, 2026
975dece
fix: downgrade AuthConfig partial-init log from WARNING to INFO
anatolykoptev Feb 7, 2026
d3dc6b8
fix: downgrade AuthConfig partial-init log from WARNING to INFO (#1052)
CaralHsi Feb 27, 2026
fec9978
fix: activation memory config crashes get_default() with OpenAI (#1051)
CaralHsi Feb 27, 2026
9d2f9be
test: remove unrelated unittest
endxxxx Feb 27, 2026
c514f60
Merge branch 'dev-20260302-v2.0.8' into fix/unicode-sanitization-embe…
endxxxx Feb 27, 2026
f886bbc
fix: Add Unicode sanitization for cloud embedders (#1048)
endxxxx Feb 27, 2026
a40cacf
chore: sync from main (#1147)
CaralHsi Mar 2, 2026
3a84591
Merge branch 'main' into dev-20260302-v2.0.8
CaralHsi Mar 2, 2026
6a91bcd
feat: Optimize the chunk logic of the knowledge base (#1135)
whipser030 Mar 2, 2026
a7eb7df
feat: transfer pref to polar db (#1145)
Wang-Daoji Mar 2, 2026
1062fec
feat: optimzie polardb ThreadedConnectionPool (#1152)
wustzdy Mar 3, 2026
063d870
fix: Use relativity instead of score for preference memory (#1153)
hijzy Mar 3, 2026
dcdc3cf
fix: image bug; single item in multi-mudal-reader has no embedding; (…
CaralHsi Mar 4, 2026
150e77a
fix: Stop throwing error when embedding is missing in add_nodes_batch…
bittergreen Mar 4, 2026
ec9eead
feat: align general/naive memory with tree-memory (#1159)
CaralHsi Mar 5, 2026
6014715
feat:update logs (#1161)
wustzdy Mar 5, 2026
355455c
feat:optimize search_by_fulltext (#1164)
wustzdy Mar 5, 2026
33d4d22
fix: delete useless graph recall (#1167)
hijzy Mar 5, 2026
8eb0362
feat:optimize search_by_fulltext (#1170)
wustzdy Mar 5, 2026
df12d5e
feat:optimize search_by_fulltext (#1171)
wustzdy Mar 6, 2026
39623ab
fix: The feedback function fails when calling the search interface du…
whipser030 Mar 6, 2026
0a69ec2
feat:optimize config (#1176)
wustzdy Mar 6, 2026
b94159e
chore: change version number to v2.0.8 (#1186)
wustzdy Mar 9, 2026
c2f9787
Merge branch 'main' into dev-20260302-v2.0.8
CaralHsi Mar 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -230,3 +230,5 @@ cython_debug/
outputs

evaluation/data/temporal_locomo
test_add_pipeline.py
test_file_pipeline.py
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
</a>
<a href="https://github.com/IAAR-Shanghai/Awesome-AI-Memory">
<img alt="Awesome AI Memory" src="https://img.shields.io/badge/Resources-Awesome--AI--Memory-8A2BE2">
</a>
</a>
</p>

<p align="center">
Expand All @@ -55,7 +55,7 @@
</a> -->

</p>

</div>

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

</details>

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

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

</details>

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

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

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

### 🖥️ 2、Self-Hosted (Local/Private)
Expand Down Expand Up @@ -249,7 +249,7 @@ Full tutorial → [MemOS-Cloud-OpenClaw-Plugin](https://github.com/MemTensor/Mem
```python
import requests
import json

data = {
"user_id": "8736b16e-1d20-4163-980b-a5063c3facdc",
"mem_cube_id": "b32d0977-435d-4828-a86f-4f47f8b55bca",
Expand All @@ -265,15 +265,15 @@ Full tutorial → [MemOS-Cloud-OpenClaw-Plugin](https://github.com/MemTensor/Mem
"Content-Type": "application/json"
}
url = "http://localhost:8000/product/add"

res = requests.post(url=url, headers=headers, data=json.dumps(data))
print(f"result: {res.json()}")
```
- Search User Memory
```python
import requests
import json

data = {
"query": "What do I like",
"user_id": "8736b16e-1d20-4163-980b-a5063c3facdc",
Expand All @@ -283,7 +283,7 @@ Full tutorial → [MemOS-Cloud-OpenClaw-Plugin](https://github.com/MemTensor/Mem
"Content-Type": "application/json"
}
url = "http://localhost:8000/product/search"

res = requests.post(url=url, headers=headers, data=json.dumps(data))
print(f"result: {res.json()}")
```
Expand All @@ -292,8 +292,8 @@ Full tutorial → [MemOS-Cloud-OpenClaw-Plugin](https://github.com/MemTensor/Mem

## 📚 Resources

- **Awesome-AI-Memory**
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.
- **Awesome-AI-Memory**
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.
- **Get started** 👉 [IAAR-Shanghai/Awesome-AI-Memory](https://github.com/IAAR-Shanghai/Awesome-AI-Memory)
- **MemOS Cloud OpenClaw Plugin**
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.
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.krolik
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# MemOS with Krolik Security Extensions
#
#
# This Dockerfile builds MemOS with authentication, rate limiting, and admin API.
# It uses the overlay pattern to keep customizations separate from base code.

Expand Down
16 changes: 2 additions & 14 deletions examples/core_memories/general_textual_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,9 @@

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

print("===== Extract memories =====")
# Extract memories from a conversation
# The extractor LLM processes the conversation to identify relevant information.
memories = m.extract(
[
{"role": "user", "content": "I love tomatoes."},
{"role": "assistant", "content": "Great! Tomatoes are delicious."},
]
)
pprint.pprint(memories)
print()

print("==== Add memories ====")
# Add the extracted memories to the memory store
m.add(memories)
# Add example memories to the memory store
m.add(example_memories)
# Add a manually created memory item
m.add(
[
Expand Down
93 changes: 52 additions & 41 deletions examples/core_memories/naive_textual_memory.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
import json
import os
import pprint
import uuid

from memos.configs.memory import MemoryConfigFactory
from memos.memories.factory import MemoryFactory


def print_result(title, result):
"""Helper function: Pretty print the result."""
print(f"\n{'=' * 10} {title} {'=' * 10}")
if isinstance(result, list | dict):
print(json.dumps(result, indent=2, ensure_ascii=False, default=str))
else:
print(result)


# Configure memory backend with OpenAI extractor
config = MemoryConfigFactory(
backend="naive_text",
Expand All @@ -38,39 +29,55 @@ def print_result(title, result):
# Create memory instance
m = MemoryFactory.from_config(config)

example_memories = [
{
"memory": "I'm a RUCer, I'm happy.",
"metadata": {
"type": "event",
},
},
{
"memory": "MemOS is awesome!",
"metadata": {
"type": "opinion",
},
},
]

example_id = str(uuid.uuid4())

# Extract memories from a simulated conversation
memories = m.extract(
print("==== Add memories ====")
# Add example memories to the memory store
m.add(example_memories)
# Manually create a memory item and add it
m.add(
[
{"role": "user", "content": "I love tomatoes."},
{"role": "assistant", "content": "Great! Tomatoes are delicious."},
{
"id": example_id,
"memory": "User is Chinese.",
"metadata": {"type": "opinion"},
}
]
)
print_result("Extract memories", memories)


# Add the extracted memories to storage
m.add(memories)

# Manually create a memory item and add it
example_id = str(uuid.uuid4())
manual_memory = [{"id": example_id, "memory": "User is Chinese.", "metadata": {"type": "opinion"}}]
m.add(manual_memory)

# Print all current memories
print_result("Add memories (Check all after adding)", m.get_all())

print("All memories after addition:")
pprint.pprint(m.get_all())
print()

# Search for relevant memories based on the query
print("==== Search memories ====")
# Search for memories related to a query
search_results = m.search("Tell me more about the user", top_k=2)
print_result("Search memories", search_results)

pprint.pprint(search_results)
print()

print("==== Get memories ====")
# Get specific memory item by ID
memory_item = m.get(example_id)
print_result("Get memory", memory_item)

print(f"Memory with ID {example_id}:")
pprint.pprint(m.get(example_id))
print(f"Memories by IDs [{example_id}]:")
pprint.pprint(m.get_by_ids([example_id]))
print()

print("==== Update memories ====")
# Update the memory content for the specified ID
m.update(
example_id,
Expand All @@ -80,22 +87,26 @@ def print_result(title, result):
"metadata": {"type": "opinion", "confidence": 85},
},
)
updated_memory = m.get(example_id)
print_result("Update memory", updated_memory)

print(f"Memory after update (ID {example_id}):")
pprint.pprint(m.get(example_id))
print()

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


print("==== Delete memories ====")
# Delete memory with the specified ID
m.delete([example_id])
print_result("Delete memory (Check all after deleting)", m.get_all())

print("All memories after deletion:")
pprint.pprint(m.get_all())
print()

print("==== Delete all memories ====")
# Delete all memories in storage
m.delete_all()
print_result("Delete all", m.get_all())
print("All memories after delete_all:")
pprint.pprint(m.get_all())
print()
2 changes: 1 addition & 1 deletion examples/data/mem_cube_tree/textual_memory.json
Original file line number Diff line number Diff line change
Expand Up @@ -4216,4 +4216,4 @@
"edges": [],
"total_nodes": 4,
"total_edges": 0
}
}
2 changes: 1 addition & 1 deletion examples/mem_feedback/example_feedback.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def init_components():
mem_reader=mem_reader,
searcher=searcher,
reranker=mem_reranker,
pref_mem=None,
pref_feedback=True,
)

return feedback_server, memory_manager, embedder
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
##############################################################################

name = "MemoryOS"
version = "2.0.7"
version = "2.0.8"
description = "Intelligence Begins with Memory"
license = {text = "Apache-2.0"}
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion src/memos/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "2.0.7"
__version__ = "2.0.8"

from memos.configs.mem_cube import GeneralMemCubeConfig
from memos.configs.mem_os import MOSConfig
Expand Down
12 changes: 11 additions & 1 deletion src/memos/api/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,17 @@ def get_polardb_config(user_id: str | None = None) -> dict[str, Any]:
"user_name": user_name,
"use_multi_db": use_multi_db,
"auto_create": True,
"embedding_dimension": int(os.getenv("EMBEDDING_DIMENSION", 1024)),
"embedding_dimension": int(os.getenv("EMBEDDING_DIMENSION", "1024")),
# .env: CONNECTION_WAIT_TIMEOUT, SKIP_CONNECTION_HEALTH_CHECK, WARM_UP_ON_STARTUP_BY_FULL, WARM_UP_ON_STARTUP_BY_ALL
"connection_wait_timeout": int(os.getenv("CONNECTION_WAIT_TIMEOUT", "60")),
"skip_connection_health_check": os.getenv(
"SKIP_CONNECTION_HEALTH_CHECK", "false"
).lower()
== "true",
"warm_up_on_startup_by_full": os.getenv("WARM_UP_ON_STARTUP_BY_FULL", "false").lower()
== "true",
"warm_up_on_startup_by_all": os.getenv("WARM_UP_ON_STARTUP_BY_ALL", "false").lower()
== "true",
}

@staticmethod
Expand Down
2 changes: 0 additions & 2 deletions src/memos/api/handlers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
)
from memos.api.handlers.formatters_handler import (
format_memory_item,
post_process_pref_mem,
to_iter,
)

Expand All @@ -54,7 +53,6 @@
"formatters_handler",
"init_server",
"memory_handler",
"post_process_pref_mem",
"scheduler_handler",
"search_handler",
"suggestion_handler",
Expand Down
4 changes: 2 additions & 2 deletions src/memos/api/handlers/add_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class AddHandler(BaseHandler):
"""
Handler for memory addition operations.

Handles both text and preference memory additions with sync/async support.
Handles text memory additions with sync/async support.
"""

def __init__(self, dependencies: HandlerDependencies):
Expand All @@ -41,7 +41,7 @@ def handle_add_memories(self, add_req: APIADDRequest) -> MemoryResponse:
"""
Main handler for add memories endpoint.

Orchestrates the addition of both text and preference memories,
Orchestrates the addition of text memories,
supporting concurrent processing.

Args:
Expand Down
Loading
Loading