Introduction

DeepSeek Harness (DSH) uses a plugin-based architecture. During runtime, an agent generates a large amount of context. How to persist this knowledge and prevent information loss or accidental modification is a fundamental problem in building long-term agents. dsh-memory is a memory system plugin designed to solve this problem. It provides a complete workflow from data ingestion, five-way recall, and encrypted storage to session transcription, helping developers build structured and auditable memory systems.

Core Features

This plugin mainly includes the following capabilities:

  1. RRF Five-Way Recall
    Evidence sources are divided into five paths and fused: L1 rules (MEMORY.md / USER.md), L2 session full-text search (FTS5), L3 semantic search (optional), L4 Wiki, and L5 time window. It finally generates a ranked list with trust labels.

  2. Confirmation-Based Writes
    Memory files are not modified directly. memory_suggest is used to submit write proposals, then memory_confirm or memory_reject decides whether to adopt them. This mechanism includes budget checks, sensitive pattern scanning, and automatic trigger: label generation to ensure safe writes.

  3. Fernet Encrypted Vault
    Sensitive information is stored in VAULT.md.enc, and plaintext appears only in the form of a → vault:<ref> reference.

  4. Session Transcription
    DSH session logs are continuously indexed into FTS5 storage for later knowledge extraction and skill distillation.

  5. Maintenance Tools
    Provides health checks, Git backup, hit-rate auditing, and asset deduplication.

Installation and Configuration

Install the plugin by running the following command:

dsh plugin --profile web add github:boomzikazita/dsh-memory

After installation, the plugin automatically registers tools and hooks (such as primer recall injection, write guards, and session transcription). Python scripts are located in the scripts/ directory and are executed on demand by the Node host.

Configuration is mounted through cordis.patch.yml and can override default paths. For example:

- insert:
    - id: dsh-memory
      name: 'dsh-memory'
      config:
        memoryDir: '~/.dsh/memories'
        # wikiRoot:  '~/wiki'            # 环境变量 DSH_WIKI_ROOT 也可用
        # primerBudget: 800

Tool Usage

Tool Description
memory_recall Performs five-way RRF recall, supports date= time-window queries and deep=true deep search
memory_graph Traverses the entity relationship graph, including curated edges and automatic co-occurrence edges
memory_suggest Submits a memory write proposal; can specify track (memory/user/skill) and lifecycle
memory_confirm Accepts pending proposals and writes them to L1 files
memory_reject Rejects pending proposals
memory_vault_get Reads encrypted vault entries
memory_vault_set Writes encrypted vault entries
memory_harvest Transcribes session logs into the L2 FTS5 index and extracts correction signals
memory_health Outputs health reports for each hierarchy (L1 budget, Vault decryption, index status, etc.)
memory_backup Performs Git commit + push of the memory directory
memory_notify Pushes messages to Feishu/Lark chats
check_assets Checks asset deduplication before creating new scripts/skills

Dependencies and Environment

  • Node side
    Requires @deepseek-ai/dsh-tools and @deepseek-ai/dsh-llm. Both are declared as peer dependencies, and the version must be >=0.1.0-rc.6.

  • Python side
    To use advanced features such as recall, graph, vault, and harvest, Python 3 and SQLite 3 must be installed. Vault functionality additionally depends on the cryptography library (for Fernet).

If the Python environment is missing, the tools degrade gracefully and report an error; some basic features may be unavailable.

  • Optional feature configuration
  • Feishu/Lark push: Set LARK_APP_ID and LARK_APP_SECRET (environment variables or ~/.env).
  • L3 semantic recall: Set DSH_HONCHO_MCP_URL and DSH_HONCHO_MCP_TOKEN to point to an MCP endpoint that exposes honcho_search. If not set, the L3 layer is silently skipped.

Applicable Scenarios and Precautions

This plugin is suitable for agent developers who need to build long-term memory in DSH, strictly manage knowledge base write permissions, or integrate external knowledge bases (such as Wiki).

Note: The plugin runs with the permissions of the current DSH process. It is recommended to check the source code and license (MIT) before installation. All configuration items can be overridden. Ensure that the memoryDir path has sufficient read and write permissions.

Summary

dsh-memory provides a complete memory management solution, covering everything from data ingestion to retrieval and encryption. For developers who want to improve the memory capability and controllability of agents, this is a practical option.

Plugin Directory
GitHub Repository