Pre-submission checklist | 提交前检查
Problem Statement | 问题陈述
As MemOS evolves, more and more optional capabilities are being added around memory ingestion, retrieval, and feedback (e.g., NLI-based relation judgment, memory versioning, custom post-processing pipelines). Embedding all of these directly into the core codebase leads to tight coupling, heavier dependencies, and makes it difficult for users to selectively enable only the features they need.
We need a lightweight plugin architecture that allows extra functionality to be developed, distributed, and activated independently — without modifying core MemOS code.
Proposal
Introduce a hook-based plugin framework with the following design goals:
Pluggable extras — Features like NLI relation judgment and memory history management can be packaged as standalone plugins, installed via pip and discovered automatically through importlib.metadata entry points.
Clean extension points — A @hookable decorator and hook registry (trigger_hook / trigger_single_hook) allow plugins to tap into key lifecycle events (add, search, feedback, mem_reader) without patching core code.
Minimal core footprint — The core framework (src/memos/plugins/) is intentionally small (~5 modules). It provides base classes, hook definitions, and a plugin manager — nothing else. All business logic lives in plugins.
Backward compatibility — When no plugins are installed, MemOS behaves exactly as before. Hooks with no registered callbacks are silently skipped (for multi-provider hooks) or raise clear errors (for single-provider hooks), making missing plugins immediately obvious during development.
Scope
New src/memos/plugins/ package (base class, hook registry, plugin manager, component bootstrap)
Integration points in server_api.py, component_init.py, scheduler initialization
memory_version_switch config field for opt-in memory versioning pipeline
Migration of NLI client and memory history manager out of core into plugin-managed components
Plugin test suite (tests/plugins/)
Willingness to Implement | 实现意愿
Pre-submission checklist | 提交前检查
Problem Statement | 问题陈述
As MemOS evolves, more and more optional capabilities are being added around memory ingestion, retrieval, and feedback (e.g., NLI-based relation judgment, memory versioning, custom post-processing pipelines). Embedding all of these directly into the core codebase leads to tight coupling, heavier dependencies, and makes it difficult for users to selectively enable only the features they need.
We need a lightweight plugin architecture that allows extra functionality to be developed, distributed, and activated independently — without modifying core MemOS code.
Proposal
Introduce a hook-based plugin framework with the following design goals:
Pluggable extras — Features like NLI relation judgment and memory history management can be packaged as standalone plugins, installed via pip and discovered automatically through importlib.metadata entry points.
Clean extension points — A @hookable decorator and hook registry (trigger_hook / trigger_single_hook) allow plugins to tap into key lifecycle events (add, search, feedback, mem_reader) without patching core code.
Minimal core footprint — The core framework (src/memos/plugins/) is intentionally small (~5 modules). It provides base classes, hook definitions, and a plugin manager — nothing else. All business logic lives in plugins.
Backward compatibility — When no plugins are installed, MemOS behaves exactly as before. Hooks with no registered callbacks are silently skipped (for multi-provider hooks) or raise clear errors (for single-provider hooks), making missing plugins immediately obvious during development.
Scope
New src/memos/plugins/ package (base class, hook registry, plugin manager, component bootstrap)
Integration points in server_api.py, component_init.py, scheduler initialization
memory_version_switch config field for opt-in memory versioning pipeline
Migration of NLI client and memory history manager out of core into plugin-managed components
Plugin test suite (tests/plugins/)
Willingness to Implement | 实现意愿