Introduction¶
The plugin-based architecture of DeepSeek Harness (DSH) provides room for extension, but each session is isolated by default. When you start a new session, the Agent cannot access preferences established in the previous round, issues already encountered, or project context. dsh-memory_rollout aims to solve this memory gap. It provides the Agent with organized persistent memory that is written only when necessary, including facts, preferences, decisions, and project notes.
Core Features¶
This plugin implements a Codex-style memory system with the following primary capabilities:
- One draft per session: Each qualifying session generates or appends an evidence draft (
rollout_summaries/<sessionId>.md), similar to a subAGENTS.md. The Agent can also explicitly save key points before compaction. - Layered disclosure: Memory is disclosed through three layers. The top layer is
memory_summary.mdinjected into the prompt, the middle layer is a searchableMEMORY.mdregistry, and the bottom layer is a small set of relevant drafts or notes. This design makes searching easier without flooding the context. - Passive restraint: Memory generation is automatic, but only processes qualifying sessions. Manual addition, modification, or forgetting of long-term memory is performed only when explicitly requested by the user. A quick memory channel (about 5 steps) determines when to consult memory.
- Idempotent consolidation: Using fingerprints and watermarks, it ensures unchanged content is not re-consolidated, avoiding token waste.
- 6 user tools: It provides tools such as
memory_remember,memory_note,memory_integrate,memory_precompact,memory_recall, andmemory_forget, plus 2 internal scheduling tools. - Browser management page: It provides a “Memory” page, allowing browsing of summaries, registry, drafts, and notes, and supports configuration changes, import, and export.
Pipeline and Mechanisms¶
The plugin workflow is as follows:
- After a session ends or becomes idle, it enters the persistent enqueue stage (Stage 1).
- Candidate memories are distilled, and append-only evidence is generated or appended (draft + source_ref).
- Phase 2 performs global consolidation and publishes versioned evidence (
currentatomic switch, with older versions rollback-able). - Layered reading: first read the primary overview, then search the registry, then open a small number of relevant drafts/evidence.
- Users enter the unified change flow through
remember/forget/supersedecommands, then consolidate into an authoritative version.
Installation and Enablement¶
The current npm registry has not yet released it officially (although package.json shows 0.1.27, the README mentions 0.1.9), so installing via the GitHub repository or a local tgz is recommended.
git clone git@github.com:Bionic-forest/dsh-memory_rollout.git
pnpm add ./dsh-memory_rollout
dsh plugin --profile web add dsh-memory_rollout
After installation, add the configuration to the profile’s cordis.yml (or cordis.patch.yml):
- id: dsh-memory_rollout
name: dsh-memory_rollout
Dependency requirements:
* The DeepSeek Harness base version must be 0.1.1-rc.2 or later.
* The sessionQuery service must be mounted (provided by the DSH base); otherwise automatic memory (Stage 1 source reading) will be disabled.
Usage¶
The plugin provides a set of tools for the Agent or user to call:
memory_remember(content="用户偏好…", tags=["pref"]) # 记入长期记忆,带来源 sessionId
memory_note(slug="fix-x", content="…") # 写入临时 note,仅显式请求时执行
memory_integrate() # 幂等整合 summary 和 MEMORY.md
memory_precompact(content="要留的关键要点") # 压缩前保存信息到草稿和持久队列
memory_recall(query="…") # 显式搜索记忆入口
Configuration¶
The plugin exposes a full configuration schema that can be adjusted in the browser management page or configuration file. Main configuration items are as follows:
| Key | Type | Default | Meaning |
|---|---|---|---|
recallLimit |
int | 10 | Maximum number of entries returned by memory_recall |
summaryTokens |
int | 4000 | Token budget for injected memory_summary.md |
maxQuickSteps |
int | 5 | Search step budget for the quick memory channel |
memoryRoot |
string | '' |
Override the memory root directory (read-only) |
generateMemories |
boolean | true |
Whether a session contributes to future memory (automatic Stage 1) |
useMemories |
boolean | true |
Whether memory is injected into the model |
maxModelAttemptsPerDay |
number | 24 | Daily cap for Stage 1 model attempts |
extractProvider / extractModel / extractReasoningEffort / maxExtractTokens |
Stage 1 extraction LLM routing, model, reasoning tier, and token cap | ||
consolidationProvider / consolidationModel / consolidationReasoningEffort |
Phase 2 consolidation LLM routing, model, and reasoning tier |
Notes¶
- Permissions and security: The plugin runs with the current DSH process permissions. Check the source code and license before installing.
- Secret redaction: The plugin redacts secrets at three points: entry, model calls, and disk writes.
- Priority: Current user instructions take precedence over
AGENTS.md. - Citation integrity: Citations must point to real content; otherwise they are marked
unverified.
Ecosystem Background¶
The DeepSeek Harness philosophy is “everything is a plugin.” This plugin is maintained by community developers. Its memory model is adapted from openai/codex (Apache License 2.0) and flymysql/dsh-memory (MIT); see NOTICE for attribution.