Preface

In the DSH plugin ecosystem, if long-term memory is shared globally or across workspaces, it often brings irrelevant task content into the current session. This article introduces dsh-task-memory. It restricts remember, recall, and search operations within the same task boundary and optionally injects pinned/recent facts from the current task into the system prompt of the current agent session.

What This Is

dsh-task-memory is a long-term memory plugin for DeepSeek Harness, maintained by wangyihao0001-oss, and licensed under MIT.

It maintains an isolated memory vault for each task. The default directory is:

~/.dsh/storages/task-memory/

Plugin requirements:

Node.js >= 20

Applicable profiles:

web

It can also be used with any profile that loads Host tools.

Core Features

Task Isolation

dsh-task-memory uses task as the isolation boundary for memories. A session can be bound to a specific task vault or use the default vault corresponding to the current session.

The main tools include:

memory_bind_task
memory_current_task

Where:

  • memory_bind_task: Binds the current session to a specified task vault.
  • memory_current_task: Views which vault the current session is using.

Memory Read/Write

Both writing and reading occur within the current task boundary:

memory_remember
memory_recall
memory_search
memory_forget

Where:

  • memory_remember: Writes or updates a fact by key.
  • memory_recall: Reads by an exact key.
  • memory_search: Searches by keywords, supporting English tokens and Chinese bigrams; an empty query lists recent/pinned entries.
  • memory_forget: Deletes a key.

The search here is lexical search, not embeddings/vector search.

Task Vault Management

The plugin provides the following management tools:

memory_list_tasks
memory_clear_task

Where:

  • memory_list_tasks: Lists vaults.
  • memory_clear_task: Clears a vault; requires passing confirm: true.

Optional Prompt Injection

When enabled, the plugin injects pinned/recent facts from the currently active task into the system prompt of the current agent session.

The injection scope is limited to the task memory corresponding to the current session; memories from other tasks will not appear in this injection block.

Installation and Activation

First, install the plugin to the web profile:

dsh plugin --profile web add "github:wangyihao0001-oss/dsh-task-memory"

After installation, you can verify if the bundle layer exists using:

dsh --profile web --dump-config

After these steps, if you confirm the plugin is loaded, you can start using tools like memory_bind_task, memory_remember, memory_recall, etc., in your session.

To remove the plugin later, use:

dsh plugin --profile web remove dsh-task-memory

Note that vault files are not deleted upon uninstallation. If you need to clean up local data, handle it manually:

~/.dsh/storages/task-memory/

Typical Usage

First, bind a task:

memory_bind_task
taskId: "my-app"

The title parameter is optional.

Then write a fact:

memory_remember
key: "stack"
content: "Node 22 + Postgres"

You can also mark this memory as pinned:

memory_remember
key: "stack"
content: "Node 22 + Postgres"
pinned: true

Then read or search within the same task:

memory_recall
memory_search

If you’re unsure whether the current session is bound to the correct vault, you can run:

memory_current_task

Use Cases and Notes

Suitable for the following scenarios:

  • You want different projects or tasks to use isolated long-term memories.
  • You want recall and search to not return results across tasks.
  • You want to inject a few pinned/recent facts into the current agent session’s system prompt.

Please note before use:

  • Do not store secrets, credentials, tokens, or personal secrets in memory entries.
  • Currently, it is a Host-only bundle and does not have a Web UI for browsing vaults.
  • memory_search is lexical search, not embeddings/vector search.
  • Isolation only applies to task IDs within this plugin; it does not sandbox other parts of DSH.
  • Uninstalling the plugin does not delete vault files; you need to back up or delete them yourself.
  • Pinned entries are not evicted; when a vault reaches the maxEntries limit, new keys are rejected, but updates to existing keys are not restricted by capacity.
  • The directory listing on dsh.pub is for automated contract checking, not a security audit.
  • The plugin runs within the permissions of the current dsh process; review the source code and MIT license before installation.

Links

Directory page:

https://dsh.pub/en/plugins/dsh-task-memory/

GitHub repository:

https://github.com/wangyihao0001-oss/dsh-task-memory