Preface¶
In the DeepSeek Harness (DSH) architecture, the Agent commonly loses context between sessions. Existing directory-scanning approaches lack semantic structure, making it difficult to reuse project progress. This plugin aims to provide DSH with cross-session persistent memory management capabilities, allowing the Agent to remember task content, progress, and the reasons behind decisions.
Plugin Overview¶
The full name of the plugin is workspace_memory_dsh, maintained by developer LYRA-88. Based on the DSH architecture, it maintains a project_memory/ directory under the session workspace. Through a proposition graph and a three-layer memory funnel, it converts conversational content into a structured node index and injects it into the model context, enabling the Agent to navigate by “covering propositions” rather than scanning untyped directories.
Core Features¶
The plugin includes the following core mechanisms:
- Cross-session persistent memory management: Saves project progress, task states, and key decisions.
- Proposition graph: Groups atomic propositions into covering propositions (nodes) and builds a node network (
nodeEdgesandentryLinks). - Three-layer memory funnel: Each node is divided into
core.md(core facts),regular.md(regular memory), andlog/<sessionId>.md(process log, not vectorized). - Hybrid retrieval: Supports vector retrieval (cosine distance) and lexical retrieval, and merges results using the RRF algorithm.
- Browser-side review panel: Provides preview and confirmation interfaces, allowing the Agent to review memory updates and submit them.
- Bounded node index injection: Injects the structured node index into the model context in a bounded manner.
Installation and Activation¶
The plugin installation path is located outside the code repository. Run the following command to install it:
dsh plugin --profile web add <path-to-this-plugin>
After installation, the dsh web process must be restarted for the changes to take effect.
Usage¶
The plugin provides two invocation methods: client components and remote APIs.
Client Components¶
- MemoryButton (
conversation.input.memory): Opens the memory preview/confirmation panel in the current session’s input area. - MemoryPreviewPanel (
conversation.input.overlay): Reads documents from a bounded subproject, previews update diffs and submits them, and supports binding/unbinding sessions. - MemoryTreeSection (
sidebar.workspaces.memoryTree): Renders workspace memory groups in the sidebar.
Remote API¶
Invoke it through the workspaceMemory namespace. Supported methods include:
* listSubprojects / listSubprojectsByPath
* bindSession / classify / commitClassify
* previewUpdate / commitUpdate
* search
* memoryReindex / memoryStatus
* and methods for deletion, renaming, and session list queries.
Storage and Configuration¶
Under each workspace, a project_memory/ directory is generated, containing .registry.json (registry), manifest.json (Schema 3), vector shards (vec/), and the graph structure (graph.json).
Embedding Configuration¶
The plugin supports configuring an OpenAI-compatible embedding endpoint through api.json. If the configuration is missing or invalid, the plugin automatically falls back to pure lexical mode (Lexical-only) while retaining the graph structure.
{ "embedding": { "baseUrl": "https://…/v1", "apiKey": "sk-…", "model": "text-embedding-3-small" } }
Use Cases and Notes¶
The plugin is specifically designed for Session Memory, mainly used to save and restore project progress, task states, decision rationale, and next-step plans. It is not built for large knowledge bases or general long-term storage systems, and is suitable for workflows completed within a few to about a dozen sessions.
- Runtime dependency: It must run in tandem with a DSH host (CLI or web process).
- Version migration: Early versions (manifests with a
dimensionstree) are migrated automatically on first load. - Permissions and security: Check the source code and license (MIT) before installation.
Summary¶
Through a structured proposition graph and a three-layer funnel, the plugin provides DSH Agents with a controllable cross-session memory mechanism. By using hybrid retrieval and a browser-based review panel, it helps maintain context coherence while reducing the complexity of memory management.