dsh-engram-relay: A Cross-session Hierarchical Memory and Causal Recall Plugin for DeepSeek Harness
yjh051108/dsh-engram-relay
DSH plugin for cross-session layered memory with hash×semantic×causal ultra-sparse recall, 13 engram_* tools.
Provides cross-session memory for DeepSeek Harness, using hash addressing, semantic re-ranking, and causal propagation for ultra-sparse recall, helping the model retain long-term context.
dsh plugin --profile web add github:yjh051108/dsh-engram-relay- Category
- Memory & Context
- Platform
- DSH-Plugin
- Author
- yjh051108
- Distribution
- Plugin
dsh-engram-relay Key Features
dsh-engram-relay Repository

dsh-engram-relay Repo Summary
dsh-engram-relay is a memory and context plugin (DSH plugin) for DeepSeek Harness (DSH), maintained by yjh051108 under the BSD-3-Clause license, last updated in 2026-08. It addresses three pain points of cross-session memory: deterministic addressing, semantic re-ranking, and causal tracing. Core capabilities include N-gram hash O(1) addressing, a three-channel pure-algorithm semantic engine (zero external models), causal graph propagation, hierarchical memory (global/project/session), and 13 engram_* tools.
What core features does the dsh-engram-relay DSH plugin support?
It provides a unified memory graph (Obsidian-style bidirectional links + causal bidirectional tracing + self-organizing clustering) with progressive disclosure (entry summary + on-demand expansion). Layer assignment is autonomously decided by AI: global (persistent across sessions), project (persistent per project), and session (temporary). The hybrid retrieval pipeline is: hash coarse filtering → three-channel re-ranking → causal propagation → ultra-sparse injection. It coexists with the official compact, preserving details before folding.
How to install dsh-engram-relay?
Requires Node ≥ 18. The core semantic engine is zero-model, zero-dependency, and works out of the box. Installation command:
dsh plugin --profile web add github:yjh051108/dsh-engram-relay
Optional enhancements (not required): built-in int8 quantized bge-small-zh model (~24MB, TS ONNX lazy-loaded) or Python 3.10+ loading local fp32 bge-small-zh-v1.5, configured via embedModel or environment variable ENGRAM_EMBED_MODEL.
What engram_* tools does dsh-engram-relay provide?
It offers 13 tools: engram_recall (on-demand recall), engram_store (write memory with AI-autonomous layering), engram_propose (propose memory requiring confirmation), engram_confirm/engram_reject (confirm/reject pending), engram_open (expand entry), engram_search (inventory graph), engram_link (explicit linking), engram_update (modify node), engram_remove (delete node), engram_promote (promote layer), engram_weave (weave cleaning), and engram_status (view status).
How does dsh-engram-relay configure layering and visibility?
Configure via profile patch (e.g., ~/.dsh/profiles/web/cordis.patch.yml). Layers: global (visible to all sessions), project (same working directory), session (temporary for current session). At session end, only session-layer memory is cleared; global/project persist across sessions. Recall filters by viewer perspective to ensure privacy and isolation.
Which DeepSeek Harness versions and platforms are compatible with dsh-engram-relay?
As a DSH plugin, it depends on official runtime packages (e.g., @deepseek-ai/dsh-client-runtime) and supports Node ≥ 18 across platforms (Windows/Linux/macOS). The core semantic engine has zero external dependencies; optional vector cache enhancement supports TS ONNX and Python fallback.