Preface

After an Agent completes a task in DeepSeek Harness, it does not automatically carry over the project background, rule constraints, and subsequent corrections to the next session. If you want the new session to start with context while keeping the memory data as Markdown files locally, zhujunpeng12/dsh-memory-system is a DSH plugin worth evaluating.

It stores memory data locally as Markdown, defaulting to ~/.dsh-memory/, but you can also point MEMORY_VAULT to your own Obsidian Vault.

What This Is

dsh-memory-system is a DeepSeek Harness memory plugin maintained by zhujunpeng12, licensed under MIT.

It solves the problem of letting DSH remember projects, rules, and corrections across sessions while avoiding dependencies on databases, vector services, or external services. It does not rely on background LLMs, vector retrieval, or require the use of Obsidian, databases, or external APIs.

Core Capabilities

Hot Memory Bootstrap

When a new session starts, the system injects a budgeted hot package instead of making the Agent scan the entire memory store first. The hot package is limited to ≤14KB to allow the Agent to start with context without reading the full store.

You can use the memory_bootstrap tool or run the following in the repository directory:

python vault-guard/bootstrap.py --cwd <project-directory> --max-bytes 14000

It is recommended to automatically execute this via the native agent/pre-step in the first round of each session in the plugin.

Cold Layer Recall in Chinese

When a task requires historical details, the cold layer recall is triggered. It uses exact matching, Chinese bigram BM25, and metadata reranking, outputting a cold package limited to ≤4.2KB with a trace. Vector retrieval is disabled by default.

You can use the memory_recall tool or run:

python vault-guard/recall.py --query <question> --cwd <directory> --force

Authorized Writes

Writes are not automatic. memory_write defaults to dry-run, and only commits after user confirmation.

The write process uses the following mechanisms:

  • 30s lease with exclusive write lock
  • 5s heartbeat
  • before-image
  • SHA-256 precondition
  • manifest
  • receipt

raw records are append-only; corrections must use supersedes.

When using memory_write, the operation type can be op=raw/replace/recover; writes are committed only when apply=true.

Governance (Read-Only)

memory_govern scans the memory store for candidate issues, including:

  • Duplicates
  • Conflicts
  • Expired entries
  • Volume issues
  • Rule lifecycle candidates

It is read-only by default and does not write. Promotion, archiving, and deletion always require human confirmation.

You can run:

python vault-guard/govern.py --json --max-items 100

Trajectory Review

memory_trajectory_review is a read-only scan of session trajectories, using user corrections as hard signals to produce review candidates. It does not automatically judge errors or write to the memory store.

You can run:

python vault-guard/trajectory-review.py --cwd <directory>

Installation & Enabling

Prerequisites

Before installation, ensure the following are available in your environment:

DeepSeek Harness 0.1.0-rc.7
Node.js 22/24
Python 3.10+

Installation Command

The following command installs the repository into the web profile:

npx @deepseek-ai/dsh plugin --profile web add github:zhunpeng12/dsh-memory-system

After installation, restart Harness.

Enabling Confirmation

After restarting, have the Agent run memory_gate in a new session and confirm that the new session receives:

[vault-bootstrap]

This step confirms whether the hot memory injection pipeline is effective.

Typical Usage

  1. After restarting Harness, first confirm that the new session receives [vault-bootstrap].

  2. When manual hot package injection is needed, run:

python vault-guard/bootstrap.py --cwd <project-directory> --max-bytes 14000
  1. When searching for historical rules, project agreements, or correction records, run:
python vault-guard/recall.py --query <question> --cwd <directory> --force
  1. When writing persistent content, first use memory_write for a dry-run preview; after confirming correctness, let apply=true commit to disk.

  2. If you suspect the memory store has duplicates, conflicts, expired entries, or volume issues, run:

python vault-guard/govern.py --json --max-items 100
  1. When generating review candidates based on session trajectories in the wrap-up phase, run:
python vault-guard/trajectory-review.py --cwd <directory>

Use Cases & Notes

Suitable For

This is suitable for:

  • Wanting DSH to remember projects, rules, and corrections across sessions
  • Preferring memory sources to be Markdown files that can be reviewed in an editor
  • Wanting Chinese historical recall to be explainable with visible traces
  • Wanting writes to have dry-run, confirmation, and recoverability mechanisms
  • Wanting memory data to stay local rather than being sent to databases or external services

Not Suitable For

This is not suitable for:

  • Multi-tenant server environments
  • High-frequency multi-writer scenarios
  • Default semantic vector usage
  • Fully automated memory writes without approval

Security & Permissions

The dsh-memory-system repository contains only mechanisms and no personal data. Profiles, rules, events, and project notes should always remain on the user’s local machine.

Before use, it is recommended to review the source code, license, and write paths. The plugin runs with the permissions of the current dsh process; confirm the source is trustworthy before installation. Write operations default to dry-run, governance is read-only, and promotion, archiving, and deletion all require manual confirmation.

Links

  • GitHub: https://github.com/zhunpeng12/dsh-memory-system
  • Directory Page: The verified materials in this article do not provide a confirmable directory page URL; specific addresses are not listed here. You can search for the repository name zhunpeng12/dsh-memory-system in community directories. It is not listed as an official app store.