MemOS

MemTensorApache-2.0活跃维护

给 LLM 和 AI Agent 用的自进化记忆操作系统,提供超持久记忆、混合检索和跨任务技能复用,还能省下约 35% 的 token。

Self-evolving memory OS for LLM & AI Agents: ultra-persistent memory, hybrid-retrieval, and cross-task skill reuse, with 35.24% token savings and DeepSeek Harness support.

v2.0.36发布于 2026-11-09 12:35 UTC12,341star +26 / 7 天1,116fork同步于 2026-11-10 05:28 UTC

怎么上手

由 README 提炼,执行前请确认
git clone https://github.com/MemTensor/MemOS.git
cd MemOS
cp docker/.env.example .env
cd docker
docker compose up
硬件要求按 README 说明

README 未说明显存或 GPU 要求;自托管需自行准备 Neo4j 与 Qdrant,本地插件使用本地 SQLite,无需额外基础设施。

有 Docker 镜像
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

给 LLM 和 AI Agent 加持久记忆的记忆操作系统,统一存取管理长期记忆

给 LLM 和 AI Agent 用的自进化记忆操作系统,提供超持久记忆、混合检索和跨任务技能复用,还能省下约 35% 的 token。

核心能力

  • 用统一 Memory API 增删改查图结构记忆
  • 原生支持文本、图像、工具轨迹与人格记忆
  • 以可组合记忆立方管理多知识库隔离共享
  • MemScheduler 异步写入降低高并发延迟
  • 用自然语言反馈修正和替换已有记忆

容易踩的坑

自托管前必须在 .env 中填好 LLM 与嵌入等 API Key;不用 Docker 时需先自行启动 Neo4j 和 Qdrant;本地插件需按具体 Agent 分别做额外配置。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v2.0.36
  1. v2.0.36Release v2.0.36最新正式版2026-11-09 · 2026-11-09 12:35 UTC

    What's Changed

    New Contributors

    Full Changelog: https://github.com/MemTensor/MemOS/compare/v2.0.33...v2.0.36

  2. memos-local-plugin-v2.0.21-beta.1MemOS Local Plugin v2.0.21-beta.1pre-release2026-11-04 · 2026-11-04 06:42 UTC
    查看更新说明

    Changelog

    Prerelease

    • Published MemOS Local Plugin v2.0.21-beta.1 as a package prerelease for validation through the npm beta dist-tag.

    Release Evidence

    • Package tag: memos-local-plugin-v2.0.21-beta.1
    • Previous package tag: memos-local-plugin-v2.0.20
    • Source commit: d326a6419467
    • Local plugin commits: 10
    • Local plugin changed files: 59
    • Package version: 2.0.20 -> 2.0.21-beta.1

    This prerelease creates an independent local-plugin GitHub Prerelease for traceability. Its release.published event is intentionally ignored by Doc Agent, so it does not update the MemOS-Docs Plugin tab or trigger pre/gray deployment.

  3. memos-local-plugin-v2.0.21MemOS Local Plugin v2.0.212026-10-29 · 2026-10-29 09:15 UTC
    查看更新说明

    Changelog

    Added

    • Local model settings: The Viewer settings page now exposes mirror URL, model path, cache directory, offline mode, and load timeout for local embeddings.

    Improved

    • Runtime compatibility: The plugin now uses SQLite 13.0.3 Node-API prebuilds and requires Node 22 or newer in the actual host process.

    Fixed

    • Memory Recovery and Capture Boundaries: Fixed dirty-data recovery, orphan trace writes, and LLM empty-response retry stability issues.
  4. v2.0.342026-09-23 · 2026-09-23 05:24 UTC
    查看更新说明

    MemoryOS 2.0.34 release.

  5. memos-local-plugin-v2.0.20MemOS Local Plugin v2.0.202026-09-21 · 2026-09-21 13:30 UTC
    查看更新说明

    Changelog

    Fixed

    • Memory Recovery and Capture Boundaries: Fixed dirty-data recovery, orphan trace writes, and LLM empty-response retry stability issues.
    • Memory Evolution and Hermes Installation Improvement: Improved the reliability of memory evolution and Hermes installation, enhancing overall performance.

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    [!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

    • 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-08-17 · 🐋 MemOS Connects with DeepSeek Harness MemOS now brings persistent memory to DeepSeek Harness through both local and cloud plugins. DSH can automatically recall relevant context before a task and retain new experience after a successful turn, without modifying its core.

    • 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 88.83 on LoCoMo and 89.20 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.

    📊 Performance

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

    BenchmarkScore
    LoCoMo88.83
    LongMemEval89.20
    PersonaMem v240.58
    HaluMem80.91
    BEAM-10M56.75
    GDPVal62.07
    LiveCodeBench64.96
    OmniMath61.00
    SWE-Bench38.46
    BrowseComp-Plus23.85

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

    🎯 What MemOS Is For

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

    • AI assistants with consistent, context-rich conversations
    • Customer support that recalls past tickets and user history
    • Personalized agents that adapt to individual preferences
    • Multi-agent collaboration with shared or isolated memory

    🚀 Quick Start

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

    Cloud APISelf-HostMemOS Cloud PluginLocal Plugin
    Best forYour app, fully managedTeams on own infraOpenClaw users, zero opsDeepSeek Harness, Hermes, or OpenClaw; on-device
    SetupGet an API keydocker compose upopenclaw plugins installnpm install + agent-specific setup
    Infra neededNone (hosted)Neo4j + QdrantNone (uses MemOS Cloud)None (local SQLite)
    Data livesMemOS CloudYour serversMemOS CloudYour 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:

    • Sign up on the MemOS dashboard.
    • Go to API Keys and copy your key (starts with mpg-). Keep it server-side.

    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

    📚 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.