Preface

In agent development, context windows are limited and sessions are often interrupted, making it hard for an Agent to maintain memory of project constraints, historical decisions, or long-term preferences. DSH (DeepSeek Harness), as a modular plugin ecosystem, needs an accompanying solution to this persistence problem. When an Agent needs to reuse old information in a new session, traditional approaches relying on external databases or vector retrieval often add complexity.

dsh-echo-memory is a DSH-specific cross-session persistent memory plugin maintained by JxaMe. It aims to enable the Agent to remember user preferences, project constraints, and finalized decisions, and to automatically recall them in subsequent sessions.

Plugin Overview

dsh-echo-memory is a cross-session persistent memory plugin dedicated to DeepSeek Harness (DSH).

  • Core positioning: minimal, purely local, no vectors, no database.
  • Maintainer: JxaMe.
  • License: MIT.

It persists memories in a local memory.json file on the user’s machine. The data is human-readable, written atomically, and survives restarts.

Core Features

Model-side (Host half) — how memories are input and output

  1. Five memory tools: The plugin provides five tools: memory_save (save), memory_search (search), memory_forget (delete), memory_restore (restore), and memory_suggest (suggest). The Agent can call them directly during conversation.
  2. On-demand recall injection: Before each model request, the plugin extracts a query from the user’s question, calculates relevance with BM25F scoring, and appends relevant memories to the conversation context, rather than broadcasting all memories.
  3. Natural conversational saving: No fixed phrasing is required. You can simply say, “Remember XX for me,” and the Agent will call memory_save to persist it.
  4. AI-suggested memory: In each conversation turn, the AI can autonomously distill preferences, constraints, or decisions worth remembering, then call memory_suggest to ask the Dock for confirmation. The memory is stored only after the user confirms it.

Storage and Retrieval

  1. Purely local JSON storage: Data is stored in memory.json, with no vector database and no API Key required. Retrieval uses the BM25F algorithm, combining title, tags, strength, and freshness.
  2. Same-content reinforcement: When the same memory is saved repeatedly, its strength increases by 1 and its timestamp is refreshed, instead of stacking duplicate records.
  3. Workspace isolation: Memories are isolated by workspace (project), while also supporting global * sharing, ensuring that project memories do not cross-contaminate.
  4. Deletion modes: Supports “tombstone deletion” and “hard deletion.” By default, in tombstone mode, deleted records are moved to the trash and can be restored; in hard deletion mode, they are physically removed.

Browser UI (Client half)

  1. Site-wide floating anchor UI: A floating anchor appears in the bottom-right corner. It supports drag-to-move and double-click-to-reset.
  2. Drag-select to save: Select any text on a web page, drag it to the anchor or panel, and release it to save, without opening the panel.
  3. Management panel: Provides a memory list with search suggestions, editing, deletion, copying, and filtering by workspace.
  4. Recall History tab: Shows which memories the model recently cited. You can view this in the “Recall History” tab of the anchor panel.
  5. Transient recall bubble: When relevant memories are matched, a bubble appears in the bottom-right corner for 6 seconds. It does not interrupt when irrelevant.
  6. Settings card: You can configure the injection toggle, maximum number of recalled memories, maximum length of recalled text, and deletion mode. Settings take effect immediately after being saved.

Reliability

  • Corruption self-healing: If the memory.json file is corrupted, the plugin automatically isolates it by backing it up as memory.json.corrupt-<timestamp> and starts with an empty store. The panel displays a one-time recovery notice.

Installation and Activation

This plugin is only compatible with DSH 0.1.2-rc.1. The installation command is as follows (using the web profile as an example; replace web for other profiles):

dsh plugin --profile web add github:JxaMe/dsh-echo-memory

After installation, restart the DSH service to take effect. To verify, check whether the service log contains [dsh-echo-memory] loaded, or confirm on the DSH settings page whether the “Memory (dsh-echo-memory)” card appears.

Typical Usage

  1. Natural conversational saving: Say in the conversation, “Remember that this project uses pnpm workspaces.” The Agent calls memory_save to persist it and echoes a confirmation.
  2. Q&A reuse: Say in the conversation, “Do you remember what package manager this project uses?” The Agent in a new session can answer directly.
  3. Memory retrieval: Say in the conversation, “Search memories about deployment.” The Agent calls memory_search and injects relevant content into the context.
  4. Memory deletion: Say in the conversation, “Delete that memory about xx.” The Agent first searches for the ID and then executes the deletion.
  5. Web page drag-and-drop: Select a passage of text in the browser, drag it to the floating anchor in the bottom-right corner, and release it to save the text directly.

Use Cases and Notes

  • Use cases: Developers who need to provide long-term memory to DSH Agents, workspace-level project context isolation, and purely local data management.
  • Version dependency: Only compatible with DSH 0.1.2-rc.1. During the DSH 0.x stage, APIs may have breaking changes. It is recommended to rely on the peerDependencies in package.json.
  • Environment limitations: The plugin runs with the permissions of the current DSH process. Check the source code and license before installation.
  • Other notes:
    • Purely local, no vectors, no database.
    • The minimal preset does not enable the AI-suggested memory feature.
    • The Service API is unstable. The plugin only exposes tools and HTTP routes externally, and does not promise stability of the ctx.memory service API.

Ending

dsh-echo-memory solves the pain point of cross-session memory for DSH Agents through a minimal architecture and floating anchor interaction. It does not rely on external databases, uses the BM25F algorithm for efficient retrieval, and supports workspace isolation and corruption self-healing. It is suitable for developers who care about data privacy and minimal deployment.