In DeepSeek Harness (DSH) agent development, session memory is typically lost after a process restart. The dsh-memory-panel plugin provides persistent, searchable memory for each session and supports automatic injection into system prompts.

Core Features

This plugin provides a complete set of memory management capabilities for DSH, including the following:

  • Model Tools: memory_save (create or update entries), memory_search (keyword search), memory_list (list filtered by tags), memory_get (read an entry), memory_delete (delete an entry).
  • Automatic Injection: memory:recall. The plugin automatically injects the top 6 memories into the agent’s system prompt and highlights them when a memory is marked as [Important].
  • Management Panel: Accessible via the “Memory” entry in the settings menu, it provides visual browsing, searching, creating, editing, and deleting.
  • JSON API: Provides /memory/api/* routes for communication between the panel and the host.

Installation

Install it using the official CLI; no manual configuration file changes are required:

dsh plugin --profile <profile-name> add dsh-memory-panel

Usage Examples

When used as model-callable tools, you can call the following interfaces directly:

  1. Save a memory
memory_save(title='User prefers Chinese thinking', content='...', tags=['preference'], importance='high')
  1. Search memories
memory_search(query='Chinese thinking')
  1. List memories by a specific tag
memory_list(tag='preference')
  1. Read full content
memory_get(id='m...')
  1. Delete a memory
memory_delete(id='m...')

How It Works

  • Storage Location: Memory data is stored in the .dsh-memory folder under the user’s home directory, in a file named memories. The data persists after the process restarts.
  • Mounting Mode: The plugin is mounted at the user layer of the DSH configuration, so these tools are visible to all sessions regardless of which agent preset is currently active.
  • Concurrency Handling: Write operations are executed through a serialized pipeline to avoid concurrent file-write conflicts.
  • Ranking Logic: Scoring weights are title (×3) > tags (×2) > content (×1). Chinese queries use two-character token matching.
  • Refresh Mechanism: The memory cache is automatically refreshed every 30 seconds, or immediately after a save/delete operation.

Notes

  • Runtime Environment: Node.js version >= 20 is required.
  • File Permissions: Ensure the host process has write permissions to the .dsh-memory folder under the user’s home directory.