Introduction¶
The DSH plugin ecosystem emphasizes “everything is a plugin,” and the community directory is an independent site with no official affiliation to DeepSeek / Hackerspace. For scenarios where project conventions, user preferences, and interim conclusions need to be preserved across multiple sessions, relying solely on the current context is inconvenient. dsh-memory-palace is a DeepSeek Harness plugin that ports WorkBuddy’s file-based memory system into DeepSeek Harness, providing Harness with cross-session persistence and human-editable Markdown memory.
The following introduces its capabilities, installation methods, typical usage, and precautions before use.
What is it¶
dsh-memory-palace is maintained by lovezi0 with an MIT license.
It stores memory in Markdown files:
MEMORY.md: Long-term memory file.YYYY-MM-DD.md: Daily log file.
It supports two layers of memory: user-level and workspace-level. It also supports directly reading and writing these directories in projects that already have .workbuddy/memory or .codebuddy/memory, bridging WorkBuddy / CodeBuddy memory.
Core Features¶
Markdown Memory Files¶
Memory is stored entirely in Markdown files and can be modified directly with an editor.
Common files include:
MEMORY.mdYYYY-MM-DD.md
Dual-layer Memory¶
The plugin supports two layers of memory:
- User-level memory: Default path is
~/.deepseek-harness/MEMORY.md. - Workspace-level memory: Default path is
<cwd>/.deepseek-harness/memory/.
User-level memory is suitable for saving cross-project personal preferences, while workspace-level memory is suitable for saving current project conventions and context.
Read and Write Per Round¶
Each conversation round reads:
- User-level
MEMORY.md - Workspace
MEMORY.md - Today’s log
YYYY-MM-DD.md
And injects relevant content into the system prompt.
At the end of each round, it listens for turn/end in session/event, passes a spam prevention gate, and asynchronously appends lightweight entries to the daily log YYYY-MM-DD.md.
Log Migration¶
Daily logs older than the retention period (default 30 days) are automatically migrated into MEMORY.md and then the original log is deleted.
WorkBuddy / CodeBuddy Bridge¶
When a project already exists in one of the following directories, the plugin will directly read and write to these directories:
.workbuddy/memory
.codebuddy/memory
This allows reusing existing WorkBuddy / CodeBuddy memory directories and avoiding duplicate maintenance.
Memory Tools¶
The plugin provides the following tools:
memory_note: Writes conventions or preferences to the targetMEMORY.mdfor the current project.memory_note_user: Writes cross-project preferences to~/.deepseek-harness/MEMORY.md.memory_read: Reads user-level and project-level memory, today’s log, and the last 3 historical logs in one go.memory_delete: Deletes memory entries by content; requires two-stage confirmation, and the delete action passes through a hard gate of the harness’s native confirmation popup.
The above tools have built-in deduplication to prevent duplicate appending.
Hybrid Mode¶
The hybrid mode was introduced in v1.6.0, supporting the memory sub-agent to write today’s work log and retaining the log as a proof layer.
This mode provides the following sectional tools:
memory_writememory_update_sectionmemory_reorganize
Used for sectional writing, replacement, and reorganizing memory content.
In hybrid mode, logs never expire and are retained as a proof layer.
Active Memory¶
Under the active memory path (plugin mode), the plugin can guide the agent to actively file entries in the following scenarios:
- Fix
- Verify
- Milestone
- Preference
Smart Mode¶
Smart mode (LLM intelligent session summarization) can distill new conversation increments from the session into a summary and write it to the daily log and MEMORY.md.
Graphical Settings¶
DSH settings have a built-in “Memory” panel with the path:
DSH 设置 →「记忆」
All configurations can be adjusted graphically.
The project documentation also mentions that configuration items (fields, default values, and descriptions for the Basic / Auto Record / Development cards) have been organized into CONFIG.md.
Manual Distillation¶
The session title bar provides a “Memory” button supporting manual distillation:
- Distill session
- Distill project memory
Installation and Activation¶
Prerequisites: DeepSeek Harness and its CLI must be installed, and the dsh command must be available.
The documentation provides multiple installation methods; you can choose according to your environment.
Install directly via GitHub¶
This command adds the repository to the specified profile directly:
dsh plugin --profile web add github:lovezi0/dsh-memory-palace
If you want to lock the version, you can use:
dsh plugin --profile web add github:lovezi0/dsh-memory-palace#v1.6.2-alpha.4
Local installation after clone¶
Suitable for development or modifying source code scenarios:
git clone https://github.com/lovezi0/dsh-memory-palace.git
Enter the directory and build:
cd dsh-memory-palace
npm install
npm run build
Then load into profile:
dsh plugin --profile web add .
Install via npm¶
Can be pulled and loaded from npm directly by dsh:
dsh plugin --profile web add dsh-memory-palace
You can also manually install with npm first, then load:
npm install dsh-memory-palace --registry=https://registry.npmmirror.com/
dsh plugin --profile web add dsh-memory-palace
Uninstall¶
dsh plugin --profile web remove dsh-memory-palace
Typical Usage¶
The following lists the readable and writable paths that can be reproduced from the documentation.
Read¶
Each conversation round reads the following files and injects them into the system prompt:
User-level MEMORY.md
Workspace MEMORY.md
Today's log YYYY-MM-DD.md
Write¶
Listens for turn/end in session/event, passes a spam prevention gate, and asynchronously appends lightweight entries to:
YYYY-MM-DD.md
Tool Invocation¶
memory_note: Writes conventions or preferences to the targetMEMORY.mdfor the current project.memory_note_user: Writes cross-project preferences to~/.deepseek-harness/MEMORY.md.memory_read: Reads user-level and project-level memory, today’s log, and the last 3 historical logs in one go.memory_delete: Deletes memory entries by content; requires two-stage confirmation.
Settings¶
Enter:
DSH 设置 →「记忆」
You can graphically adjust related configurations here.
Version and Dependencies¶
The version in package.json is:
1.6.2-alpha.4
peerDependencies specifies the following dependency versions:
@deepseek-ai/dsh-settings ^0.1.2-alpha.2
@deepseek-ai/dsh-tools ^0.1.2-alpha.2
The project documentation also mentions:
mian分支已适配 deepseek harness 0.1.2-alpha.2+
旧版本已切换分支归档,见 dsh-v0.1.x
This plugin is a standard npm package, loaded into the profile via dsh plugin, and declares a bundle patch in cordis.patch.yml.
Use Cases and Notes¶
This plugin is suitable for the following scenarios:
- Need to preserve project conventions or personal preferences across sessions.
- Want memory files to be human-readable and directly editable.
- Project already has WorkBuddy / CodeBuddy memory directories and wants to reuse them.
- Want to graphically adjust memory-related configurations via the DSH Settings panel.
- Need to actively file entries in scenarios like agent fix, verification, milestones, and preferences.
Precautions before use:
- The plugin runs with the current
dshprocess permissions; source code and license should be checked before installation. memory_deleterequires two-stage confirmation, and the delete action passes through a hard gate of the harness’s native confirmation popup.- In
hybridmode, logs never expire and are retained as a proof layer. - The project documentation references
dsh-better-sidebaranddsh-sideband, but this plugin implements a simplified version of each mechanism and does not contain their full functionality.
Conclusion¶
The value of dsh-memory-palace lies in putting DSH’s memory into Markdown files: it can be preserved across sessions, directly edited locally, and is compatible with WorkBuddy / CodeBuddy directory structures. If you need to establish a checkable, modifiable, and portable memory layer in DeepSeek Harness, you can install and enable it following the steps above.
Project Repository:
https://github.com/lovezi0/dsh-memory-palace