Preface¶
When building agents or engaging in long conversations in DeepSeek Harness (DSH), the context window acts like a scrolling conveyor belt: the longer you chat, the further back the beginning goes; once compressed, the squeezed-out content is truly gone. Common remedies are either stuffing the entire history back (expensive and drowning the key points) or implementing a layer of RAG (often returning only “the most similar fragments,” lacking the “true remembering” of time, importance, and relationships).
dsh-nebula-mind (Memory Nebula) moves “remembering you” from the window to the local hard drive: switch conversations, compress context, restart the app, and memory remains. The maintainer is [Lng-ux], categorized as “Memory” in the SkillHub Plugin Directory; the repository Lng-ux/dsh-nebula-mind is currently at version 0.5.0 in package.json, license MIT, requiring DSH >= 0.2.1-rc.3 and Node >= 20.
Below is an introduction based on positioning, architectural highlights, installation and usage, and applicable boundaries; facts are based on the repository README and package metadata.
What is it?¶
The README’s positioning is clear: It is not a memory store, but a mind. A memory store only manages storage and retrieval; a mind also decides what is worth remembering, when to recall it, and when to let old matters sink. Design constraints are three: memories have a lifespan but not the death penalty (only sink to the deep sea and down-weight, never delete rows); retrieval results come with tags indicating they are literal, semantic, or graph-based; emotions do not participate in a separate recall channel but are used as multipliers for modulation after fusion.
At the start of every conversation, a small snippet of “who I am / who you are / what happened recently” can be automatically injected; when needing to look back at old matters, a hybrid recall is performed once. Data defaults to being stored locally, without relying on stuffing the entire history into the prompt.
Core Functions¶
Six Ledgers and Data Model¶
The data root directory can be modified via the environment variable NEBULA_MIND; inside the ledger is an append-only JSONL (directory name in docs is 心事本/). The six ledgers record facts, profiles, agreements, boundaries, thoughts, and summaries, respectively, with additional longterm.md, vector index vectors.json (doc example is BGE-small-zh, 512 dimensions), etc. Each memory entry carries fields like weight, sink depth depth, source via, mood snapshot mood, etc.; the same event can retain old versions and be tagged with valid_to.
Default data locations:
| Platform | Path |
|---|---|
| Windows | %USERPROFILE%\.dsh\nebula-mind\memory |
| macOS / Linux | ~/.dsh/nebula-mind/memory |
Three-way Retrieval and RRF Fusion¶
Recall is performed in three parallel ways: BM25 literal, BGE-small-zh dense vector, and PPR graph diffusion running on the memory graph. After ranking individually, the three ways are fused using RRF (document gives K = 12, weights approx w_bm25 = 0.40, w_vec = 0.35, w_graph = 0.15). When the query contains emotional words that match the memory’s emotional color, the fusion score is multiplied by emotional modulation; emotion is not a fourth retrieval channel.
Result rows will carry tags similar to [词#3 义#1 图#1] to facilitate determining which channel is at work.
Forgetting: Sinking to the Deep Sea Rather Than Deleting¶
Accessibility A decays following a power law over time (non-exponential half-life), divided into five layers: Core / Hot / Warm / Deep Water / Attic. The nightly consolidate task (document example default 22:05) recalculates the stratification, summarizes, and “floats up” candidates from the deep water—the entire process does not modify or delete JSONL rows. Memories recalled multiple times can float up; the plugin panel allows adjusting the sinking threshold and retrieval weights, taking effect immediately by writing to mind-config.json.
Emotion Engine and Visualization¶
Seven-dimensional moods and seven neurotransmitters participate in weight calculation during writing; the left sidebar provides an interactive Memory Nebula (fixed-orbit layout, can simulate sinking days) and a Mood panel. The semantic model is about 48MB and distributed with the package; inference is done with handwritten numpy, and the README states no need for torch / transformers.
Integration with DSH¶
The plugin registers via cordis.patch.yml; dsh.client in package.json injects the panel slot into the Web side. The host side provides HTTP routes (document mentions 10 /api/dsh-nebula-mind/*), defaulting to trusting only the local loopback address, with write operations requiring a local source.
Installation and Enablement¶
The DSH ecosystem is “everything is a plugin”; SkillHub is the community directory, with no official affiliation to DeepSeek or Fangfang. It is recommended to check the source code and MIT license on the directory page or GitHub before installing—plugins run with the current DSH process permissions and read/write the same user’s ~/.dsh path.
Install from npm (Recommended)¶
dsh plugin passes arguments to pnpm; --profile must be written first:
dsh plugin --profile <你的profile> add dsh-nebula-mind
The profile name corresponds to the directory under ~/.dsh/profiles/; if unsure of the name, you can list them first:
ls ~/.dsh/profiles/
After installation, you must fully exit DSH and restart (terminate the process, not just close the window).
Python and Vector Index¶
Requires running Python 3.10+ (README also mentions semantic side Python 3.8+ and numpy is fine, model is distributed with the plugin). You can rebuild the index after first use or when memory increases (execute in the plugin directory):
python python/embed.py --build
Custom data directory (macOS / Linux example):
export NEBULA_MIND="$HOME/我的记忆"
Typical Usage¶
README “Run in three steps” can verify bookkeeping, recall, and self-check in the plugin’s built-in python/ directory:
# 1) Record the first entry (vector index is calculated simultaneously)
python python/xin.py add "今天聊到了为什么记忆该像海不像硬盘"
# 2) Recall a bit (three-way recall + RRF + modulation)
python python/xin.py recall "记忆为什么像海"
# 3) Self-check: which channels are on, what's missing, what's next
python python/doctor.py
doctor.py checks Python version, data directory, entry counts for each ledger, semantic service and index, mood linkage, nebula generation, etc. Nightly consolidation can be configured via system scheduled tasks or cron calling python/夜间沉淀.py (specific command see README Section 10).
In the DSH interface, you can view the nebula and adjust recall and sinking parameters via the panel; on the conversation side, you can use tools registered by the plugin such as mind_remember (complete tool schema under npm install path; local junction development path has separate instructions in README).
Use Cases and Precautions¶
Suitable for: Cross-session, compression-resistant long-term personal or project memory; desire to visualize memory relationships and manually adjust retrieval weights on the same machine; acceptance of a “do not delete, only sink” forgetting model.
Precautions:
- What is written to the prompt is the content actually stored, do not record sensitive information that shouldn’t enter the conversation context;
心事本/is plain text JSONL, you can back it up or edit it yourself. - README states data is not uploaded by default, no telemetry; installing dependencies or pulling models for the first time historically may involve network (the current package includes the semantic model to reduce this).
- If recall is unsatisfactory, first look at the
词#/义#/图#tags on the results; if the graph path is misleading, you can lowerw_graphin the panel. - After modifying
lib/host.js, you need to restart DSH; Python script changes generally do not require restarting the host.
Conclusion¶
dsh-nebula-mind turns DSH’s long-term memory into an explainable, locally maintainable mind: six ledgers, three-way RRF, power-law sinking, and a nebula panel, revolving around the line “persists across sessions, old matters can be fished out, no physical deletion.” If you want to install or see classification explanations, you can open the SkillHub directory page; design and parameter details are based on the GitHub repository README.