MemOS README

The project's README from github.com/MemTensor/MemOS. As one markdown file: README.md.

MemOS Logo   MemOS 2.0 Stardust(星尘)

Docs ArXiv X Discord
Resources

Give your Agent persistent memory and the ability to grow.

English | 中文

MemOS agent ecosystem: OpenClaw, Hermes, and DeepSeek Harness

[!TIP] New: Connect MemOS to DeepSeek Harness (dsh)

Add automatic recall, background capture, hybrid retrieval, and a local Memory Viewer to DeepSeek Harness—powered by the same MemOS core used across agent ecosystems.

Get started →


👾 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

News

📊 Performance

MemOS leads across multiple benchmarks — evaluated against mainstream commercial memory products across 5 user memory and 5 agent memory tasks.

Benchmark Score
LoCoMo 88.83
LongMemEval 89.20
PersonaMem v2 40.58
HaluMem 80.91
BEAM-10M 56.75
GDPVal 62.07
LiveCodeBench 64.96
OmniMath 61.00
SWE-Bench 38.46
BrowseComp-Plus 23.85

Evaluated via OmniMemEval — https://github.com/MemTensor/OmniMemEval.

🎯 What MemOS Is For

MemOS gives AI agents long-term memory. Common uses:

🚀 Quick Start

MemOS is built around four entry points. Pick the one that matches your scenario.

Cloud API Self-Host MemOS Cloud Plugin Local Plugin
Best for Your app, fully managed Teams on own infra OpenClaw users, zero ops DeepSeek Harness, Hermes, or OpenClaw; on-device
Setup Get an API key docker compose up openclaw plugins install npm install + agent-specific setup
Infra needed None (hosted) Neo4j + Qdrant None (uses MemOS Cloud) None (local SQLite)
Data lives MemOS Cloud Your servers MemOS Cloud Your machine

☁️ Use the Cloud API (Hosted)

You want to add memory to your app through a fully managed service — no infrastructure to run.

1. Get an API key:

2. Add and search memories:

import requests

API_KEY = "mpg-..."                  # keep this server-side
base = "https://memos.memtensor.cn/api/openmem/v1"
headers = {"Authorization": f"Token {API_KEY}", "Content-Type": "application/json"}

# 1. Add a memory
requests.post(f"{base}/add/message", headers=headers, json={
    "user_id": "alice",
    "conversation_id": "conv_001",
    "messages": [{"role": "user", "content": "I like strawberry"}],
})

# 2. Search memories
res = requests.post(f"{base}/search/memory", headers=headers, json={
    "query": "What do I like?",
    "user_id": "alice",
})
print(res.json())

Next steps:

🖥️ Self-Host the MemOS Service

You want to run MemOS as a REST service on your own machine or cluster.

Option A — Docker (recommended):

git clone https://github.com/MemTensor/MemOS.git
cd MemOS
cp docker/.env.example .env          # fill in your API keys in .env
cd docker
docker compose up                    # starts MemOS API + Neo4j + Qdrant

The API is served at http://localhost:8000.

Option B — Run with uvicorn (without Docker):

git clone https://github.com/MemTensor/MemOS.git
cd MemOS
cp docker/.env.example .env          # fill in your API keys in .env
# Ensure Neo4j and Qdrant are running, then:
cd src
uvicorn memos.api.server_api:app --host 0.0.0.0 --port 8000 --workers 1

See docker/.env.example-full for all configuration options (LLM provider, embedder, vector DB, graph DB, scheduler). The full deployment guide is at https://memos-docs.openmem.net/open_source/getting_started/rest_api_server/.

Try the API:

import requests, json

headers = {"Content-Type": "application/json"}
base = "http://localhost:8000/product"

# 1. Create a memory cube
requests.post(f"{base}/create_cube", headers=headers, data=json.dumps({
    "cube_name": "Alice's memory",
    "owner_id": "alice",
    "cube_id": "alice_cube",
}))

# 2. Add a memory
requests.post(f"{base}/add", headers=headers, data=json.dumps({
    "user_id": "alice",
    "writable_cube_ids": ["alice_cube"],
    "messages": [{"role": "user", "content": "I like strawberry"}],
    "async_mode": "sync",
}))

# 3. Search memories
res = requests.post(f"{base}/search", headers=headers, data=json.dumps({
    "query": "What do I like?",
    "user_id": "alice",
    "readable_cube_ids": ["alice_cube"],
}))
print(res.json())

🧠 MemOS Plugin: Persistent Memory for Your AI Agents ✨

MemOS gives OpenClaw, Hermes, and DeepSeek Harness a shared local memory core; the managed MemOS Cloud Plugin is available for OpenClaw and DeepSeek Harness 🏃🏻

🔌 Plugin 💡 Core Features 🧩 Resources
🧠 memos-local-plugin 2.0 🌐 Website · 📖 Docs · 🐙 GitHub · 📦 NPM
☁️ MemOS Cloud Plugin 🖥️ MemOS Dashboard · 📖 Full Tutorial

1. MemOS Cloud Plugin

Use MemOS Cloud for persistent memory in OpenClaw or DeepSeek Harness — no infrastructure to run.

Install:

openclaw plugins install @memtensor/memos-cloud-openclaw-plugin@latest
openclaw gateway restart

The plugin recalls memories from MemOS Cloud before each agent run and saves new messages back after the run ends.

DeepSeek Harness

Connect DeepSeek Harness to MemOS Cloud through its native plugin mechanism. Before the first model step of each user request, the plugin recalls relevant cloud memories; after a successful turn, it saves the new user and assistant messages back to MemOS Cloud.

  1. Create a MemOS API Key.

  2. Install the cloud plugin into the default DSH web profile:

    npx @deepseek-ai/dsh plugin --profile web add @memtensor/memos-cloud-dsh-plugin@latest
    
  3. Add the API Key to ~/.dsh/.credentials.yaml:

    MEMOS_API_KEY: mpg-your-key
    
  4. Add the minimal plugin configuration to ~/.dsh/settings.yaml:

    memos-cloud:
      apiKeyEnv: MEMOS_API_KEY
    
  5. Restart the DSH Web profile:

    npx @deepseek-ai/dsh web
    

The cloud plugin is fail-open: a temporary MemOS Cloud outage does not interrupt the current DSH task.

2. Local Plugin (OpenClaw, Hermes, and DeepSeek Harness)

You use DeepSeek Harness, Hermes Agent, or OpenClaw and want 100% on-device memory — nothing leaves your machine.

Install for DeepSeek Harness (macOS / Linux):

curl -fsSL https://raw.githubusercontent.com/MemTensor/MemOS/main/apps/memos-local-plugin/install.sh | bash -s -- --agent dsh --profile web

Install for OpenClaw or Hermes (macOS / Linux):

curl -fsSL https://raw.githubusercontent.com/MemTensor/MemOS/main/apps/memos-local-plugin/install.sh | bash

Install (Windows PowerShell):

irm https://raw.githubusercontent.com/MemTensor/MemOS/main/apps/memos-local-plugin/install.ps1 -OutFile "$env:TEMP\memos-install.ps1"; powershell -ExecutionPolicy Bypass -File "$env:TEMP\memos-install.ps1"

Requires Node.js and an already-installed DeepSeek Harness, OpenClaw, or Hermes. The installer deploys MemOS to the selected agent runtime; the DeepSeek Harness target installs it as an out-of-tree DSH bundle, while the OpenClaw and Hermes targets write the initial config.yaml in their respective agent homes.

Features: hybrid retrieval (FTS5 + vector), smart dedup, tiered skill evolution (L1 traces / L2 policies / L3 world model), multi-agent collaboration, local-first SQLite storage.

🤝 Community

QR Code

📚 Citation

If you use MemOS in your research, please cite:

@article{li2025memos_long,
  title={MemOS: A Memory OS for AI System},
  author={Li, Zhiyu and Song, Shichao and Xi, Chenyang and Wang, Hanyu and Tang, Chen and Niu, Simin and Chen, Ding and Yang, Jiawei and Li, Chunyu and Yu, Qingchen and Zhao, Jihao and Wang, Yezhaohui and Liu, Peng and Lin, Zehao and Wang, Pengyuan and Huo, Jiahao and Chen, Tianyi and Chen, Kai and Li, Kehang and Tao, Zhen and Ren, Junpeng and Lai, Huayi and Wu, Hao and Tang, Bo and Wang, Zhenren and Fan, Zhaoxin and Zhang, Ningyu and Zhang, Linfeng and Yan, Junchi and Yang, Mingchuan and Xu, Tong and Xu, Wei and Chen, Huajun and Wang, Haofeng and Yang, Hongkang and Zhang, Wentao and Xu, Zhi-Qin John and Chen, Siheng and Xiong, Feiyu},
  journal={arXiv preprint arXiv:2507.03724},
  year={2025},
  url={https://arxiv.org/abs/2507.03724}
}

@article{li2025memos_short,
  title={MemOS: An Operating System for Memory-Augmented Generation (MAG) in Large Language Models},
  author={Li, Zhiyu and Song, Shichao and Wang, Hanyu and Niu, Simin and Chen, Ding and Yang, Jiawei and Xi, Chenyang and Lai, Huayi and Zhao, Jihao and Wang, Yezhaohui and others},
  journal={arXiv preprint arXiv:2505.22101},
  year={2025},
  url={https://arxiv.org/abs/2505.22101}
}

⚖️ License

MemOS is licensed under the Apache 2.0 License.

MemOS (MemTensor/MemOS)

Searching Database…

11.9K ·GitHub
这是什么?MemOS 是面向大语言模型(LLM)和 AI 智能体的记忆操作系统,统一负责长期记忆的存储、检索和管理,让智能体能够基于上下文进行个性化交互,而不必每次会话都从零开始。
这是托管服务、自托管服务器,还是我智能体的插件?三者都是:全托管的 Cloud API、你用 Docker 运行的自托管 REST 服务,以及可安装到 OpenClaw、Hermes Agent 或 DeepSeek Harness 中的本地/云端插件。
我该怎么开始使用?使用 Cloud API 的话,请在 MemOS 控制台注册并获取 API 密钥(以 mpg- 开头);自托管请运行 docker compose up;要接入现有智能体,请用 npm install 安装本地或云端插件(例如 OpenClaw 可通过 'openclaw plugins install' 安装)。
如果我自托管,需要什么基础设施?自托管需要 Neo4j(图数据库)和 Qdrant(向量数据库);本地智能体插件则不需要这些,只需 Node.js 以及已安装的 DeepSeek Harness、OpenClaw 或 Hermes,所有数据改为存储在一个本地 SQLite 文件中。
我在使用插件时,如果 MemOS Cloud 宕机了会怎样?云端插件采用失败开放(fail open)设计,因此 MemOS Cloud 短暂中断不会阻塞或打断智能体当前正在执行的任务。
它能接入哪些智能体运行时?官方插件支持 OpenClaw、Hermes Agent 和 DeepSeek Harness,并提供适用于 macOS/Linux(shell)和 Windows(PowerShell)的本地插件安装程序。
自托管服务究竟运行在哪里?它以 REST API 服务器的形式运行,可通过 Docker(推荐)启动,也可以直接用 uvicorn 启动,部署在你自己的机器或集群上。
我的记忆数据会离开我的电脑吗?只有在你选择 Cloud API 或云端插件时才会。本地插件将 100% 的记忆保留在设备上,不依赖云端,并采用本地优先的 SQLite 存储。
MemOS 的记忆和普通的向量嵌入存储有什么不同?它的记忆是以可检查、可编辑的图结构组织的,而不是黑盒式的嵌入存储;并且支持多模态内容,如文本、图像、工具调用轨迹和人设,可以一起检索。
什么是分层技能演化(L1/L2/L3)?这是本地插件的工作方式:先把原始交互轨迹(L1)转化为习得策略(L2),最终沉淀为世界模型技能(L3)。这样智能体就能跨任务复用经验,而不只是存储原始日志。
MemOS 和其他记忆产品相比表现如何?在 OmniMemEval 基准测试中,它领先 14 款商业记忆产品,在 LoCoMo 上得分 88.83,在 LongMemEval 上得分 89.20;在五项智能体任务中,它还帮助 OpenClaw 将平均任务完成率从 36.63% 提升到 50.87%。
什么是 Memory Viewer?它是随本地插件附带的一个仪表盘,让你可以在自己的电脑上查看和浏览已存储的记忆、轨迹和技能。
What are similar projects?EverOS, brigade, OpenViking, Raven, Memori, m_flow, ruflo, mem0
Creator
MemTensor
Size
72.3 MB
Stars
11.9K
Age
1y
Commits · 90 Days