A local memory plugin for DeepSeek Harness: memories are stored in a local SQLite file, using BM25 keyword recall combined with emotion bucketing, same-day context, and exponential decay ranking. At the start of a session, it compresses "who this is, where we left off, and what to ask next" into no more than 250 characters and inserts it into the system prompt.
Stars 25
Reasons
- The two tools, neuron_opening and neuron_handoff, specifically address the issue of losing context when switching sessions: at the end of a session, only the topic, progress, next questions, and an emotion score are recorded, allowing the next session to pick up directly.
- Working memory uses decided_at / supersedes to mark "which decision is currently valid"; superseded old decisions sink to the bottom rather than being deleted. Scope distinguishes between private chats, group chats, and work, ensuring that group chat recall does not access private chat content.
- The author honestly documents limitations: v0.2.0 fixed a bug where regex swallowed all Chinese characters, causing shared-word edge creation to never take effect, and admits that previous ranking was actually based on importance. Self-designed 18 tests showed that graph diffusion (1 hops) hit rates remained unchanged while noise increased from 33% to 64%, so it is disabled by default.
Usage
- Requires Node ≥ 22.15 and DSH ≥ 0.1.7; run node install.mjs (copies to profile, registers, and self-checks) or dsh plugin add link:<this directory>, then restart DSH to see the tools and settings page.
- To connect to an existing memory library or adjust the half-life, configure db, halfLifeDays, autoSync, etc., in the profile's cordis.patch.yml; by default, only 7 tools are exposed, and the remaining 5 are released only when advanced: true is set.
Risks
- Auto-sync is enabled by default: every 10 minutes, it reads session files from the last 2 days in ~/.dsh/sessions/ and stores user messages in a local table; set autoSync: false if you do not want this.
- v0.2.0 includes breaking changes (decay changed to exponential, HTTP write operations changed to POST), so old panels must be upgraded synchronously; evaluation is based only on the author's self-designed 18 questions, with a small sample size.