Provides local four-layer long-term memory for DeepSeek Harness (L1 trajectory / L2 strategy / L3 world model / skills), with automatic retrieval each user turn and support for registering six memory tools.
- Language
- TypeScript
- License
- Apache-2.0
- Branch
- main
Install
$ dsh plugin --profile web add @memtensor/memos-local-pluginRun the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial
Install via your agent
Install the DeepSeek Harness plugin MemTensor/MemOS/apps/memos-local-plugin for me: review the repository at https://github.com/MemTensor/MemOS first, then run the install command and verify the plugin loads successfully.
Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.
One-Line Pitch
MemOS injects local-first long-term memory capabilities into DeepSeek Harness: it deposits each conversation round, tool results, and user feedback into a retrievable four-layer memory via SQLite, and automatically backfills relevant history into the context at each user turn, giving DSH cross-session continuity.
Core Capabilities
- Executes a bounded automatic retrieval once at the start of each accepted non-empty user turn, injecting relevant history into the model prompt in
<memos_context>format - Asynchronously captures conversation rounds, tool calls, and code execution results, writing to local SQLite database
- Registers six memory tools for model invocation (
memos_search/memos_get/memos_timeline/memos_environment/memos_skill_list/memos_skill_get), enabling the model to proactively query or load more detailed history - Provides a local HTTP/SSE-based Viewer panel (default
127.0.0.1:18801) for visual browsing and editing of memory data - Automatically reuses the host DSH's configured models and credentials as auxiliary LLMs (e.g., for summarization, reflection), eliminating the need for duplicate API Key configuration
- Through the four-layer structure of L1 Trajectory / L2 Strategy / L3 World Model / Skills, extracts reusable subtask strategies from history and solidifies them into callable skills
Technical Implementation
- Language: TypeScript (ESM modules)
- Key Dependencies:
@deepseek-ai/cordis(Cordis injection container),better-sqlite3(local storage),@huggingface/transformers(local vector embeddings),@preact/signals+ Vite Viewer (panel UI) - Architecture Pattern: Injected into host process as a Cordis bundle; does not start a separate daemon or use JSON-RPC sidecar; chains automatic retrieval and background capture through host event hooks such as
agent/pre-step/session/event/session/disposed, and registers memory tools through DSH'stoolsservice - Entry File:
apps/memos-local-plugin/adapters/deepseek-harness/index.ts(apply hook), injected into the Cordis bundle stack viacordis.patch.yml
Use Cases
Used when users want DeepSeek Harness conversations to maintain contextual continuity across multiple sessions, or want to deposit project knowledge and tool call results into reusable private memory. It is particularly suitable for long-cycle project collaboration, personal knowledge base accumulation, and workflows requiring the model to remember user preferences and historical decisions.
Prerequisites & Compatibility
| Dependency | Minimum Version | Description |
|---|---|---|
| DeepSeek Harness | >=0.1.0-rc.5 <0.2.0 | Host platform; DSH is still in developer preview, cross-preview version changes may require adapter adjustments |
| Node.js | ^22.19.0 | |
| pnpm | 11.7.0 | Used for native dependency build script approval; one-click installer temporarily downloads if missing, then cleans up |
| Platform | macOS / Linux | One-click install script only supports macOS+Linux; Windows users can use DSH native dsh plugin flow |
| Native Modules | better-sqlite3, onnxruntime-node, esbuild, sharp | All require explicit allowBuilds in pnpm-workspace.yaml for pnpm 11 |
Installation
dsh plugin --profile web add github:MemTensor/MemOS/apps/memos-local-plugin
After installation, restart the current DSH profile (Ctrl+C/SIGINT or SIGTERM then start again) for the new bundle to take effect.
Configuration Options
The plugin receives configuration via Cordis's memos-local-memory line; you can directly modify $DSH_HOME/profiles/<profile>/cordis.patch.yml to override defaults. Note: DSH's patch layer replaces the entire config, so you need to preserve all fields when overriding.
| Config | Type | Description | Default |
|---|---|---|---|
enabled | boolean | Whether to mount this adapter; when disabled, the plugin has no effect | true |
profileId | string | Namespace fallback identifier; sessions with agentPreset use the session value | default |
home | string | Runtime root directory; defaults to $DSH_HOME/memos-plugin/ (typically ~/.dsh/memos-plugin/) | "" |
recallEnabled | boolean | Whether to execute automatic retrieval for each accepted non-empty user turn; duplicate entries in same round are deduplicated | true |
captureEnabled | boolean | Whether to asynchronously write to database after rounds and tools complete | true |
toolsEnabled | boolean | Whether to register six memos_* tools for model invocation; when disabled, only automatic retrieval is available | true |
hostLlmEnabled | boolean | Whether to reuse DSH's configured models and credentials when MemOS has no explicit LLM configured | true |
viewerEnabled | boolean | Whether to enable local HTTP/SSE Viewer; when disabled, only headless memory runtime is available | true |
viewerPort | number | Viewer listening port (1–65535); different ports required for multiple profiles coexisting | 18801 |
recallTimeoutMs | number | Request timeout shared by automatic retrieval and memos_search (milliseconds, minimum 100); actual effective cap is 3000ms | 3000 |
contextMaxChars | number | Maximum characters for <memos_context> content injected into the model (minimum 256) | 6000 |
toolResultMaxChars | number | Maximum characters for memory tool result body returned to the model (minimum 128) | 1200 |
failOnStartupError | boolean | Whether to interrupt DSH profile startup on failure; defaults to logging warning and continuing | false |
FAQ
Q: Does uninstalling the plugin also delete memory data?
A: No. dsh plugin remove only removes dependencies and the bundle layer. The data/, skills/, and config.yaml in the runtime directory ($DSH_HOME/memos-plugin/) are preserved for reuse upon reinstallation; only manually deleting the directory will clear the memory.
Q: Do I need to configure a separate API Key after installation?
A: By default, MemOS reuses the host DSH's configured model credentials, no need to fill them in again in MemOS; only when llm.provider is explicitly set to a non-empty value in config.yaml will that provider's own credentials be used.
Q: What do I need to do after upgrading the plugin version or adjusting config.yaml?
A: You need to restart the current DSH profile for changes to take effect; DSH does not automatically discover newly installed packages during runtime, and imported modules are also cached within the process lifecycle. Saving Settings in Viewer to config.yaml will also prompt for manual restart of the host.
Q: Does automatic retrieval trigger every time? Are greetings skipped?
A: No skipping. All accepted non-empty user turns (including hello and other greetings, as well as resumed sessions and forks) trigger one automatic retrieval; duplicate entries in the same round are deduplicated, and messages generated by the plugin or tools do not trigger retrieval.
Q: Can the Viewer panel be accessed remotely?
A: No. Viewer only binds to loopback addresses 127.0.0.1 or localhost; setting viewer.bindHost to a non-loopback address in the config file will be rejected; do not put the loopback port behind a reverse proxy or tunnel. Viewer has no built-in identity authentication; enabling password protection requires writing .auth.json.
Q: Will multiple DSH profiles enabling Viewer simultaneously cause conflicts?
A: Yes. Multiple profiles cannot share the same Viewer port; you need to assign different viewerPort or enable Viewer in only one profile; different profiles sharing the same runtime directory share underlying memory, and browser cookies are shared across different ports on the same host, so be aware that login states can overwrite each other.
Getting Started Difficulty
Beginner — only need a single dsh plugin install command to get automatic retrieval capability, no manual API Key or database configuration required; advanced users can adjust Cordis configuration options or LLM, embedder, viewer settings in config.yaml as needed.
Known Issues & Limitations
- DSH is still in developer preview: Adapter validated against DSH 0.1.0-rc.5/rc.6; breaking changes across preview versions may break the plugin
- Capture gaps between background queue and restart window: Automatic retrieval never waits for the previous round's capture, relationship classification, or intent classification; during normal SIGINT/SIGTERM Cordis attempts bounded drain, but SIGKILL, crashes, or budget exhaustion may leave one round unpersisted
- Viewer is local-only: Defaults to listening on
127.0.0.1:18801, no remote access support; multiple profiles cannot share the same port, browser cookies shared across ports on the same host will overwrite each other's login state - JSON output is prompt engineering, not enforced schema: DSH currently has no provider-neutral enforced JSON/Schema output; MemOS provides JSON contracts in prompts and parses locally, timeout/truncation/format errors trigger fallback
- Routing boundary in pre-request phase: Each round's automatic retrieval runs before DSH closes that round's
agent/request, so it can only read the last persisted request route; if none exists, the agent's public default is used - Background recovery has no attributed route: In full mode with L2/L3/Skill crystallization enabled, startup stale recovery and 10-minute dirty-episode rescore do not belong to any DSH request; these two background tasks are disabled when MemOS provider is
host - Build scripts require approval: When installing versions like
2.0.16-beta.1for the first time, pnpm 11 intercepts native module build scripts, requiring explicit allowance ofbetter-sqlite3,esbuild,onnxruntime-node,sharpinpnpm-workspace.yaml;protobufjsand MemOS's own postinstall hint script should not be allowed - Do not downgrade Transformers.js: The 3.x / ONNX Runtime 1.21 combination before 4.x has a destructor crash on macOS when DSH calls
process.exit(); profiles using local embeddings cannot downgrade this combination
[!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.
👾 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.
| 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:
- 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 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:
- 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:
- MemOS Cloud Getting Started — connect to MemOS Cloud and enable memory in minutes.
- MemOS Cloud Platform — explore the Cloud dashboard, features, and workflows.
🖥️ 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](./docker/.env.example) 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.
- Repo: MemTensor/MemOS ·
apps/MemOS-Cloud-OpenClaw-Plugin - NPM:
[@memtensor/memos-cloud-openclaw-plugin](https://www.npmjs.com/package/@memtensor/memos-cloud-openclaw-plugin) - Dashboard: https://memos-dashboard.openmem.net/
- Tutorial: https://memos-docs.openmem.net/openclaw/guide
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.
-
Install the cloud plugin into the default DSH
webprofile:npx @deepseek-ai/dsh plugin --profile web add @memtensor/memos-cloud-dsh-plugin@latest -
Add the API Key to
~/.dsh/.credentials.yaml:MEMOS_API_KEY: mpg-your-key -
Add the minimal plugin configuration to
~/.dsh/settings.yaml:memos-cloud: apiKeyEnv: MEMOS_API_KEY -
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.
- Repo: MemTensor/MemOS ·
apps/memos-local-plugin - NPM:
[@memtensor/memos-local-plugin](https://www.npmjs.com/package/@memtensor/memos-local-plugin) - Docs: https://memos-docs.openmem.net/cn/openclaw/local_plugin
- DeepSeek Harness: integration details
- Viewer dashboard: see
apps/memos-local-plugin/viewer/
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
- GitHub Issues: https://github.com/MemTensor/MemOS/issues
- GitHub Discussions: https://github.com/MemTensor/MemOS/discussions
- Discord: https://discord.gg/Txbx3gebZR
- WeChat: scan the QR code to join the group.
📚 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.
Read the usage guide →
Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.
Listing badge
[](https://deepseek-plugin.org/plugins/MemTensor/MemOS/apps/memos-local-plugin)Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.