MCPcopy Index your code
hub / github.com/MemTensor/MemOS

github.com/MemTensor/MemOS @v2.0.22

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.0.22 ↗ · + Follow
11,337 symbols 43,800 edges 1,389 files 3,246 documented · 29% 84 cross-repo links updated 3d agov2.0.22 · 2026-07-03★ 10,108101 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

MemOS Banner

MemOS Logo  MemOS 2.0 Stardust(星尘)

Docs ArXiv X Discord Resources

🏆 Leading Performance Across Agent and User Memory Benchmarks

🤖 OpenClaw Task Completion Improves from 36.63% to 50.87%

🎯 92.34 on LoCoMo and 93.40 on LongMemEval

📊 Unified Evaluation Across 14 Commercial Memory Products

🧠 MemOS Plugin: Persistent Memory for Your AI Agents ✨

MemOS Plugin Banner

Your lobsters and Hermes Agents now have the best memory system — choose Cloud Service or Self-hosted to get started 🏃🏻

| 🔌 Plugin |

💡 Core Features

| 🧩 Resources | | :----: | :--- | :---: | | 🧠 memos-local-plugin 2.0 |

  • One local-first memory core for Hermes Agent and OpenClaw.
  • Self-evolving memory: L1 trace, L2 policy, L3 world model,

    and crystallized Skills driven by feedback.

| 🌐 Website · 📖 Docs · 🐙 GitHub · 📦 NPM | | ☁️ OpenClaw Cloud Plugin | | 🖥️ MemOS Dashboard · 📖 Full Tutorial |

🐳 Docker Deployment Note: When running memos-local-plugin in Docker containers, you must specify the config location using MEMOS_HOME environment variable or --home CLI flag. See Docker Configuration Guide for details.

👾 MemOS: Memory Operating System for LLM & AI Agents

MemOS is a Memory Operating System for LLMs and AI agents that unifies store / retrieve / manage for long-term memory, enabling context-aware and personalized interactions with KB, multi-modal, tool memory, and enterprise-grade optimizations built in.

Key Features

  • Unified Memory API: A single API to add, retrieve, edit, and delete memory—structured as a graph, inspectable and editable by design, not a black-box embedding store.
  • Multi-Modal Memory: Natively supports text, images, tool traces, and personas, retrieved and reasoned together in one memory system.
  • Multi-Cube Knowledge Base Management: Manage multiple knowledge bases as composable memory cubes, enabling isolation, controlled sharing, and dynamic composition across users, projects, and agents.
  • Asynchronous Ingestion via MemScheduler: Run memory operations asynchronously with millisecond-level latency for production stability under high concurrency.
  • Memory Feedback & Correction: Refine memory with natural-language feedback—correcting, supplementing, or replacing existing memories over time.

News

  • 2026-07-02 · 🏆 MemOS Advances Agent and User Memory Benchmarks With MemOS, OpenClaw improves average task completion from 36.63% to 50.87% across five agent tasks. MemOS also achieves 92.34 on LoCoMo and 93.40 on LongMemEval, and leads in OmniMemEval, a unified evaluation of 14 commercial memory products across ten datasets.

  • 2026-05-09 · 🧠 memos-local-plugin 2.0 Official local memory plugin for Hermes Agent and OpenClaw. One core powers self-evolving memory across L1 traces, L2 policies, L3 world models, and crystallized Skills, with local-first storage and feedback-driven retrieval.

  • 2026-04-10 · 👧🏻 MemOS Hermes Agent Local Plugin Official Hermes Agent memory plugins launched: Hybrid retrieval (FTS5 + vector), smart dedup, tiered skill evolution, multi-agent collaboration. 100% local, zero cloud dependency.

  • 2026-03-08 · 🦞 MemOS OpenClaw Plugin — Cloud & Local Official OpenClaw memory plugins launched. Cloud Plugin: hosted memory service with 72% lower token usage and multi-agent memory sharing (MemOS-Cloud-OpenClaw-Plugin). Local Plugin (v1.0.0): 100% on-device memory with persistent SQLite, hybrid search (FTS5 + vector), task summarization & skill evolution, multi-agent collaboration, and a full Memory Viewer dashboard.

  • 2025-12-24 · 🎉 MemOS v2.0: Stardust (星尘) Release Comprehensive KB (doc/URL parsing + cross-project sharing), memory feedback & precise deletion, multi-modal memory (images/charts), tool memory for agent planning, Redis Streams scheduling + DB optimizations, streaming/non-streaming chat, MCP upgrade, and lightweight quick/full deployment.

New Features

Knowledge Base & Memory - Added knowledge base support for long-term memory from documents and URLs

Feedback & Memory Management - Added natural language feedback and correction for memories - Added memory deletion API by memory ID - Added MCP support for memory deletion and feedback

Conversation & Retrieval - Added chat API with memory-aware retrieval - Added memory filtering with custom tags (Cloud & Open Source)

Multimodal & Tool Memory - Added tool memory for tool usage history - Added image memory support for conversations and documents

📈 Improvements

Data & Infrastructure - Upgraded database for better stability and performance

Scheduler - Rebuilt task scheduler with Redis Streams and queue isolation - Added task priority, auto-recovery, and quota-based scheduling

Deployment & Engineering - Added lightweight deployment with quick and full modes

🐞 Bug Fixes

Memory Scheduling & Updates - Fixed legacy scheduling API to ensure correct memory isolation - Fixed memory update logging to show new memories correctly

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

New Features

Playground - Expanded Playground features and algorithm performance.

MemCube Construction - Added a text game demo based on the MemCube novel.

Extended Evaluation Set - Added LongMemEval evaluation results and scripts.

📈 Improvements

Plaintext Memory - Integrated internet search with Bocha. - Expanded graph database support. - Added contextual understanding for the tree-structured plaintext memory search interface.

🐞 Bug Fixes

KV Cache Concatenation - Fixed the concat_cache method.

Plaintext Memory - Fixed graph search-related issues.

  • 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 MemOS: A Memory OS for AI System is available on arXiv.
  • 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.

🚀 Quick-start Guide

☁️ 1、Cloud API (Hosted)

Get API Key

Next Steps

🖥️ 2、Self-Hosted (Local/Private)

  1. Get the repository. bash git clone https://github.com/MemTensor/MemOS.git cd MemOS pip install -r ./docker/requirements.txt
  2. Configure docker/.env.example and copy to MemOS/.env
  3. The OPENAI_API_KEY,MOS_EMBEDDER_API_KEY,MEMRADER_API_KEY and others can be applied for through BaiLian.
  4. Fill in the corresponding configuration in the MemOS/.env file.
  5. Supported LLM providers: OpenAI, Azure OpenAI, Qwen (DashScope), DeepSeek, MiniMax, Ollama, HuggingFace, vLLM. Set MOS_CHAT_MODEL_PROVIDER to select the backend (e.g., openai, qwen, deepseek, minimax).
  6. Start the service.

  7. Launch via Docker ###### Tips: Please ensure that Docker Compose is installed successfully and that you have navigated to the docker directory (via cd docker) before executing the following command. bash # Enter docker directory docker compose up ##### For detailed steps, see theDocker Reference.

  8. Launch via the uvicorn command line interface (CLI) ###### Tips: Please ensure that Neo4j and Qdrant are running before executing the following command. bash cd src uvicorn memos.api.server_api:app --host 0.0.0.0 --port 8001 --workers 1 ##### For detailed integration steps, see the CLI Reference.

Basic Usage (Self-Hosted)

  • Add User Message ```python import requests import json

    data = { "user_id": "8736b16e-1d20-4163-980b-a5063c3facdc", "mem_cube_id": "b32d0977-435d-4828-a86f-4f47f8b55bca", "messages": [ { "role": "user", "content": "I like strawberry" } ], "async_mode": "sync" } headers = { "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 Memorypython import requests import json

    data = { "query": "What do I like", "user_id": "8736b16e-1d20-4163-980b-a5063c3facdc", "mem_cube_id": "b32d0977-435d-4828-a86f-4f47f8b55bca" } headers = { "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()}") ```

FAQ

What is MemOS?

MemOS is a Memory Operating System for LLMs and AI agents that unifies store/retrieve/manage for long-term memory. It enables context-aware and personalized interactions with knowledge base (KB), multi-modal memory, tool memory, and enterprise-grade optimizations built in.

What are the benchmark results?

MemOS achieves 92.34 on LoCoMo and 93.40 on LongMemEval for User Memory, while improving OpenClaw average task completion from 36.63% to 50.87% across five Agent Memory tasks. For details, see OmniMemEval, our unified evaluation framework for benchmarking 14 commercial memory products across ten datasets.

How does MemOS compare to other memory solutions?

Feature MemOS mem0 LangChain Memory Letta
Multi-Modal Memory ✅ Text/Images/Tools ❌ Text only ❌ Text only ❌ Text only
Knowledge Base ✅ Multi-Cube KB ❌ No KB ⚠️ RAG only ❌ No KB
Memor

Extension points exported contracts — how you extend this code

HostLlmBridge (Interface)
(no doc) [11 implementers]
apps/memos-local-plugin/core/llm/host-bridge.ts
RelayServer (Interface)
(no doc) [11 implementers]
apps/openwork-memos-integration/apps/desktop/skills/dev-browser/src/relay.ts
OpenClawAPI (Interface)
(no doc) [3 implementers]
packages/memos-core/src/types.ts
OpenClawAPI (Interface)
(no doc) [3 implementers]
apps/memos-local-openclaw/src/types.ts
ModelProviderConfig (Interface)
(no doc) [2 implementers]
packages/memos-schema/src/index.ts
IMemoryCore (Interface)
(no doc)
packages/adapter-base/src/index.ts
LlmProvider (Interface)
(no doc) [9 implementers]
apps/memos-local-plugin/core/llm/types.ts
AppSettingsSchema (Interface)
* App settings schema
apps/openwork-memos-integration/apps/desktop/src/main/store/appSettings.ts

Core symbols most depended-on inside this repo

get
called by 2738
apps/memos-local-plugin/core/storage/types.ts
join
called by 1661
src/memos/mem_scheduler/task_schedule_modules/dispatcher.py
info
called by 1460
apps/memos-local-plugin/core/logger/types.ts
map
called by 1156
src/memos/context/context.py
prepare
called by 794
apps/memos-local-plugin/core/storage/types.ts
Field
called by 748
apps/memos-local-plugin/viewer/src/views/SettingsView.tsx
t
called by 688
apps/memos-local-plugin/viewer/src/stores/i18n.ts
error
called by 592
apps/memos-local-openclaw/index.ts

Shape

Method 4,811
Function 4,566
Interface 976
Class 906
Route 78

Languages

TypeScript58%
Python42%

Modules by API surface

apps/memos-local-openclaw/src/storage/sqlite.ts229 symbols
packages/memos-core/src/storage/sqlite.ts226 symbols
apps/memos-local-plugin/core/pipeline/memory-core.ts193 symbols
packages/memos-core/src/viewer/server.ts173 symbols
apps/memos-local-openclaw/src/viewer/server.ts173 symbols
apps/memos-local-plugin/tests/python/test_bridge_client.py111 symbols
src/memos/api/product_models.py105 symbols
src/memos/graph_dbs/polardb.py88 symbols
apps/memos-local-plugin/agent-contract/memory-core.ts72 symbols
tests/test_utils_timing.py62 symbols
apps/memos-local-plugin/adapters/hermes/memos_provider/__init__.py61 symbols
tests/plugins/test_plugin_demo.py58 symbols

Dependencies from manifests, versioned

@accomplish/sharedworkspace:* · 1×
@aws-sdk/client-bedrock3.971.0 · 1×
@aws-sdk/credential-providers3.971.0 · 1×
@electron/rebuild4.0.2 · 1×
@hono/node-server1.19.7 · 1×
@hono/node-ws1.2.0 · 1×
@modelcontextprotocol/sdk1.0.0 · 1×
@playwright/test1.57.0 · 1×
@preact/preset-vite2.10.5 · 1×
@preact/signals2.9.0 · 1×

Datastores touched

(mysql)Database · 1 repos

For agents

$ claude mcp add MemOS \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact