Introduction

The plugin ecosystem of DeepSeek Harness (DSH) emphasizes composition and declaration. Plugins can provide capabilities such as tools, storage, and sessions during agent runtime. Long-term memory is a practical requirement: agents need to remember context within a single session and save preferences, project knowledge, experiences, and compressed summaries across sessions.

dsh-agent-memory is the long-term memory plugin for DSH. It provides hierarchical storage, scope routing, toolface, and compressed linkage, allowing the agent to decide what to remember, when to recall, and how to update and archive.

What is this

jonah791/dsh-agent-memory is an agent-driven long-term memory plugin built for DeepSeek Harness (DSH), categorized as a memory plugin, with an MIT license.

Its goal is to provide a cross-session experience library for DSH agents: owner preferences, project knowledge, decision rationale, and learning sediment can be structured to write, retrieved, and organized/compressed.

The current verified status is as follows:

  • Status: v0.3, agent core linkage implemented
  • DSH is preview version 0.1.0-rc, no compatibility promise
  • runtime: host-only
  • envDeps: none, pure logic / standard Node
  • boundary: no special authorization boundary
  • Compatible: cordis ^4.0.1 / dsh-tools ^0.1.0-rc.6
  • Depends on official storage stack: storage / storage-json / storage-domain, web-app bundle provided
  • Tests: 165+ tests / 0 fail

Core Features

Hierarchical Memory

The plugin divides memory into layers, each suitable for different content:

  • L1 fact: Owner preferences, environmental facts, use key for precise overwriting updates
  • L2 knowledge: Reusable knowledge, learning sediment, auto-merge on same title
  • L3 episodic: Situations with results, experience timeline
  • summary: Compressed product, cold archive retention, can be dug deep, high-density indexing

Among them, L3 episodic uses time bucket compression, with granularity of:

Day → Week → Month → Year

Scope

The plugin supports two scopes:

  • global: Global memory, e.g., owner preferences, environmental info, always attached retrieval
  • workspace: Workspace-level memory, routed by project .dsh/memory.yml configuration

workspace-level routing can configure hierarchy, budget, time scale, etc.

Toolface

The plugin exposes the following tools to the agent:

  • remember: Write, overwrite, merge, return id and action
  • recall: Retrieve, supports keyword, hierarchy, tags, time filtering, sorted by relevance and freshness
  • memory_browse: Time pyramid browsing, used for discovery path when you don’t know specifically what is there
  • update / forget: Revise or archive, archived entries do not enter active retrieval but can still be dug deep
  • memory_stats: View counts of each layer, time bucket, archive

Integration with dsh-agent-compact

The plugin can work with dsh-agent-compact to handle session compressed memory sediment:

  1. Session compression completes
  2. checkpoint original text guaranteed saved to episodic
  3. Send inbox notification
  4. wakeup=false, queue without waking up

Whether to refine and how to organize is decided autonomously by the agent, recorded in source.reason. Compression finishes in-process and no longer writes sentinel restart.

Installation and Enablement

First install dependencies and build:

cd <your self-plugins directory>
git clone https://github.com/jonah791/dsh-agent-memory.git
cd dsh-agent-memory
pnpm install
pnpm build

Combined configuration example:

- insert:
    - id: agent-memory
      name: dsh-agent-memory

This configuration declares the plugin id as agent-memory, name as dsh-agent-memory.

The plugin depends on the official storage stack:

storage
storage-json
storage-domain

These capabilities are provided by the web-app bundle.

Typical Usage

The following usages come from the plugin’s verified toolface documentation, suitable as basic paths for daily invocation.

Writing Memory

Use remember to write, overwrite, or merge memory.

  • Preferences, environmental facts can go into L1 fact
  • Reusable knowledge can go into L2 knowledge
  • Situations with results, experiences can go into L3 episodic

After writing, it returns id and action, facilitating subsequent tracking.

Retrieving Memory

Use recall to retrieve existing memory.

Available filtering dimensions include:

  • Keyword
  • Hierarchy
  • Tag
  • Time

Results are sorted by relevance and freshness.

Browsing Memory Structure

When unsure of what is specifically in the library, use memory_browse.

It provides a time pyramid browsing path, suitable for gradually viewing content from coarse-grained time structures.

Revision and Archiving

Use update to revise memory, use forget to archive memory.

Archived memory does not enter active retrieval but can still be dug deep.

Viewing Statistics

Use memory_stats to view:

  • Counts per layer
  • Time bucket counts
  • Archive counts

Local Testing

The test command provided in the plugin repository is:

node node_modules/typescript/lib/tsc.js -p tsconfig.json && node --test

The verified test results are:

165+ tests / 0 fail

Applicable Scenarios and Notes

Suitable for scenarios:

  • Need to provide cross-session long-term memory for agents in DSH
  • Need to distinguish between global memory and workspace memory
  • Need to perform hierarchical, retrieval, revision, archival, and statistics on memory
  • Need to cooperate with dsh-agent-compact to save session compressed checkpoints

Pre-use notes:

  • DSH is currently preview version 0.1.0-rc, no compatibility promise
  • Plugin declares to run as host-only, and has no special authorization boundary
  • Plugin runs with current dsh process permissions, source code and MIT license should be checked before installation
  • Depends on cordis ^4.0.1 / dsh-tools ^0.1.0-rc.6
  • Depends on official storage stack: storage / storage-json / storage-domain

Conclusion

dsh-agent-memory provides a relatively complete long-term memory path for DSH agents: hierarchical writing, scope routing, toolface invocation, time bucket compression, and linkage with session compression plugins. It is not a simple storage extension, but rather leaves “what to remember, how to organize, when to recall” to the agent’s decision, while the framework layer is responsible for storage, routing, retrieval, and compression conditions.

GitHub Repository:

https://github.com/jonah791/dsh-agent-memory

No community directory page URL provided in verified materials.