Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
2dcdf75
update readme (#194)
tangg555 Jul 30, 2025
cd99dc5
fix: nebula multi-embedding & add BochaAI Search Retriever (#195)
CaralHsi Jul 30, 2025
a172146
feat: modify product config (#199)
CaralHsi Jul 30, 2025
5bfac00
fix: fix bug when calling _concat_caches in kv.py (from pr#177) (#205)
spitzblattr Aug 1, 2025
2a6a0f2
Feat/reorg dev (#202)
Nyakult Aug 1, 2025
013d0ad
feat: enhance retriever, reorganizer & NebulaGraph handling (#200)
CaralHsi Aug 1, 2025
a175bf1
feat & refactor: add search function feature to test scheduler on a m…
tangg555 Aug 1, 2025
1462b7a
feature & fix bugs: fix bugs after removing initialize_working_memory…
tangg555 Aug 3, 2025
b30ffca
feat: add custom request log (#206)
CarltonXiang Aug 4, 2025
36c110c
fix: a temporal workaround for the "virtualenv 20.33.0 breaks Poetry …
Ki-Seki Aug 5, 2025
0a9aa70
chore: The Poetry virtualenv issue persists; another temporary workar…
Ki-Seki Aug 5, 2025
9ae9737
fix: reference for some string (#211)
fridayL Aug 5, 2025
2a32911
fix: self.mem_cubes RuntimeError: dictionary changed size during iter…
fridayL Aug 5, 2025
0686fb2
feat: add embedding-aware graph query interfaces and parallel retriev…
CaralHsi Aug 5, 2025
c1e1a85
feat: delete-custom-logger (#220)
CarltonXiang Aug 6, 2025
5dab4f1
Refactor: Conflict resolution, bug fixes mainly for the mem scheduler…
tangg555 Aug 6, 2025
ae3fc53
feat: fix illumination (#222)
CaralHsi Aug 6, 2025
eb73b75
fix: reorganize and schedular bug (#223)
CaralHsi Aug 6, 2025
9825f87
MemOS v0.2.3 release (#225)
kakack Aug 7, 2025
6c68d35
fix: remove field name will cause error for org-memscheduler config …
fridayL Aug 7, 2025
d565323
MemOS v0.2.3 release (#227)
kakack Aug 7, 2025
db794c4
Merge branch 'main' into dev
fridayL Aug 7, 2025
a2ec665
feat: illumination (#229)
CaralHsi Aug 7, 2025
2fc71c8
Chore: Change version to v1.0.0 (#230)
kakack Aug 7, 2025
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
7 changes: 6 additions & 1 deletion .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
# This is a temporary fix to ensure compatibility with Poetry & virtualenv
# Revert to the original installation method once the poetry==2.1.4 is released
run: |
echo "virtualenv==20.32.0" > constraints.txt
pipx install poetry==2.1.3 --pip-args="--constraint=constraints.txt"
rm constraints.txt
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ evaluation/configs/*
.env
evaluation/scripts/personamem

# benchmarks
benchmarks/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,11 @@ MemOS is licensed under the [Apache 2.0 License](./LICENSE).

Stay up to date with the latest MemOS announcements, releases, and community highlights.


- **2025-08-07** - 🎉 *MemOS v1.0.0 (MemCube Release)*: First MemCube with word game demo, LongMemEval evaluation, BochaAISearchRetriever integration, NebulaGraph support, enhanced search capabilities, and official Playground launch.
- **2025-07-29** – 🎉 *MemOS v0.2.2 (Nebula Update)*: Internet search+Nebula DB integration, refactored memory scheduler, KV Cache stress tests, MemCube Cookbook release (CN/EN), and 4b/1.7b/0.6b memory ops models.
- **2025-07-21** – 🎉 *MemOS v0.2.1 (Neo Release)*: Lightweight Neo version with plaintext+KV Cache functionality, Docker/multi-tenant support, MCP expansion, and new Cookbook/Mud game examples.
- **2025-07-11** – 🎉 *MemOS v0.2.0 (Cross-Platform)*: Added doc search/bilingual UI, MemReader-4B (local deploy), full Win/Mac/Linux support, and playground end-to-end connection.
- **2025-07-07** – 🎉 *MemOS 1.0 (Stellar) Preview Release*: A SOTA Memory OS for LLMs is now open-sourced.
- **2025-07-04** – 🎉 *MemOS Paper Released*: [MemOS: A Memory OS for AI System](https://arxiv.org/abs/2507.03724) was published on arXiv.
- **2025-05-28** – 🎉 *Short Paper Uploaded*: [MemOS: An Operating System for Memory-Augmented Generation (MAG) in Large Language Models](https://arxiv.org/abs/2505.22101) was published on arXiv.
Expand Down
2 changes: 1 addition & 1 deletion docs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@
"type": "string",
"title": "Session Id",
"description": "Session ID for the MOS. This is used to distinguish between different dialogue",
"default": "842877f4-c3f7-4c22-ad38-5950026870fe"
"default": "0ce84b9c-0615-4b9d-83dd-fba50537d5d3"
},
"chat_model": {
"$ref": "#/components/schemas/LLMConfigFactory",
Expand Down
12 changes: 6 additions & 6 deletions evaluation/scripts/run_locomo_eval.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ VERSION="072001"
WORKERS=10
TOPK=20

# echo "Running locomo_ingestion.py..."
# CUDA_VISIBLE_DEVICES=0 python scripts/locomo/locomo_ingestion.py --lib $LIB --version $VERSION --workers $WORKERS
# if [ $? -ne 0 ]; then
# echo "Error running locomo_ingestion.py"
# exit 1
# fi
echo "Running locomo_ingestion.py..."
CUDA_VISIBLE_DEVICES=0 python scripts/locomo/locomo_ingestion.py --lib $LIB --version $VERSION --workers $WORKERS
if [ $? -ne 0 ]; then
echo "Error running locomo_ingestion.py"
exit 1
fi

echo "Running locomo_search.py..."
CUDA_VISIBLE_DEVICES=0 python scripts/locomo/locomo_search.py --lib $LIB --version $VERSION --top_k $TOPK --workers $WORKERS
Expand Down
17 changes: 9 additions & 8 deletions examples/basic_modules/nebular_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def show(nebular_data):

tree_config = Neo4jGraphDBConfig.from_json_file("../../examples/data/config/neo4j_config.json")
tree_config.use_multi_db = True
tree_config.db_name = "nebular-show"
tree_config.db_name = "nebular-show2"

neo4j_db = Neo4jGraphDB(tree_config)
neo4j_db.clear()
Expand All @@ -42,6 +42,7 @@ def show(nebular_data):
}
)
embedder = EmbedderFactory.from_config(embedder_config)
embedder_dimension = 3072


def embed_memory_item(memory: str) -> list[float]:
Expand All @@ -62,7 +63,7 @@ def example_multi_db(db_name: str = "paper"):
"space": db_name,
"use_multi_db": True,
"auto_create": True,
"embedding_dimension": 3072,
"embedding_dimension": embedder_dimension,
},
)

Expand Down Expand Up @@ -121,7 +122,7 @@ def example_shared_db(db_name: str = "shared-traval-group"):
"user_name": user_name,
"use_multi_db": False,
"auto_create": True,
"embedding_dimension": 3072,
"embedding_dimension": embedder_dimension,
},
)

Expand Down Expand Up @@ -208,7 +209,7 @@ def example_shared_db(db_name: str = "shared-traval-group"):
"space": db_name,
"user_name": user_list[0],
"auto_create": True,
"embedding_dimension": 3072,
"embedding_dimension": embedder_dimension,
"use_multi_db": False,
},
)
Expand Down Expand Up @@ -238,7 +239,7 @@ def run_user_session(
"user_name": user_name,
"use_multi_db": False,
"auto_create": True,
"embedding_dimension": 3072,
"embedding_dimension": embedder_dimension,
},
)
graph = GraphStoreFactory.from_config(config)
Expand Down Expand Up @@ -404,10 +405,10 @@ def example_complex_shared_db(db_name: str = "shared-traval-group-complex"):

if __name__ == "__main__":
print("\n=== Example: Multi-DB ===")
example_multi_db(db_name="paper")
example_multi_db(db_name="paper-new")

print("\n=== Example: Single-DB ===")
example_shared_db(db_name="shared_traval_group")
example_shared_db(db_name="shared_traval_group-new")

print("\n=== Example: Single-DB-Complex ===")
example_complex_shared_db(db_name="shared-traval-group-complex-new11")
example_complex_shared_db(db_name="shared-traval-group-complex-new2")
52 changes: 52 additions & 0 deletions examples/basic_modules/textual_memory_internet_search_example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
"""
Example: Using InternetRetrieverFactory with BochaAISearchRetriever
"""

from memos.configs.embedder import EmbedderConfigFactory
from memos.configs.internet_retriever import InternetRetrieverConfigFactory
from memos.embedders.factory import EmbedderFactory
from memos.memories.textual.tree_text_memory.retrieve.internet_retriever_factory import (
InternetRetrieverFactory,
)


# ========= 1. Create an embedder =========
embedder_config = EmbedderConfigFactory.model_validate(
{
"backend": "ollama", # Or "sentence_transformer", etc.
"config": {
"model_name_or_path": "nomic-embed-text:latest",
},
}
)
embedder = EmbedderFactory.from_config(embedder_config)

# ========= 2. Create retriever config for BochaAI =========
retriever_config = InternetRetrieverConfigFactory.model_validate(
{
"backend": "bocha",
"config": {
"api_key": "sk-xxx", # Your BochaAI API Key
"max_results": 5,
"reader": { # Reader config for chunking web content
"backend": "simple_struct",
"config": { # your simple struct reader config
},
},
},
}
)

# ========= 3. Build retriever instance via factory =========
retriever = InternetRetrieverFactory.from_config(retriever_config, embedder)

# ========= 4. Run BochaAI Web Search =========
print("=== Scenario 1: Web Search (BochaAI) ===")
query_web = "Alibaba 2024 ESG report"
results_web = retriever.retrieve_from_internet(query_web)

print(f"Retrieved {len(results_web)} memory items.")
for idx, item in enumerate(results_web, 1):
print(f"[{idx}] {item.memory[:500]}...") # preview first 100 chars

print("==" * 20)
17 changes: 0 additions & 17 deletions examples/core_memories/tree_textual_memory.py
Original file line number Diff line number Diff line change
@@ -1,32 +1,15 @@
import time

from memos import log
from memos.configs.embedder import EmbedderConfigFactory
from memos.configs.mem_reader import SimpleStructMemReaderConfig
from memos.configs.memory import TreeTextMemoryConfig
from memos.embedders.factory import EmbedderFactory
from memos.mem_reader.simple_struct import SimpleStructMemReader
from memos.memories.textual.tree import TreeTextMemory


logger = log.get_logger(__name__)


embedder_config = EmbedderConfigFactory.model_validate(
{
"backend": "ollama",
"config": {
"model_name_or_path": "nomic-embed-text:latest",
},
}
)
embedder = EmbedderFactory.from_config(embedder_config)


def embed_memory_item(memory: str) -> list[float]:
return embedder.embed([memory])[0]


tree_config = TreeTextMemoryConfig.from_json_file(
"examples/data/config/tree_config_shared_database.json"
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
backend: general_scheduler
config:
top_k: 10
top_n: 10
act_mem_update_interval: 30
context_window_size: 10
thread_pool_max_workers: 5
consume_interval_seconds: 1
working_mem_monitor_capacity: 20
activation_mem_monitor_capacity: 5
enable_parallel_dispatch: true
enable_activation_memory: true
15 changes: 0 additions & 15 deletions examples/data/config/mem_scheduler/mem_chat_config.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ mem_scheduler:
backend: "general_scheduler"
config:
top_k: 10
top_n: 10
act_mem_update_interval: 30
context_window_size: 10
thread_pool_max_workers: 10
consume_interval_seconds: 1
working_mem_monitor_capacity: 20
activation_mem_monitor_capacity: 5
enable_parallel_dispatch: true
enable_activation_memory: true
max_turns_window: 20
top_k: 5
enable_textual_memory: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,14 @@ mem_scheduler:
backend: "general_scheduler"
config:
top_k: 10
top_n: 10
act_mem_update_interval: 30
context_window_size: 10
thread_pool_max_workers: 10
consume_interval_seconds: 1
working_mem_monitor_capacity: 20
activation_mem_monitor_capacity: 5
enable_parallel_dispatch: true
enable_act_memory_update: false
enable_activation_memory: true
max_turns_window: 20
top_k: 5
enable_textual_memory: true
Expand Down
37 changes: 0 additions & 37 deletions examples/data/config/mem_scheduler/memos_config_wo_scheduler.yaml

This file was deleted.

Loading
Loading