Skip to content

chore: bump version number to v0.2.1#131

Merged
fridayL merged 29 commits intomainfrom
dev
Jul 21, 2025
Merged

chore: bump version number to v0.2.1#131
fridayL merged 29 commits intomainfrom
dev

Conversation

@fridayL
Copy link
Collaborator

@fridayL fridayL commented Jul 21, 2025

Description

Bug Fixes:

Fixed reorganizer bugs and argument errors
Resolved None issue in reorganizer queue
Updated Python version constraints

New Features:

Added support for multiple embedders (Ark/Volcengine, Universal API)
Introduced Neo4j database integration and sharing capabilities
Added evaluation pipeline (longmemeval)
Implemented multi-language support and customizable system prompts
Added MCP (Model Context Protocol) server support with client demo

Improvements:

Enhanced memory management with ID returns and clustering optimizations
Simplified user onboarding with basic memos
Expanded LLM API support and optimized dependency management
Added development tools (download examples, issue templates, stale management)

Documentation & DevOps:

Updated issue/PR templates and workflows
Improved multi-user example implementations

with significant additions to embedding support, database backends, and user experience improvements.

CaralHsi and others added 28 commits July 12, 2025 03:34
* fix: reorganizer bug

* refactor: update conflict redundancy handling to archive nodes instead of deleting

* fix: mute redundancy resolution

---------

Co-authored-by: dany <973031439@qq.com>
* feat: add volcengine embedding support

* test: add volcengine embedding test

* feat(embedder): add support for ArkEmbedder

* fixed: minor typo fix and remove unnecessary function

* test: add image embedding test

* fixed: remove images embed support and test

* fixed: change chunk_size default value
* fix: GeneralTextMemory._embed_one_sentence Argument Error

* fix: fix unittest
* feat: add neo4j share-db example

* feat: add Shared Database Multi-Tenant Mode

* fix: neo4j auto create bug

* fix: tree text memory reorganizer bug

* feat: change 'RELATE_TO' to 'RELATE'

* fix: database exist bug

* feat: delete useless relation edge

* feat: finish Shared Database Multi-Tenant Mode

* feat: add share database multi tenant tree config

* feat: add shared-db mode config

* fix: file name bug in example tree text memory]

* style: add user_name from config
* feat: add api embedder

* test: add unittest for universal api embedder

* Update src/memos/embedders/universal_api.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/memos/configs/embedder.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* style: reformat

* style: reformat

---------

Co-authored-by: chunyu li <78344051+fridayL@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
feat: add embedder consistency check with warning and tests

Resolves configuration scope issue where MemCube and MOS embedder
configs could differ without user awareness.

Co-authored-by: chunyu li <78344051+fridayL@users.noreply.github.com>
* feat: add product API and related functionality (cleaned sensitive data)

* feat: add singleton for memos and llm

* fix:fix persistent_user_manager

* feat:update prompt and rm readme

* fix:ci code

* feat: update demo and add user manager (#31)

* feat: add product API and related functionality (cleaned sensitive data)

* feat: add singleton for memos and llm

* fix:fix persistent_user_manager

* feat:update prompt and rm readme

* fix:ci code

* Feature & Fix bugs: mem scheduler with rabbitmq and web log submission
	* fix bug of message consuming
	* add a range of configs
	* support rabbitmq
	* add new docs for the beginner
	* add more examples

* fix:UserRole error

* update: update product api

* fix: suggestion mem

* update:fix add mem

* feat: update  chat

* fix: add uuid and product think

* update: search data

* fix:update

* fix:chat mem

* feat:vllm llm support version0

* feat: update zh en and mem

* feat: update cube ids

* feat:vllm llm support version0.5

* fix: memchat multi turn

* feat: add multi-language feature in mem-reader

* feat: add multi-language feature in mem-reader

* feat: add multi-language feature in tree reorganizer

* feat: reinforce language

* fix:fix search and add product tmp data

* fix bugs & refactor the code: mem scheduler support web log feature

* refactor & fix bugs: mem scheduler related codes including modules like dispatcher and retriever, the dependencies and the unittest.

* fix:remove dup

* feat: add logs

* feat:vllm llm support streaming generate and add benchmark script

* add: chat time for add

* fix:merge error

* fix:merge error

* feat & fix bugs: factor mem scheduler. test_retriever.py is waiting for test

* feat:add vllm chat model

* fix bugs: filter logging of retriever module in mem scheduler

* fix: test_api

* feat:update feat

* fix: manager

* feat: add vllm cahche

* fix bugs: fix scheduler logging bug of working memory replacement

* refactor: change default update interval

* fix bugs: fix bugs in  update activation memory in memory scheduler

* add support for azure backend

* feat: add deafult config overide for store config

* feat: add MOS_ENABLE_REORGANIZE config

* fix bugs: fix bugs of filter and updating activation memories

* fix bugs: change name

* feat: add act mme

* fix:poetry lock

* delete: del
 file

---------

Co-authored-by: chentang <travistang@foxmail.com>
Co-authored-by: Kai <kakack@126.com>
Co-authored-by: 席阳阳 <caralhsi@gmail.com>
Co-authored-by: zhangyibo.114514 <zhangyibo.114514@bytedance.com>
* fix: examples cannot be used while using pip
Fixes #52

* docs: update README

* fix: revert deletion

* test: add unit tests for MemOS CLI functions

* Update Makefile

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* feat: add stale issue and PR management workflow

* chore: add comments

* fix: update comments by the way

* fix: update stale PR messages for consistency

* fix: revert pr template changes
* 1. 豆包支持非多模态模型
2. embedder支持Azure backend

* fix typo

* add example
* feat(eval): add eval dependencies

* feat(eval): add configs example

* docs(eval): update README.md

* feat(eval): remove the dependency (pydantic)

* feat(eval): add run locomo eval script

* fix(eval): delete about memos redundant search branches

* chore: fix format

* feat(eval): add openai memory on locomo - eval guide

* docs(eval): modify openai memory on locomo - eval guide

* feat(eval): add longmemeval evaluation pipeline

* chore(eval): formatter

* chore: update

* feat(eval): add configs example
* feat: update config

* fix:dim

* change dim

* fix:change default db

* fix:delay

* fix:len
feat: Add parameter to chat functions to override the base system prompt with a custom system prompt.

Co-authored-by: chunyu li <78344051+fridayL@users.noreply.github.com>
* fix n4j cypher query

* feat: add llm extra body

* feat: update memory extraction prompt and result parser

* fix: evaluation locomo search

* ci: fix format and update test

* feat: update result json parser

* feat: recursively cluster nodes to max_cluster_size

* fix: fix template

* feat: keep default min-group-size 3

* feat: keep default min-group-size 3
* feat: return ids when add memory

* feat: add example for how to use tree.add

* tests: add tests for tree memory add

* tests: add tests for tree memory add
* feat:  add neo and simple memos

* fix: remove mock data
* fix: language bug

* feat: add qwen api

* feat: modify qwen llm

* feat: add deepseek llm

* feat: add stream output for openai

* test: add unit test for llms

* Update src/memos/llms/deepseek.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: multi llm test bug

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix n4j cypher query

* feat: add llm extra body

* feat: update memory extraction prompt and result parser

* fix: evaluation locomo search

* ci: fix format and update test

* feat: update result json parser

* feat: recursively cluster nodes to max_cluster_size

* fix: fix template

* feat: keep default min-group-size 3

* feat: keep default min-group-size 3

* feat: update doc mem reader

* test: fix test

---------

Co-authored-by: CaralHsi <caralhsi@gmail.com>
* build: optimize dependencies management

* build: drop deprecated sections

* fix: correct typo and commands

* refactor: optimize pyproject.toml

* ci: add Python release testing workflow

* build: optimize version constraints and optional groups

* fix: update patch paths for SentenceChunker and QdrantClient in tests

* ci: enhance dependency and building test

* docs: update installation instructions

* fix: move ruff dependency to test group

* fix: specify encoding

* fix: refine wheel and sdist installation steps for OS-specific handling

* fix: update Windows installation commands to use PowerShell syntax

* chore: add comments for clarity in Python tests workflow

* fix: report slowest tests

* ci: support macos-13 as much as possible

* fix: macos-13 testing

* chore: add comments

* chore: update comments in pyproject.toml

* docs: support all platforms

* fix: poetry update

* fix: move scikit-learn and qdrant-client

* docs: clarify optional dependencies

---------

Co-authored-by: CaralHsi <caralhsi@gmail.com>
fix: revise None type in QueueMessage to op=end

Co-authored-by: CaralHsi <caralhsi@gmail.com>
* feat:add mcp serve

* feat: add mcp serve and http client api

* add: stdio for memos mcp

* fix:remove dup content and reconstructed code

* fix : reorg core dire and add mcp examples
* feat: init neo4j-community

* feat: Inherit existing class for Community Edition database support

* feat: add outer vector db

* feat: finish neo4j community

* feat: add tree community config example

* fix: ensure outer db for neo4j-community is server mode

* feat: update tree-config-community

* fix: bug for qdrant delete

* fix: create index for outer_db

* feat: add ensure payload index exists in qdrant

* feat: create index for qdrant

* feat: add simple_openapi_memos_neo4j_community
…eo4j database (#109)

* feat: add share-db multi user mode locomo showcase

* fix: turn on reorganize

* fix: try to fix 'never clsoe' issue, try-1

* fix: try to fix 'never clsoe' issue, try-2

* fix: mos_product.add in example

---------

Co-authored-by: jiawei yang <103758578+J1awei-Yang@users.noreply.github.com>
Co-authored-by: dany <973031439@qq.com>
Co-authored-by: CaralHsi <caralhsi@gmail.com>
@fridayL fridayL requested a review from Ki-Seki July 21, 2025 12:06
if isinstance(mem_cube_name_or_path, GeneralMemCube):
self.mem_cubes[mem_cube_id] = mem_cube_name_or_path
logger.info(f"register new cube {mem_cube_id} for user {target_user_id}")
elif os.path.exists(mem_cube_name_or_path):

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This path depends on a
user-provided value
.

Copilot Autofix

AI 7 months ago

To resolve this issue, ensure that the path provided by the user is validated before being used. A common and effective approach is to normalize the path using os.path.normpath and ensure it stays within a predefined safe root directory. This prevents directory traversal attacks. Additionally, we can add further restrictions by using a library like werkzeug.utils.secure_filename to sanitize filenames if applicable.

In this case, we will normalize the path, verify it resides within a safe root directory, and reject any paths that do not comply. The root directory will be configurable or static (e.g., "/safe/root/directory").


Suggested changeset 1
src/memos/mem_os/core.py

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/memos/mem_os/core.py b/src/memos/mem_os/core.py
--- a/src/memos/mem_os/core.py
+++ b/src/memos/mem_os/core.py
@@ -27,8 +27,8 @@
 
 
 logger = get_logger(__name__)
+SAFE_ROOT_DIRECTORY = "/safe/root/directory"
 
-
 class MOSCore:
     """
     The MOSCore (Memory Operating System Core) class manages multiple MemCube objects and their operations.
@@ -449,7 +448,7 @@
             if isinstance(mem_cube_name_or_path, GeneralMemCube):
                 self.mem_cubes[mem_cube_id] = mem_cube_name_or_path
                 logger.info(f"register new cube {mem_cube_id} for user {target_user_id}")
-            elif os.path.exists(mem_cube_name_or_path):
+            elif self._is_safe_path(mem_cube_name_or_path):
                 self.mem_cubes[mem_cube_id] = GeneralMemCube.init_from_dir(mem_cube_name_or_path)
             else:
                 logger.warning(
@@ -493,6 +492,20 @@
             )
             logger.info(f"register new cube {mem_cube_id} for user {target_user_id}")
 
+    def _is_safe_path(self, path: str) -> bool:
+        """
+        Validate if the given path is within the safe root directory.
+
+        Args:
+            path (str): Path to validate.
+
+        Returns:
+            bool: True if the path is safe, False otherwise.
+        """
+        normalized_path = os.path.normpath(path)
+        absolute_path = os.path.abspath(normalized_path)
+        return absolute_path.startswith(SAFE_ROOT_DIRECTORY)
+
     def unregister_mem_cube(self, mem_cube_id: str, user_id: str | None = None) -> None:
         """
         Unregister a MemCube by its identifier.
EOF
@@ -27,8 +27,8 @@


logger = get_logger(__name__)
SAFE_ROOT_DIRECTORY = "/safe/root/directory"


class MOSCore:
"""
The MOSCore (Memory Operating System Core) class manages multiple MemCube objects and their operations.
@@ -449,7 +448,7 @@
if isinstance(mem_cube_name_or_path, GeneralMemCube):
self.mem_cubes[mem_cube_id] = mem_cube_name_or_path
logger.info(f"register new cube {mem_cube_id} for user {target_user_id}")
elif os.path.exists(mem_cube_name_or_path):
elif self._is_safe_path(mem_cube_name_or_path):
self.mem_cubes[mem_cube_id] = GeneralMemCube.init_from_dir(mem_cube_name_or_path)
else:
logger.warning(
@@ -493,6 +492,20 @@
)
logger.info(f"register new cube {mem_cube_id} for user {target_user_id}")

def _is_safe_path(self, path: str) -> bool:
"""
Validate if the given path is within the safe root directory.

Args:
path (str): Path to validate.

Returns:
bool: True if the path is safe, False otherwise.
"""
normalized_path = os.path.normpath(path)
absolute_path = os.path.abspath(normalized_path)
return absolute_path.startswith(SAFE_ROOT_DIRECTORY)

def unregister_mem_cube(self, mem_cube_id: str, user_id: str | None = None) -> None:
"""
Unregister a MemCube by its identifier.
Copilot is powered by AI and may make mistakes. Always verify output.
* feat: one-click deployment with docker

* feat: one-click deployment with docker

* feat: one-click deployment with docker

* feat: one-click deployment with docker

* feat: one-click deployment with docker

* feat: one-click deployment with docker

* feat: one-click deployment with docker

* feat: one-click deployment with docker
@fridayL fridayL merged commit b572f0f into main Jul 21, 2025
39 of 40 checks passed
tianxing02 pushed a commit to tianxing02/MemOS that referenced this pull request Feb 24, 2026
## Description
Bug Fixes:

Fixed reorganizer bugs and argument errors
Resolved None issue in reorganizer queue
Updated Python version constraints

New Features:

Added support for multiple embedders (Ark/Volcengine, Universal API)
Introduced Neo4j database integration and sharing capabilities
Added evaluation pipeline (longmemeval)
Implemented multi-language support and customizable system prompts
Added MCP (Model Context Protocol) server support with client demo

Improvements:

Enhanced memory management with ID returns and clustering optimizations
Simplified user onboarding with basic memos
Expanded LLM API support and optimized dependency management
Added development tools (download examples, issue templates, stale
management)

Documentation & DevOps:

Updated issue/PR templates and workflows
Improved multi-user example implementations

with significant additions to embedding support, database backends, and
user experience improvements.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.