Cross-session memory for DeepSeek Harness: agents save, search and update user preferences, facts and project decisions; important entries are injected into later sessions, and a Settings section lists, edits, archives or deletes them.
Install
# from npm (prebuilt)
dsh plugin --profile web add @zzerx/dsh-plugin-memory
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:0x7A7A6572/dsh-forge-studio#path:/packages/plugin-memory
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
dsh 的记忆插件:跨会话记住你的偏好、身份与项目决策,对话越多它越懂你。记忆只存在本地。入口是设置面板里的一级「记忆」分区。

安装
dsh plugin --profile <你的 profile 名> add @zzerx/dsh-plugin-memory
能做什么
| 能力 | 说明 |
|---|---|
| 自动形成记忆 | 开关打开后,每轮对话结束时用模型提炼值得长期记住的内容(偏好、身份、项目决策、经验),自动入库;用的模型可在面板里指定(缺省跟随会话自己的模型)。 |
| 后台模型可选 | 面板「高级 · 后台模型与自动提炼」里从 dsh 已配置的模型里挑一个,专跑记忆的两条后台流程(对话提炼、写入判定)—— 例如用便宜快的小模型提炼、用强模型判定。留空 = 跟随会话默认。 |
| 全局 / 项目双作用域 | 普适的东西(语气、格式、身份、职业)进全局;只对某个工作区成立的进项目(以工作区目录为键)。 |
| 开场自动注入 | 新会话开局把「全局 + 当前工作区」的高重要性记忆注入,不必每次重新提醒。 |
| 管理记忆 | 查看、编辑、置顶、归档、删除、移动作用域;每条可开详情(分类 / 重要性 / 来源 / 时间 / 标签 / 来源会话)。 |
| 导入其他 AI 的记忆 | 内置一段提示词,复制到别的 AI 里整理出个人画像,把结果粘回来即可按分类拆条入库。 |
| 原文留档 | 原始文本先落盘再抽条目:模型抽不出来、调用失败都不丢原文,之后可以对同一份原文重抽。 |
| 整理(进化) | 同作用域 + 同分类 + 同标题的重复条目合并,保留信息最完整的一条。 |
| 实体与关联 | 写记忆时声明实体(项目 / 工具 / 人 / 概念),共享同一实体的记忆自动连成「相关」;关系本身有信息量时可显式连边。 |
| 记忆图谱 | 一张可拖动、可缩放的关系图:节点是记忆与实体,连线是它们之间真实存在的关系。可在全局 / 项目之间切换、悬停看细节、点节点开详情。 |
| 别名 | 同一条记忆的别的说法写进 aliases,之后用别名当标题写入会自动并进那一条,不长出重复条目。 |
| 不丢也不重 | 写入时先看附近有没有同一条:像到一定程度直接并入,疑似重复会给你提醒,必要时让模型判一次「新增 / 并入 / 跳过」;判定失败一律退化成新建。 |
| 9 个模型工具 | 让 agent 自己存取记忆与连线(见下)。 |
agent 工具
| 工具 | 用途 |
|---|---|
memory_save / memory_search / memory_list |
保存(可带 summary / aliases / entities)、搜索、列举 |
memory_update / memory_archive / memory_delete / memory_move |
修改、归档(可恢复)、删除、改作用域 |
memory_entity |
落实体(项目 / 工具 / 人 / 组织 / 概念)、按关键字列出、删实体(连同它的边) |
memory_link |
连一条有语义的边、断边、看某条记忆的全部关联 |
作用域由模型判定,判错了可以在面板里改,也可以让模型用 memory_move 改。
设置与数据
- 开关在 dsh 设置 → 记忆 里,改完即时生效。
- 「后台模型」列的是 dsh 当前已配置且可路由的模型(按 provider 分组);配的模型之后被删掉也不会锁死设置页 —— 调用失败照旧 fail-safe(提炼记一条失败审计、判定退化成新建)。
- 记忆条目、原文留档、后台调用记录、实体与边都只存在本地;归档是软隐藏(不进注入与列表,可恢复),删除才是真删。
- 面板「沉淀」里可以看原文留档与每次后台模型调用(用途 / 模型 / 耗时 / 抽出的条目数 / 失败原因)。
已知边界
- 不替代会话日志:只存「值得跨会话记住」的精炼知识。
- 不做向量检索:检索仍是子串匹配(标题 / 正文 / 摘要 / 别名 / 标签),语义去重靠相似度阈值加一次模型判定,不是向量召回。
- 自动提炼是一次额外模型调用:拿不到模型路由、流失败、JSON 非法都只降级为「这次没记」,绝不影响对话;面板指定的后台模型不可用时同样如此。
- 项目维度的键是工作区目录路径:改目录名等于换项目。
- 图谱要能画 canvas:运行环境拿不到 2D 画布时,图谱弹窗只给一句说明,其余功能不受影响。
- 与其他记忆插件互斥:撞名(例如
dsh-mneme)时本插件硬锁:不注册工具、不注入、不自动提炼,并在面板顶部提示;停用另一个并重启即自动解锁。
开发
pnpm --filter @zzerx/dsh-plugin-memory build # lib/index.js + lib/client.js + lib/types
pnpm --filter @zzerx/dsh-plugin-memory typecheck
License
MIT
Links
More in this category
vectorize-io/hindsight#coding-agents★ 57722
Hindsight, agent memory that learns: long-term project memory with auto recall and retain, knowledge pages, deep reflection, and per-repo memory banks.
volcengine/OpenViking#examples/dsh-memory-plugin★ 41317
OpenViking memory and context bundle for DeepSeek Harness: pre-step auto-recall and profile injection, session capture, `viking://` URI guarding, and recall/write memory tools backed by an OpenViking server.
MemTensor/MemOS#memos-local-plugin★ 12224
Local-first memory plugin for DeepSeek Harness: layered L1/L2/L3 memory with automatic capture, manual memos_* retrieval tools, and a built-in memory viewer.
agentscope-ai/ReMe#dsh★ 3735
Connects DeepSeek Harness to ReMe's local-first, self-evolving personal knowledge base: automatically captures completed main-agent conversations as user-owned Markdown memory, searches conversations and source material through reme_search with BM25, optional embeddings, and wikilink expansion, and schedules daily memory consolidation.
zilliztech/memsearch#MemSearch★ 2815
Shared Markdown memory for DSH and other coding agents, with automatic capture, pre-step context injection, searchable recall, and memory-to-skill self-evolution through a review panel.
vshulcz/deja-vu#extensions/dsh★ 1352
Reads the session files forty-two other coding agents on this machine already wrote (Claude Code, Codex, Cursor, VS Code Copilot Chat, opencode, OpenClaw, Hermes, Kimi, Cline, Zed and more), including sessions from before it was installed: six tools (deja_recall, deja_session, deja_blame, deja_fix, deja_how, deja_remember), a /deja command, and optional automatic recall added to the runtime context. Local BM25 index, no LLM, no embeddings, no network (dsh plugin --profile web add dsh-deja).
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.