dsh-memory
by u-illll
DeepSeek Harness(dsh)的记忆检索插件:wiki 式双链记忆图,九个工具——混合搜索、读、列、链扫描、记住、遗忘、知识编译等
Memory retrieval plugin for DeepSeek Harness ( dsh ): a wiki double-link memory graph with 9 tools — hybrid search, read, list, link-scan, remember, forget, knowledge compile,…
安装
dsh plugin --profile web add github:u-illll/dsh-memoryGitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试
安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗
安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。
README
目录
Memory retrieval plugin for DeepSeek Harness (dsh): a wiki double-link memory graph with 9 tools — hybrid search, read, list, link-scan, remember, forget, knowledge compile, graph health-check, and a resident retriever subagent.
记忆系统插件:为 dsh 提供「wiki 双链记忆图谱」——混合检索(向量+全文)、读写删、知识编译、图谱健康检查、驻留检索员子代理。
Features
| Tool | What it does |
|---|---|
memory_list |
List the memory index (project + global slugs) |
memory_search |
Hybrid retrieval: semantic vector (memory_vector.py hybrid) + fulltext grep (auto-falls back to JS-native scan when grep is missing) |
memory_read |
Read a memory page by slug |
memory_link_scan |
Double-link traversal: in-edges (pages referencing the slug) + out-edges |
memory_remember |
Write a new memory into the dsh write zone (never touches your read source) |
memory_forget |
Delete from the write zone only (reference scan first) |
memory_retrieve |
Spawn a resident retriever subagent (continuable spawn + toolFilter allow-list + three-stage report); follow up with send_message, survives dsh restarts |
memory_compile |
Knowledge compiler: suggest-links / compile (five-section wiki page or update diff preview) / validate / slug-list — candidates only, you confirm before committing |
memory_health |
Graph health-check: graph-stats (density ≥1.5, orphans <20%) / reachability (multi-hop) / deadlink — pure JS, no python/grep needed |
Plus a system-prompt section with memory-collaboration rules (remember-three-steps, chain-reading, compile-then-review).
Installation
1. Add the plugin to an agent preset
In your preset agent.cordis.yml, register the plugin by absolute path (or package name after publishing):
- id: dsh-memory
name: /path/to/dsh-memory-plugin/lib/index.js
# optional overrides (defaults shown below are the built-ins):
config:
readHome: ~/.reasonix-local
writeDir: ~/.dsh/memory/
scriptsDir: "" # empty = bundled lib/scripts
extraReadDirs: []
retrieverProvider: spawn
2. Layout conventions
The plugin reads a .reasonix-local-style memory home:
<readHome>/
├── projects/
│ └── <any-project>/ # auto-discovered, no hard-coded names
│ └── memory/*.md # project memories (wiki pages)
└── memory/
└── global/*.md # global memories
readHomedefault is~/.reasonix-local; all paths support~expansion and${VAR}environment references.- If you don't have a Reasonix memory layout, an empty home just reports "empty/unreadable" — you can start writing with
memory_rememberimmediately.
3. Support matrix
| Platform | No python | python3/python/py | + vector index (bge cached) |
|---|---|---|---|
| Linux | ✅ fulltext (JS-native scan) | ✅ TF-IDF + bigram hybrid | ✅ semantic hybrid (bge-small-zh) |
| macOS | ✅ fulltext (grep or JS fallback) | ✅ | ✅ |
| Windows (no grep) | ✅ JS-native scan | ✅ | ✅ |
- No python:
memory_searchskips the vector leg and labels results(向量不可用,仅全文)— functionality stays usable (TF-IDF vectors are optional). - No grep (native Windows): fulltext search, in-edge scan and forget reference scan all fall back to a JS-native substring scan (equivalent to
grep -rnFsemantics). - bge model / pylibs: optional.
memory_vector.pyis zero-dependency (Python stdlib) with a pluggableembed_text(); the semantic model path is only used when the cache is built by your pipeline.
4. Runtime prerequisites
| Feature | Prerequisite |
|---|---|
memory_retrieve (retriever subagent) |
dsh-subagent plugin family + a subagent provider supporting prepareContinuable (spawn in the default preset does) + session persistence — all present in the standard web deployment of dsh. Headless profiles without agent-presets/subagents degrade gracefully (the tool returns guidance instead of throwing). |
memory_search vector leg |
any of python3 / python / py on PATH |
| codegraph integration | optional; the preset snippet below masks codegraph_memory_* with --graph-only |
Configuration
config:
readHome: ~/.reasonix-local # read source (read-only for dsh)
writeDir: ~/.dsh/memory/ # dsh write zone (memory_remember/forget)
scriptsDir: "" # override memory-map scripts dir; empty = bundled
extraReadDirs: [] # extra memory dirs appended after auto-discovery
retrieverProvider: spawn # subagent provider for memory_retrieve
Trust boundaries:
- Read tools work directly on
readHome; the plugin never writes there. memory_remember/memory_forgetonly touchwriteDir.memory_compileonly produces candidates; you commit them viamemory_remember.
Full preset example
# agent.cordis.yml (standard preset + dsh-memory + codegraph)
- id: dsh-memory
name: /path/to/dsh-memory-plugin/lib/index.js
config:
readHome: ~/.reasonix-local
- id: mcp-codegraph
name: '@deepseek-ai/dsh-mcp-client'
config:
serverName: codegraph
transport: stdio
args: ["--graph-only"] # masks codegraph's own memory-* tools
Memory page format
Five-section wiki page (what memory_compile generates and validate checks):
# Title
## 结论(一句话)
## 关键事实
## 路径与方法论
## 关联(双链)
## 元数据(类型/来源/更新/空检索记录)
Double links are [[slug]] references between pages; memory_health measures graph density (target ≥1.5 edges/page, orphans <20%) and multi-hop reachability.
Ecosystem
This is a dsh-plugin for the DeepSeek Harness plugin ecosystem — add the dsh-plugin topic to the repository to be discovered by community directories (e.g. the community catalogs, awesome-deepseek-harness).
License
MIT
原始 README: https://github.com/U-Illll/dsh-memory/blob/main/README.md ↗
同类插件
查看全部 →
mnemon
LLM监督持久内存插件 — 基于图的召回,跨会话知识,单二进制。与DeepSeek Harness、Claude Code、OpenClaw及任何代理运行时兼容。

memtrace-public
面向 AI 编码 agent 的结构化记忆:双时态图谱、MCP 原生、零 LLM 调用;支持 Cursor · Claude Code · Codex · DeepSeek Harness · Hermes · VS Code · Windsurf

dsh-flowix-memory
将本地 flowix-cli 注册为 MCP 服务,让 agent 可以搜索、读取、创建和编辑 Flowix 备忘与思维导图产物。

flowix
笔记助你,记忆助你的代理。

engramory
AI代理的便携式内存协议 — 以静态规则加载;整理学科 + 参考规范 + 可选的钩子API

dsh-memory-evolve
为 DeepSeek Harness 提供纯插件实现的跨会话长期记忆与后台自我进化能力:五轨记忆、Git 分支感知、回合内自我审查、技能自我进化与技能管理器、四轨待办、COI 调度、会话广播、会话搜索、提示词管理器和临时信息便签;零核心修改、零运行时依赖,安装即用,卸载即净。