flymysql/dsh-memory
跨会话记忆库:remember / recall / forget 工具、每轮提示注入与设置页条目浏览。
已收录
1
Memory
Bundle 已验证
预览
功能介绍
跨会话记忆库:remember / recall / forget 工具、每轮提示注入与设置页条目浏览。
适合
- 希望事实、偏好、决策和项目笔记跨 DSH 会话保留的用户。
- 能从每轮自动注入近期记忆条目中受益的代理工作流。
- 希望通过模型工具明确记录、检索和删除记忆的用户。
- 希望在 DSH 设置中浏览、新增和删除已存条目的用户。
不适合
- 不应跨会话保留信息的无状态或隐私敏感工作流。
- 每轮自动注入近期条目会带来无关上下文的工作流。
- 需要语义向量检索、而不是所述标签或内容匹配及时间排序的用户。
- 无法使用 DSH 存储域和同源 Web 接口的环境。
README
dsh-memory-vault
Cross-session memory vault for DeepSeek Harness (DSH).
Every DSH session starts from zero. dsh-memory gives your agents a persistent second brain: facts, preferences, decisions, and project notes survive across sessions and are recalled automatically.
-
3 model tools —
memory_remember/memory_recall/memory_forget - Per-turn prompt injection — the most recent entries are injected into every system-prompt assembly, so the agent starts each turn already aware of stored context
-
Durable storage — records live in a storage domain (
dsh_memoryunit, json backend by default; unit names are snake_case perUNIT_NAME_RE) - Browser management page — a “记忆库 / Memory” page in Settings to browse, add, and delete entries
Install
dsh plugin --profile web add dsh-memory-vault
The dsh.bundle manifest wires the dsh-memory row into the profile automatically. To install by hand instead:
npm install dsh-memory-vault
then add a row to your profile cordis.yml (or cordis.patch.yml):
- id: dsh-memory
name: dsh-memory-vault
Usage
Tell your agent to remember things, or do it yourself:
“记住:这个项目的部署目标是 Windows,测试命令是
pnpm test。”
The agent calls memory_remember with optional tags:
memory_remember(content="User prefers Windows deployment; test command is `pnpm test`", tags=["project:demo", "user"])
When context from an earlier session matters, the agent calls memory_recall(query="Windows deploy") — entries are scored by tag matches (×2) and content matches, newest first. Wrong or obsolete facts are removed with memory_forget(id="m-...") or memory_forget(tag="project:demo").
Configuration
| Key | Type | Default | Meaning |
|---|---|---|---|
injectLimit |
int | 8 | Max entries injected per system-prompt assembly |
recallLimit |
int | 10 | Max entries returned by memory_recall
|
- id: dsh-memory
name: dsh-memory-vault
config:
injectLimit: 12
recallLimit: 20
Browser page
Settings → 记忆库 (Memory). Lists all entries newest-first with tags and timestamps; quick-add and delete buttons.
The page talks to the host half through the harness webServer service — same-origin JSON endpoints (GET/POST /dsh-memory/entries). The dynamic-plugin prototype used the sandbox-only harness.handle/host.call package RPC; the published package uses the public route so it works in any deployment.
Development
The plugin is one cordis package:
-
lib/index.js— host half: domain, tools, prompt injection, RPC handlers -
lib/client.js— web half: settings page
License
MIT
常见问题常见问题
在启用了 DSH 的终端中执行已验证命令 dsh plugin --profile default add github:flymysql/dsh-memory。命令会解析公开 package 元数据,并保持插件与本页展示的目录身份一致。
兼容性以页面上展示的 bundle 与 profile 状态为准。如果某个 profile 尚未检测到,请先保持禁用,并在生产启用前阅读仓库文档。
GitHub 链接和 activity 元数据是 release 与维护状态的来源。新版本发布后重新查看本页,确认目录已经观察到最新版本。