Foreword¶
When conducting contextual conversations or agents in DSH, a common practice is to delegate “memory” to vector databases or hosted services: the data format is opaque, and the recall process is difficult to inspect. If you prefer memory that is readable, editable, and backup-able, and fully stored on local disk, the community plugin DSH Memory Vault (npm package name dsh-longterm-memory, maintained by bufan528) offers an alternative path: using Obsidian-compatible Markdown as the single source of truth, accompanied by a sidebar management page, token-budgeted recall, and a crash-recoverable change journal.
The following introduces what it is, what it can do, and how to install and get started.
What is this¶
DSH Memory Vault · Long-term Memory is a “memory” class plugin for DeepSeek Harness (DSH). It writes long-term memories as .md files with YAML frontmatter, placed in a vault directory you specify; the derived index .dsh-memory/index.json can be deleted at any time and rebuilt from the Markdown. The plugin registers a top-level sidebar entry (not a chat tab), exposes four tools to the model, and injects a standing memory section based on budget during session assembly.
The current public version is 0.1.4 (MIT License), with the project status set to Preview. It requires DSH >=0.2.1-rc.2 <0.2.2 and Node.js >=20. GitHub Repository: bufan528/dsh-longterm-memory; Community Directory Page: skillhub.cn plugin entry.
Core Features¶
Storage and Indexing¶
- Markdown as the single source of truth: No proprietary formats, no separate export steps; readable, backlinkable, and backup-able using Obsidian or any text editor.
- Disposable Index:
.dsh-memory/index.jsonis derived data; if lost, it can be fully rebuilt from the Markdown files. - Obsidian Compatible: The vault can contain
.obsidian/,[[wikilinks]], human-readableIndex/structures, etc. (see repository documentationdocs/storage-format.mdfor details).
Model-Side Interface¶
The plugin registers four tools for the model (can be disabled via configuration):
| Tool | Function (per README) |
|---|---|
memory_search |
Lexical ranked search, supporting type/status/tag filters and token budget |
memory_get |
Read a single memory entry |
memory_save |
Write memory; rejects credential-like content |
memory_forget |
Forget/retire relevant memories |
Automatic injection and memory_search share the same recall engine; injection only uses current facts, while explicit recall can include retired memories marked as history.
Management Interface and Lifecycle¶
- Top-level Sidebar Page: Tabs for Overview, Search, Details, Management, Inbox, Settings, etc.; the management page communicates with the Host via local HTTP RPC (loopback / trusted hosts only).
- Memory Lifecycle: Statuses include
pending → active → stale / superseded / archived / conflict; Confidence levels arelow / medium / high. Low-confidence and sensitive content enter the Inbox, requiring manual Confirmation or Rejection (Inbox operations fixed since 0.1.3). - Auto-extraction: Local rule-based candidate extraction at the real
turn/endboundary; optional model-assisted extraction is disabled by default (enableLlmExtraction: false). - Conflict and Merge: Contradictory facts are kept side-by-side; deterministic merge rules for deduplication, supplementation, and contradictions; the conflict page supports keep / merge / both.
- History and Crash Safety: Changes are written to a journal (including before/after summaries, reasons, timestamps); write-ahead outbox for crash recovery; single-file atomic writes, file locking, and optimistic checksum concurrency control.
Privacy and Locality¶
No telemetry or external network requests by default; the Host side does not depend on @deepseek-ai/* runtime packages, using only the passed Cordis context. Unless model-assisted extraction is enabled, turn text is not sent to external Providers.
Installation and Activation¶
The DSH ecosystem adopts “everything is a plugin”; the DSH Plugin Market (awesome-dsh-plugin.com), dsh.works community registry, and the in-app Plugin Market (dshmarket) are independent community directories with no official affiliation with DeepSeek / High-Flyer. This plugin is listed in the above directories (listed on 2026-10-19, verified on dsh.works).
Choose one of the following installation methods:
Method A — In-app Plugin Market (Recommended for Desktop)
Open the Plugin Market in the DSH desktop application, search for “长期记忆” or “DSH Memory Vault”, and restart as prompted after installation.
Method B — npm (CLI)
dsh plugin --profile web add dsh-longterm-memory@latest
The README also provides a form without the profile: dsh plugin add dsh-longterm-memory@latest. Using @latest installs the latest published version (documented as 0.1.4).
Method C — GitHub Release tarball
gh release download --repo bufan528/dsh-longterm-memory --pattern "*.tgz" --dir .
dsh plugin --profile web add .\dsh-longterm-memory-0.1.4.tgz
(If gh is not available, manually download from the Latest Release.)
After installation, open the Web UI, navigate to Long-term Memory in the sidebar, and select or initialize a vault directory. If vaultPath is not configured, the plugin will initialize a default location (documented as ~/Documents/DSH Memory on Windows); for testing or isolated data, it is recommended to explicitly specify a path in the profile.
You can pre-write plugin configuration in the profile’s cordis.patch.yml, for example:
- id: longterm-memory
name: dsh-longterm-memory
config:
vaultPath: 'D:/path/to/DSH Memory'
language: zh
Typical Usage¶
According to the official “Quick Start”, the workflow can be summarized as follows:
- Install the plugin and open the sidebar management page.
- Click Initialize, and select a directory (existing Obsidian vaults can also be used directly).
- Manually create memories via New, or rely on local rule-based automatic extraction at the end of a turn; low-confidence entries appear in the Inbox. Upon confirmation, they are written to active (
lowis promoted tomedium); if rejected, no file is written. - Ask questions related to memory during the conversation: the plugin injects a standing memory section, and the model can call tools like
memory_searchto retrieve ranked hits. - Adjust token budgets, step-by-step recall, extraction toggles, and UI language (
zh/en) in Settings.
Memory categories include profile, preference, project, project-state, decision, knowledge, experience, task, etc.; see the “Vault Structure” section in the README for the repository directory structure.
Common configuration items (all optional, defaults see table below; full list in src/host/config.ts, override via config in cordis.patch.yml):
| Key | Default | Meaning |
|---|---|---|
vaultPath |
Auto-discover / initialize | Absolute path to the memory vault |
language |
zh |
UI Language (zh / en) |
enableTools |
true |
Whether to expose the four model tools |
enablePromptSection |
true |
Whether to inject the standing memory section |
standingBudgetTokens |
700 |
Token limit for the standing section |
standingMaxItems |
12 |
Item limit for the standing section |
recallBudgetTokens |
600 |
Token limit for single recall |
recallMaxItems |
8 |
Item limit for single recall |
enablePerStepRecall |
false |
Step-by-step injection of recalled memories |
enableAutoExtraction |
true |
Local rule-based extraction at turn end |
enableLlmExtraction |
false |
Model-assisted extraction (uses your configured Provider in DSH) |
redactSecrets |
true |
Reject credential-like candidates |
sensitiveNeedsConfirmation |
true |
Sensitive categories require manual confirmation |
maxCandidatesPerTurn |
5 |
Extraction candidate limit per turn |
The management page also allows previewing the injected text via RPC (e.g., previewStanding, previewRecall), facilitating verification of what the model actually receives.
Applicability and Notes¶
Who is it for
- DSH users who want long-term memories stored as plain text Markdown and managed via Obsidian or Git version control.
- Scenarios requiring auditable recall budgets (token/item limits) and inbox manual vetting, rather than a black-box vector database with one-click writing.
- Deployments that prioritize local-first, with no telemetry and no cloud sync by default.
Please note before use
- The plugin reads and writes the vault and journal with the permissions of the current DSH process; please read the Source Repository and MIT License before installation to ensure the path and sensitive content policies align with your environment.
- The project is in Preview; the API and storage format are subject to change.
engines.dshis restricted to0.2.1-rc.2up to before0.2.2;0.2.0-rc.2is not supported. - Injected content is designed to be wrapped as untrusted data rather than instructions, but the model may still misuse memories; credential-like content is intercepted before entry, and sensitive categories require confirmation by default.
- Documentation notes that the primary verified platform is Windows; other platforms follow Node path rules, so self-verification is advisable.
Conclusion¶
DSH Memory Vault collapses “Agent Memory” into a local Markdown vault: the index is rebuildable, recall is budgeted, changes are journaled, and retrieval, inbox handling, and conflict resolution are completed in the sidebar. If you need long-term memory in DSH that is ownable and editable, you can install dsh-longterm-memory@latest from the community directory or npm, and initialize the vault and budgets following the quick start.
- Directory Page: https://www.skillhub.cn/plugins/bufan528/dsh-longterm-memory
- GitHub: https://github.com/bufan528/dsh-longterm-memory
- DSH Plugin Market Entry: https://awesome-dsh-plugin.com/p/bufan528/dsh-longterm-memory/