dsh-workspace-memories: Persistent Workspace Memory for DeepSeek Harness

DeepSeek Harness (DSH) agents are stateless across sessions. Context generated during a conversation (project decisions, conventions, debugging techniques) exists only within that conversation and disappears after the session ends. The built-in AGENTS.md is a persistent file, but it is a static, project-level instruction file: agents cannot update it independently, and writing sensitive information such as server addresses or topology into the project directory risks accidental commits.

dsh-workspace-memories is a plugin that provides workspace-level persistent memory for DSH. It creates a separate memory file for each workspace, stores them outside the DSH data directory by default, automatically injects them into the system prompt in every session, and provides a sidebar panel and agent tools to manage memory.

Core Features

  • Sidebar Management: Use the Workspace Memory sidebar panel to browse, create, edit, or delete memory files.
  • Agent Tool: Registers the save_workspace_memory tool, allowing agents to proactively save new memories during a conversation.
  • Automatic Injection: The system prompt of every session for a workspace automatically includes the contents of that workspace’s memory files.
  • Storage Mode Configuration: Supports two storage modes: home (default, outside the DSH data directory) and workspace (inside the project directory).

Installation and Enabling

Use DSH’s plugin installation command to add the plugin:

dsh plugin --profile desktop add github:lengfengng-tech/dsh-workspace-memories

After installation, you can find and enable the plugin on the plugin page in the sidebar.

Typical Usage

  1. Create a memory: Open the “Workspace Memory” panel in the sidebar and select “New file” to create a memory file in Markdown format.
  2. Agent saving: Enter an instruction in the conversation, for example, “remember: this project uses pnpm, not npm”. The agent will call the save_workspace_memory tool to persist this information.
  3. Configure storage: Set storage: home (default, stored in the DSH data directory) or storage: workspace (stored in the workspace directory) through configuration options.

Notes

  • Session refresh: Tool registration takes effect immediately, but the list of tools visible to the model is built at the start of each session. If a new session is not started after installation or upgrade, the model may not see the save_workspace_memory tool (especially noticeable in PTC mode). It is recommended to start a new session or send a new message to update the tool list.
  • Permissions and scope: Operations in the browser panel are limited to the registered workspaceId and cannot access arbitrary paths.
  • File limits:
    • File names must be strictly validated and must not contain path separators (such as /), .., whitespace, or control characters.
    • The maximum size of a single file is 1 MiB.
    • When injecting into the system prompt, each file is truncated to 32K characters, and the total number of memory files is capped at 20.
  • License and nature: This plugin uses the MIT license. It is a community-maintained plugin and not an official DeepSeek product.

Summary

dsh-workspace-memories addresses the stateless nature of native DSH and the static, non-updatable limitation of AGENTS.md through external storage and automatic injection. It enables agents to maintain consistency across sessions and allows developers to better control the lifecycle of memories.

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

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

Xiaoye