Claude Code-style auto-memory plugin for DeepSeek Harness (dsh): typed memory files + MEMORY.md index auto-injected into the system prompt. File-only, no external services.
在 DeepSeek Harness 终端运行:
dsh plugin --profile web add asktheway/dsh-auto-memoryYour dsh agent forgets everything you tell it. Every. Single. Session.
Fix it with one command. Claude Code-style persistent memory for
DeepSeek Harness — native,
zero servers, zero embeddings, zero setup.
dsh plugin --profile demo add dsh-auto-memory
Say "Remember: I'm a Python backend engineer preparing for interviews" today —
open a brand-new session tomorrow, ask "what do you know about me?", and it
remembers.
autoSummarize: true): when a root session ends, amemory_read counts references; staleAfterDaysmemory_prune lists (dry-run) or deletes aged memories.memory_read resolves [[name]] cross-links onememory_delete_all — guarded by tools/pre-execute human approval:cleartouchTools: memory_write / memory_read / memory_list / memory_delete /memory_prune / memory_delete_all.
DeepSeek Harness is the hottest open agent harness on GitHub right now —
models, tools, sandboxes, everything is a plugin. But it ships with no memory
subsystem at all. The official answer is three default-off MCP configs to
third-party servers, which the official docs themselves qualify: not
auto-injected, no forgetting policy, substring-only search. Your agent has
amnesia by design.
dsh-auto-memory closes that gap natively:
| MCP bridge approach | dsh-auto-memory | |
|---|---|---|
| Memories injected into every system prompt, automatically | ✗ | ✓ (zero tokens when empty) |
| Typed memories: user / feedback / project / reference | ✗ | ✓ |
| Workspace + user scope layers — no cross-project leakage | ✗ | ✓ |
| Crash & concurrency safety (cross-process locks, orphan recovery) | — | ✓ |
| External services / databases / embeddings required | ✓✓✓ | none — just plain Markdown files |
Memories are ordinary files under $DSH_HOME/memory/ — hand-editable,
grep-able, git-friendly, yours.
node scripts/demo.mjs # no API key, no browser: watch write → index → inject → recall → forget
Or for real, in a chat: tell your agent things worth remembering. The model
calls memory_write / memory_read / memory_list / memory_delete,
following Claude Code's write discipline: dedupe-and-update over piling up,
absolute dates only, [[name]] cross-links, feedback memories carry
Why: / How to apply: lines.
Every request, one system-prompt section (order 4000) carries the index —
re-evaluated per step, byte-budgeted, and gone entirely when the store is
empty:
# Persistent memory index
## Project memories
- [压测过 PostgreSQL](id-generator-benchmark.md) — psycopg2 连接池有踩坑经验 (2026-09)
- [用户是 Python 后端工程师](user-prefers-python.md) — 正在准备面试; 偏好中文交流
Chinese titles, YAML frontmatter, one file per memory — exactly the Claude
Code MEMORY.md model, rebuilt natively on dsh's prompt-assembly pipeline.
This plugin survived a 12-agent adversarial code review (680k tokens of
source-level scrutiny) before v0.1.0. Five production-grade traps were caught
and fixed — with regression tests — including two that would have been
field incidents:
memory collides withMEMORY.md on case-insensitive filesystems — the write succeeds while{{{ }}} braces in any memoryPlus: orphaned-lock self-healing (Ctrl+C can't brick your memory store),
symlink-read protection, malformed-file tolerance, stable index ordering to
protect KV-prefix caches, and a strict no-custom-session-events policy (they
make dsh sessions refuse to resume).
40 tests. 0 runtime deps beyond yaml. 15 kB installed.
dsh plugin --profile demo add dsh-auto-memory # from npm (prebuilt)
dsh --profile demo # restart the profile
From source: npm install && npm run build && dsh plugin --profile demo add /abs/path.
Requires @deepseek-ai/dsh >= 0.1.5-rc.2 (Node ^22.19 || >=24).
Override in your profile's cordis.patch.yml (config replaces wholesale):
- id: auto-memory
config:
maxBytes: 4096 # injection budget
memoryDir: D:/memories # default: $DSH_HOME/memory
enableUserScope: true # false: user layer off on every path
execute → name normalized to [a-z0-9-] (reserved namesdsh-atomic-write) → atomic{{.tool/call / tool/result.Deep dives: design decisions ·
dsh source-level research ·
postmortem: shipping a PR to awesome-dsh-plugin
MIT
登录后即可为该插件评分和评价。
还没有人评价这个插件,来抢个沙发吧!