MemOS Documentation

What is MemOS?
As large language models (LLMs) evolve to tackle advanced tasks—such as multi-turn dialogue, planning, decision-making, and personalized agents—their ability to manage and utilize memory becomes crucial for achieving long-term intelligence and adaptability. However, mainstream LLM architectures often struggle with weak memory structuring, management, and integration, leading to high knowledge update costs, unsustainable behavioral states, and difficulty in accumulating user preferences.
MemOS addresses these challenges by redefining memory as a core, first-class resource with unified structure, lifecycle management, and scheduling strategies. It provides a Python package that delivers a unified memory layer for LLM-based applications, enabling persistent, structured, and efficient memory operations. This empowers LLMs with long-term knowledge retention, robust context management, and memory-augmented reasoning, supporting more intelligent and adaptive behaviors.
Key Features
- Modular Memory Architecture: Support for textual, activation (KV cache), and parametric (adapters/LoRA) memory.
- MemCube: Unified container for all memory types, with easy load/save and API access.
- MOS: Memory-augmented chat orchestration for LLMs, with plug-and-play memory modules.
- Graph-based Backends: Native support for Neo4j and other graph DBs for structured, explainable memory.
- Easy Integration: Works with HuggingFace, Ollama, and custom LLMs.
- Extensible: Add your own memory modules or backends.
Installation
pip install MemoryOS
To use with Ollama:
curl -fsSL https://ollama.com/install.sh | sh
For transformer models, ensure PyTorch is installed.
Documentation Structure
- Overview: Project structure and architecture
- Examples: Step-by-step usage and code samples
- MOS: Memory-augmented orchestration for LLMs
- MemCube: Unified memory container
- Memories: Details on each memory type (textual, tree, KV cache)
- Basic Modules: Core building blocks (e.g., Neo4j graph DB)
- Contribution: How to contribute
- Troubleshooting: Network and environment tips
Use the navigation sidebar to explore each section in detail.
Contributing
We welcome contributions! Please see the contribution guidelines for details on setting up your environment and submitting pull requests.
License
MemOS is released under the Apache 2.0 License.