LLM-driven remember/forget memory: after each turn a model decides what to keep (MemoryDirector), injects relevant memories before each step, dedups, and persists cross-session.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:ljsysfurryACE/dsh-memory-director
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-memory-director
MemoryDirector 插件 —— 给 DeepSeek Harness 加"长期记忆"能力。
官方 Harness 的 compaction 只做摘要压缩,没有任何"跨会话记住重要事实"的概念。 这个插件补上 AgentFrame 的 MemoryDirector:
- 每轮对话后:LLM 分析本轮,决定记住什么 / 忘记什么
- 每次请求前:检索相关记忆,注入模型上下文
- 持久化:记忆存 JSON 文件(
~/.dsh/memory.json)
为什么是差异化
| 能力 | 官方 Harness | dsh-memory-director |
|---|---|---|
| 上下文压缩 | ✓ compaction | ✓ (可配合) |
| 记住重要事实 | × 没有 | ✓ LLM 决策 |
| 跨会话记忆 | × | ✓ 持久化 |
| 记忆检索注入 | × | ✓ pre-step 注入 |
| 遗忘管理 | × | ✓ 重要度衰减 |
接入
# profile 的 cordis.patch.yml
- id: memory-director
name: '@agentframe/dsh-memory-director'
config:
provider: deepseek-official
model: deepseek-v4-flash
maxTokens: 256
dedupThreshold: 0.8
forgetThreshold: 0.1
storePath: ~/.dsh/memory.json
auto: true
机制
agent/turn-stopping (每轮结束)
→ 提取本轮文本 → LLM 决策 {remember, forget, importance}
→ remember → 存入记忆库 (去重)
→ forget → 删除过时记忆
agent/pre-step (每次请求前)
→ 取最后用户消息 → 检索相关记忆
→ 注入 system 消息 (memory-director block)
→ 模型可基于记忆回答
配置
| 字段 | 默认 | 说明 |
|---|---|---|
provider |
deepseek-official | 决策用 provider |
model |
deepseek-v4-flash | 决策用模型 (便宜快速) |
maxTokens |
256 | 决策输出上限 |
dedupThreshold |
0.8 | 记忆去重阈值 |
forgetThreshold |
0.1 | 遗忘阈值 (重要度衰减) |
storePath |
~/.dsh/memory.json | 持久化路径 |
auto |
true | 自动挂钩 agent 循环 |
License
GPL-3.0 © Cloud LTE Studio / AgentFrame
Links
More in this category
vectorize-io/hindsight#coding-agents★ 41184
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★ 38914
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.
agentscope-ai/ReMe#dsh★ 3530
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★ 2679
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★ 1081
Reads the session files thirty-three 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).
adoresever/graph-memory★ 631
Traceable, searchable cross-session memory for DeepSeek Harness — conversation knowledge as typed graph nodes (TASK/SKILL/EVENT) and typed edges.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.