Introduction

DeepSeek Harness (DSH) uses a plugin-based architecture, and developers often need to configure persistent memory for agents. Existing memory solutions often involve vector databases or automatic extraction, making the configuration relatively heavy. The dsh-md-memory plugin provides a lightweight approach: the model writes content that needs to be retained into Markdown files, and the host injects those files into the session. This addresses simple cross-session memory requirements while preserving file readability and controllability.

Plugin Overview

The plugin is maintained by CuteSamurai24 and licensed under MIT. It does not automatically extract chat content, nor does it rely on vector or full-text engines. Memory writes are triggered exclusively by explicit tool calls from the model, ensuring transparency of operations.

Installation and Uninstallation

The plugin is enabled by default. Install it with the following command:

dsh plugin --profile web add github:CuteSamurai24/dsh-md-memory

After installation, restart dsh web to make it take effect.

To uninstall it, run:

dsh plugin --profile web remove dsh-md-memory

Note: uninstalling the plugin does not delete the files under the ~/.dsh/memory directory.

File Structure and Content

Memory data is stored under the ~/.dsh/memory directory, structured as follows:

~/.dsh/memory/
  user.md              cross-project user information, identity, and basic preferences
  agent/MEMORY.md      hot rules common to every session (keep them short)
  agent/topics/*.md    topic files loaded on demand

On Windows, the path corresponds to C:\Users\<username>\.dsh\memory\. You can open these files directly with a text editor to view, edit, or delete them.

Memory Tool and Usage Guidelines

The plugin provides a unified memory tool that supports the following operations:

  • Read-related: read, search, list
  • Write-related: append, edit, write
  • Management-related: create, delete

When using it, pay attention to the following restrictions:

  1. Append rule: When appending content to user.md, you must provide a reason (a one-sentence justification) explaining why the information also holds true outside the current project.
  2. Size limit: user.md is limited to 8KB, agent/MEMORY.md is limited to 12KB, and each topics/*.md file is limited to 20KB. Longer material should be placed in the topics directory.
  3. Subagent restriction: Subagents cannot write to memory, which avoids conflicts caused by concurrent writes in parallel tasks.

Limitations and Notes

This plugin is not a “second brain”; it does not automatically extract information from chat. In addition:

  • Security: It does not perform secret scanning. Do not let the model write sensitive tokens into this directory.
  • Search capability: The search function only supports simple substring matching; it does not support vector search or full-text search.
  • How to disable: To disable it, add the following configuration to ~/.dsh/settings.yaml:
md-memory:
  enabled: false

Conclusion

dsh-md-memory is suitable for scenarios where you need to maintain simple file-based memory in DSH while keeping the configuration transparent and lightweight. By using explicit tool calls and file storage, it provides developers with a controllable memory layer.