Introduction¶
DeepSeek Harness (DSH) adopts a plugin-based architecture. In long-term agent development, a common problem is that context is lost when a session is interrupted, or project progress and agreed-upon facts cannot be carried over across sessions. Developers often have to maintain documentation manually, which is not only inefficient but also prone to missing key information.
Plugin Overview¶
dsh-memories is the memory plugin for DeepSeek Harness, maintained by developer jisi71. It provides a dual-ledger system for each project: a long-term facts ledger (MEMORY.md) and a project progress ledger (PROGRESS.md). These ledgers automatically extract session information, remove duplicates, and inject it into the system prompt of new sessions, eliminating the need to manually restate background information frequently.
Core Features¶
- Automatic Extraction: Runs a scan every 30 minutes to extract four categories of long-term facts—preferences, projects, environment, and experience—along with three types of progress: completed, in progress, and next steps.
- Noise Interception: Features a strict “no-op gate” that automatically filters one-off task details, code snippets, and sensitive information, retaining only content worth recording.
- LLM Consolidation: Uses an LLM to merge, deduplicate, and resection drafts, generating clear ledgers. A
.bakbackup file is automatically generated on every rewrite. - Memory Decay: Unpinned entries automatically decay if not confirmed for 30 days, keeping the ledgers tidy.
- Tools and Commands: Provides commands such as
/rememberand/progress, as well as tools such asremember()andupdate_progress(), allowing users and agents to directly control ledger writes. - Fail-Safe Behavior: When LLM calls fail, no traces are left behind, and a retry is attempted in the next round.
Installation and Enabling¶
In a DSH environment, first ensure that the dsh-base base package is installed. It includes standard services such as fs, llm, sessionQuery, systemPrompt, tools, commands, and sandboxPolicy.
Use the official plugin manager to install it:
dsh plugin --profile web add dsh-memories
After installation, the plugin runs automatically when a new session starts, with no additional configuration required.
Typical Usage¶
For agents, tools can be called during conversation:
* remember(fact, category?, pinned?): Saves a long-term fact.
* update_progress(completed?, doing?, next?): Updates project progress.
For users, slash commands can be used directly:
* /remember <fact>: Appends a fact.
* /memories: Views processing status, draft file previews, and the last error.
* /memories rescan: Forces an extraction scan to run immediately.
* /progress: Views the contents of PROGRESS.md.
* /progress <note>: Manually appends a progress note.
Data is stored under .dsh/memories/ in the project root directory and includes MEMORY.md, PROGRESS.md, backup files (.bak), and a raw drafts folder (raw/).
Use Cases and Notes¶
- Use Cases: Suitable for long-running DSH sessions that require complex project state management. It helps agents quickly recall project conventions and current progress.
- Notes:
- Currently supports project-level ledgers; global user-level ledgers are planned via the
globalDirsetting. - Extraction only reads message text, not tool-call payloads.
- Progress merging is limited by instructions and does not guarantee strict adherence to the 60-line budget.
- The default prompt is in Chinese; English variants can be provided via PR.
- Currently supports project-level ledgers; global user-level ledgers are planned via the
Conclusion¶
dsh-memories solves the problem of cross-session memory and progress tracking for agents through a dual-ledger mechanism. It combines automatic extraction with manual control, making it suitable for development scenarios that require long-term context maintenance.