Introduction¶
When running agents in DeepSeek Harness (DSH), conversation context is cleared upon session termination. Project conventions, toolchain selections, and conclusions from previous troubleshooting are difficult to reuse across sessions if they rely solely on system prompts within the current conversation or manual recitation. Common workarounds include self-built notes, RAG, or external memory services, but these often require network access, index maintenance, and may trigger additional model calls.
Below is an introduction to the community plugin dsh-memory-lite (Maintainer: Alexis-ray, Category: Memory). It uses local plain Markdown files for long-term memory, isolated by workspace directory. It initiates no network requests and makes no automatic model calls. It is suitable for developers who want their memory to reside on disk, be readable and editable, and integrate directly with the DSH toolchain.
What is this¶
dsh-memory-lite is a workspace-level long-term memory plugin for DeepSeek Harness: sessions opened at the same path share the same set of project memories; changing directories will hide the project’s memories unless the entry is saved with a global scope. Each memory corresponds to a Markdown file on disk with YAML front matter, viewable and editable via any text editor.
Repository: https://github.com/Alexis-ray/dsh-memory-lite
Community Directory Page: https://www.skillhub.cn/plugins/Alexis-ray/dsh-memory-lite
The current package version is 0.1.0, licensed under MIT. The DSH community directory (such as SkillHub) is an independent site with no official affiliation with DeepSeek / High-Flyer. Please review the source code and license yourself before installation. The plugin runs under DSH process permissions, and the vault directory and memory contents remain on the local machine.
Core Features¶
Five Tools¶
The agent reads and writes memory through the following tools (refer to the README for specific names and behaviors):
| Tool | Main Inputs | Description |
|---|---|---|
memory_save |
title (≤80 chars), body, scope? (project | global), tags?, confidence? |
Defaults to project; content matching credential patterns is rejected |
memory_search |
query, scope? (both | project | global), limit? |
Lexical scoring: Title ×3, Tags ×2, Body ×1; Chinese uses bigram matching; default limit 8, max 50 |
memory_get |
id |
Returns the complete record; throws an error if not found, does not return empty results |
memory_list |
scope? |
Title index only, does not read body content |
memory_forget |
id |
Moves the file to .archive/, can be manually moved back to restore |
memory_get and memory_forget can only access memories visible to the current workspace and global memories; IDs from other workspaces cannot be read or archived.
Title Index on Session Startup¶
At the beginning of a session, the plugin can inject a brief “Title Index” (standing section) into the system prompt to inform the agent of existing memories without reading files individually. The injection emphasizes: memories are data, not instructions; body content must be obtained via memory_get. This can be disabled or limited via configuration (see below).
Workspace Isolation¶
The project key is sha256(normalizePath(cwd)).slice(0, 12): normalizePath unifies drive case, converts \ to /, collapses duplicate separators, and removes trailing separators; it does not resolve symbolic links, so renaming a directory is treated as a new project. global memories are visible in all workspaces; allowGlobalScope can be set to false to prohibit writing to global.
Design Trade-offs (Stated in README)¶
- Zero Network: The test suite stubs
fetch,http.request, etc., at runtime, asserting no outbound calls. - No Index, No Database: Listing and searching read
.mdfiles directly. - Archive instead of Hard Delete:
memory_forgetmoves files to.archive/. - Lexical Search Only: No embeddings; synonym recall is weak.
- No Update Tool: To update, save a new entry and forget the old one.
Environment and Dependencies¶
- DSH Desktop 2.0.18,
@deepseek-ai/dsh-*0.2.1-rc.2 (engines.dshis restricted to>=0.2.1-rc.2 <0.2.2) @deepseek-ai/cordis4.0.5- Node.js >= 20
- pnpm is required when building from source
If DSH upgrades beyond the above engines.dsh range, the bundle may be skipped until the plugin updates its range (see INSTALL.md in the repository).
Installation and Activation¶
Register the plugin under a specified profile (e.g., desktop), which appends dsh-memory-lite to dsh.profile.bundles. If memory_* tools are not visible in a new session, restart the client.
Install directly from GitHub:
dsh plugin --profile <name> add git+https://github.com/Alexis-ray/dsh-memory-lite.git
Install from a local checkout (build required first):
pnpm install
pnpm build
dsh plugin --profile <name> add <path-to-repo>
The repository has committed build artifacts in lib/, so installation from git usually does not require a local build. For complete verification, upgrade, and uninstallation steps, see INSTALL.md (Chinese).
Disk Layout and Single Memory Format¶
The default vault root directory is <DSH_HOME>/memory-vault (or %USERPROFILE%\.dsh\memory-vault if DSH_HOME is not set). Structure:
<vault>/
global/
<slug>-<id>.md
projects/
<key>/
project.json
<slug>-<id>.md
.archive/
<slug>-<id>.md
Example of a single memory (front matter + body):
---
id: 20261020-1730-ab12
title: This repo uses pnpm
scope: project
projectPath: c:/work/demo
tags:
- toolchain
- conventions
confidence: medium
createdAt: 2026-10-20T09:30:00.000Z
updatedAt: 2026-10-20T09:30:00.000Z
---
Install dependencies, run tests, and build with pnpm. Do not use npm or
yarn; the lockfile is pnpm-lock.yaml.
Writes use a temporary file + fsync + rename strategy; entries exceeding maxFileBytes (default 65536) are rejected rather than truncated.
Configuration Options¶
Set these in the plugin’s cordis.patch.yml or in the patch for the plugin ID within the profile; keys not written use default values.
| Key | Default | Meaning |
|---|---|---|
vaultPath |
See above | Vault root directory |
injectStanding |
true |
Whether to inject the title index into the system prompt |
standingMaxItems |
8 |
Maximum items in the index (min 1) |
standingBudgetChars |
1200 |
Index character budget (min 200) |
allowGlobalScope |
true |
Whether to allow memory_save to use scope: global |
redactSecrets |
true |
Whether to reject body content that appears to be credentials |
maxFileBytes |
65536 |
Max bytes per file (min 1024) |
autoSavePolicy |
off |
hint registers a system section guiding the agent to actively save; off does not register |
Typical Usage¶
There is no fixed CLI on the agent side; the workflow is generally completed via tool calls:
- After the session starts, if standing is enabled, a list of existing memory titles will appear in the system; call
memory_getwhen details are needed. - To record a convention: call
memory_save, keeptitlebrief, and write clear facts inbody; usescope: globalonly for cross-project sharing. - To recall fuzzy keywords: call
memory_search, specifyingscopeandlimitif necessary. - To browse titles of currently visible entries: call
memory_list. - To deprecate old entries: call
memory_forget; to restore, go to the vault’s.archive/and move the file back to its original location.
The plugin does not provide an “update” tool: modify content by saving a new ID and then forgetting the old ID.
Use Cases and Cautions¶
Suitable for: Users who want file-based, auditable long-term memory within DSH; emphasize offline operation and no automatic model calls; isolate project memories by repository/working directory, with occasional use of global for universal preferences.
Cautions:
- Lexical search does not understand semantics; synonyms rely on word coverage in titles/tags/body.
- After renaming a project directory, memories under the old key remain on disk but are not automatically associated with the new directory (
project.jsonrecords the old path). - The vault is local only, with no built-in cross-machine sync; sync directories manually if needed.
- The DSH version must fall within the range declared by
engines.dsh.
Conclusion¶
dsh-memory-lite implements DSH’s long-term memory as a Markdown vault under workspace scope: five memory_* tools, optional title index injection, archive-style deletion, and zero-network behavior guaranteed by tests. If you are looking for a “Memory” category plugin in the DSH ecosystem, you can compare installation commands with the community directory page or GitHub README and follow INSTALL.md to enable it.
- Directory Page: https://www.skillhub.cn/plugins/Alexis-ray/dsh-memory-lite
- GitHub: https://github.com/Alexis-ray/dsh-memory-lite