dsh-memory-local: DSH Local Cross-Session Memory Plugin

Introduction

When running agents in DeepSeek Harness (DSH), the context is often lost after a session ends: project conventions, personal preferences, and pitfalls encountered previously need to be explained again next time. Some users write key points into repository documents or rule files, while others rely on manually pasting summaries at the beginning of each conversation. The former requires maintaining files, and they may not automatically enter the context with the conversation; the latter is time-consuming and prone to omissions.

Below is an introduction to the community plugin dsh-memory-local (maintainer LISHUANGXI1412): it maintains memory entries locally that can span across sessions, reads and writes them explicitly via Agent tools, and injects fragments relevant to the current task into the system prompt as bounded blocks; an optional Settings page is available for visual management. It is categorized as “Memory” and currently has 1 GitHub star. This plugin belongs to the community ecosystem; see SkillHub for the directory page and GitHub for the source code.

What is this

dsh-memory-local is positioned as local-only cross-session memory for DSH—no uploading, no embeddings, and no cloud connectivity. The Agent writes to and queries a set of memory tools; the plugin injects relevant entries into the system prompt (as a bounded local-memory block, not as instructions). Version 0.1.1, License MIT, Runtime requirement Node.js >= 20.

Core Features

Agent Tools

The plugin exposes the following tools to the Agent (names are subject to the README):

  • memory_remember — Write to memory
  • memory_recall — Recall
  • memory_list — List
  • memory_forget — Delete
  • memory_inspect — Inspect

Writing is explicit: conversation content is not automatically captured into the memory bank.

System Prompt Injection

Memory entries relevant to the current context are injected into the system prompt in the form of a local memory block, with an upper limit: maximum 8 entries, totaling approximately 2000 characters; the upper limit for a single entry is 4 KiB.

Settings Page

After installing and enabling the Client-side capability, you can manage memory in Settings → Memory: add, delete, modify, pin, search, delete, and preview the next injection content. This page is registered via settings.section.

Storage and Scope

The default directory is ~/.dsh/memory/:

File / Path Meaning
global.json Global entries shared across all workspaces
projects/<id>.json Entries isolated by workspace (project)
index.json Mapping between workspace paths and project IDs

The storage directory can be overridden via the environment variable DSH_MEMORY_DIR.

The default scope is project (the current workspace); to follow across workspaces, use scope: "global" when writing (requires active selection, suitable for stable user preferences).

Security and Boundaries

Constraints listed in the README include:

  • Content resembling credentials will be rejected (prefixes like npm_, ghp_, github_pat_, sk-, Bearer, etc.).
  • Deletion goes through memory_forget / the management page and requires explicit operation.
  • No network, no embeddings, no cloud synchronization.

The Host side (tools and injection) can be used independently of the settings page; the Client half and the Host↔Client remote bridge depend on @deepseek-ai/dsh-typert-protocol (0.2.1-rc.2 in package.json).

Installation and Activation

The installation method given in the official README is to perform a bundle installation on a local checkout directory, rather than constructing an online installation command based on the repository name:

# install the local checkout into a profile
plugin_manager install_bundle <absolute path to this directory>

Replace <absolute path to this directory> with the absolute path of the plugin directory on your machine. Once installation is complete, open Settings → Memory to use the management page (if Client-related injections have been loaded).

DSH plugins run with the permissions of the current DSH process; please read the source code and the MIT license yourself before installation to confirm that the storage path and tool behavior meet your security requirements.

Typical Usage

The README does not provide complete conversation examples, but the reproducible process is as follows:

  1. Complete plugin_manager install_bundle as described in the previous section.
  2. In the session, have the Agent call memory_remember to write project conventions or preferences (default is project scope; use scope: "global" for sharing across workspaces).
  3. In a new session, view via memory_recall / memory_list, or rely on the automatically injected local-memory block (you can preview the injection result in Settings → Memory).
  4. Delete outdated or incorrect entries with memory_forget, or verify with memory_inspect before deleting.

The management page is suitable for batch searching, pinning, and editing, complementing tool calls.

Applicable Scenarios and Notes

Suitable for: Users who want to keep local, auditable cross-session key points within DSH; who do not want to hand over memory to third-party cloud services; or teams/individuals requiring project/global two-level scopes.

Notes:

  • Memory quality depends on whether the Agent calls memory_remember according to your intentions; the plugin does not automatically “learn” content from chats.
  • There are limits on the number of entries and characters for injection; it is not advisable to stuff large documents entirely into memory; long texts are still better placed in repository documents.
  • The community directory SkillHub has no official affiliation with DeepSeek / High-Flyer. Installation and upgrades should be based on the GitHub repository instructions.

Conclusion

dsh-memory-local uses local JSON storage, an explicit tool API, and bounded system prompt injection to complement the cross-session memory layer in the DSH “everything is a plugin” ecosystem, with an optional graphical settings page. To further understand the implementation and issues, please visit the GitHub Repository and the SkillHub Directory Page.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye