DSH-Self-Improved: DeepSeek Harness Local Long-Term Memory and Self-Evolution Plugin

Preface

The extension method of DSH tends to be plugin-based. For local agent scenarios where user preferences, facts, and instructions need to be preserved across multiple sessions, the common practice is to manually maintain context or attach external state. dsh-self-improved turns this into a plugin: it extracts key points from conversations, stores them in a local SQLite database, injects relevant memories before subsequent conversations, and distills reusable workflows into dsh-skill.

What This Is

dsh-self-improved is a DeepSeek Harness plugin maintained by madage, positioned as a long-term memory and self-evolution plugin. The current version is 0.1.1, licensed under MIT, requiring Node >=22.16.0.

It breaks down memory processing into four layers:

L0 Conversation Capture → L1 Memory Extraction → L2 Scenario Summarization → L3 User Profiling

Storage uses local SQLite, with related retrieval components including FTS5 and sqlite-vec. The README states that no data is uploaded anywhere.

Core Capabilities

  • Automatically extracts key points (facts / preferences / events / instructions) from conversations into local memory storage.
  • Automatically injects relevant memories before each new conversation turn.
  • Consolidates, decays, and corrects memories.
  • Successful workflows can be distilled into reusable skills (dsh-skill).
  • User profiles evolve continuously with conversations.
  • Provides the /memory command, a settings panel, and a memory browser.

Installation and Enablement

One-Click npm / Plugin Marketplace Installation

First, run the installation command:

dsh plugin --profile web add dsh-self-improved

Restart dsh after installation. Starting from 0.1.1, this plugin declares dsh.bundle and will be automatically mounted after installation—no need to insert it again at the profile level.

Installing from GitHub

Run:

dsh plugin --profile web add github:madage/dsh-self-improved

Then restart dsh.

Handling Startup or Session Restoration Failures

If a plugin declaring dsh.bundle is repeatedly inserted at the profile level, causing a startup crash, reset the profile-level cordis.patch.yml to [].

If pnpm installs peerDependencies as physical copies, leading to persona registration conflicts during old session restoration, you need to use dsh’s self-repairing symlink layout, or set the following in the profile’s .npmrc:

auto-install-peers=false

Configuration

Configuration is written under the dsh-self-improved node in $DSH_HOME/settings.yaml. The top-level fields include enabled, modules, and review:

# $DSH_HOME/settings.yaml
dsh-self-improved:
  enabled: true
  modules:
    # Fill in according to the module entries provided in the plugin settings panel / documentation
  review:
    # Fill in according to the review entries provided in the plugin settings panel / documentation

Turning off the master switch stops all background timers and unregisters /memory and memory tools. Stored memories are retained and will be restored when re-enabled.

Typical Usage

Query local memories:

/memory

This command directly queries the local memory storage with zero LLM cost.

Manually trigger full evolution:

/memory evolve

Manage memories through the settings interface:

Settings → “Self-evolving memory” → “Memory”

In this tab, you can view, filter, correct, and forget memories, as well as view profiles, scenarios, and skills.

Applicable Scenarios and Considerations

dsh-self-improved is suitable for scenarios in local DSH web profiles that require cross-session memory, memory maintenance, and skill accumulation. It generates and saves memories from conversations, so the scope of enablement should be evaluated based on data sensitivity.

The plugin declares fully local operation—the README states that no data is uploaded anywhere. It also runs with the current dsh process permissions. Still, source code, dependencies, and licenses should be reviewed before installation.

Architectural note: This plugin is inspired by TencentDB Agent Memory but is an independent implementation with no affiliation to Tencent.

Acquisition

GitHub: https://github.com/madage/dsh-self-improved

Owner: madage

License: MIT

Version: 0.1.1

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

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

Xiaoye