Introduction¶
In the multi-session workflow of DSH (DeepSeek Harness), common problems include the lack of a stable repository for user preferences, verified steps, and lessons learned, forcing new sessions to restate them. Existing practices typically involve copying context into prompts or manually maintaining notes; this approach relies on manual updates and is prone to omissions.
Below is an introduction to dsh-memory. It is a long-term memory plugin for DeepSeek Harness (DSH) designed to extract reusable information from completed sessions into summaries and memory files, and to inject them into subsequent sessions.
What is this?¶
dsh-memory is a memory plugin with the repository yan5236/dsh-memory and an MIT license.
It addresses the long-term memory problem between DSH sessions: structured extraction is performed after a session ends, followed by global consolidation after a cooldown period, and then the summary is permanently injected into the session. It also provides memory query and addition tools.
This plugin requires DeepSeek Harness. It is distributed via GitHub rather than npm; the package identifier is @nanmicoder/dsh-memory.
Core Features¶
The following verified capabilities are listed:
- Extract structured memory by session after the session ends, with a default idle debounce window of 3 minutes.
- After a cooldown period, globally integrate new raw memories into
MEMORY.mdandmemory_summary.md, with a default cooldown of 6 hours. memory_summary.mdis injected as a permanent summary into each session.- Provides four memory tools:
memory_list,memory_read,memory_search, andmemory_add. - Session content is processed for data handling, with input/output sanitized, and the memory path restricted to the memory root.
- Uses a persistent claim to avoid duplicate extraction or consolidation; implements retry with backoff upon failure.
- Provides the Settings → Long-term memory page for viewing statistics, manual execution, and configuration.
- Provides a memory manager supporting file tree view, editing, and two-step deletion.
- Phase 1 and Phase 2 can be configured with
off/low/high/maxreasoning effort.
Note that memory_add only writes when the user explicitly requests it.
Installation and Activation¶
First, confirm that the DSH environment is available. The example below uses the web profile.
Execute the installation command in the terminal to add the plugin to the web profile:
dsh plugin --profile web add 'git+https://github.com/yan5236/dsh-memory.git#main'
After installation, verify the configuration to confirm the plugin has been added to the profile:
dsh --profile web --dump-config
The output should include:
- id: dsh-memory
If the dump-config output is missing this line, you need to add @nanmicoder/dsh-memory to the dsh.profile.bundles array of the profile.
After the steps above, start DSH:
dsh web
After starting, open:
Settings → Long-term memory
The memory files are located by default at:
$DSH_HOME/memories/
Typical Usage¶
After enabling the plugin, you can use it from both the page and session tools.
On the Settings → Long-term memory page, you can view statistics, manually run tasks, and configure the plugin. Common configuration items include:
memoryRoot
provider
model
consolidationCooldownMs
idleDebounceMs
maxRolloutsPerRun
maxSummaryChars
Among them, memoryRoot corresponds to the root directory of memory files, with a default path of $DSH_HOME/memories; consolidationCooldownMs corresponds to the global consolidation cooldown time, with a default value of 6 hours; idleDebounceMs corresponds to the debounce window after the session ends, with a default value of 3 minutes.
In a DSH session, the model can use four memory tools:
memory_list
memory_read
memory_search
memory_add
memory_add is not an automatic write tool; it only writes when the user explicitly requests it.
Additionally, you can paste the one-prompt install code block from the README into a DSH session, allowing the agent to execute the installation, registration, and verification. If a step writing to $DSH_HOME/profiles is blocked by permission policies, you should request the user to switch to Full access or approve the operation; do not bypass or silently fail.
Use Cases and Notes¶
This plugin is suitable for DSH users who need to preserve preferences, steps, and lessons learned across sessions, especially those using the web profile who wish to reduce repetitive explanations and retain queryable memory files.
Pay attention to the following points before use:
- This plugin runs with the permissions of the current DSH process; therefore, it will read and write DSH-related files.
- Check the source code and license before installation; the license is MIT.
- The plugin is distributed via GitHub, not as an npm package; the package identifier is
@nanmicoder/dsh-memory. package.jsondeclaresengines.nodeas^22.19.0 || >=24.0.0.- The community directory is an independent site with no official affiliation with DeepSeek or HF (Huanfuan); do not interpret the plugin distribution source as an official app store.
- No verifiable directory page URL is provided in this article; the repository address is
https://github.com/yan5236/dsh-memory.
Conclusion¶
The core value of dsh-memory lies in extracting reusable information from sessions into long-term memory. Through summary injection and four memory tools, subsequent sessions can reduce repetitive instructions. After installation, verification, and startup, you can view statistics, manually run tasks, and configure settings on the Settings → Long-term memory page. Repository address: https://github.com/yan5236/dsh-memory.