Preface¶
When building agents or engaging in long-term collaboration within DeepSeek Harness (DSH), a common issue arises: rules, preferences, or project background explained in one turn are forgotten by the model in the next; worse still, it “thinks” it remembers but cites outdated notes. The README provides an example using workspace statistics tools: logs showed 13 writes to the knowledge base but only 1 read, and the first write occurred before any read—knowledge was recorded but rarely utilized. The cost of taking notes is low; the real challenge is enabling the model to recall the correct entry in the appropriate context.
Vector retrieval relies on similarity matching, which often leads to fetching incorrect chunks when expressions are close. The following introduction covers the community plugin dsh-knowledge-canvas (Maintainer: NeoHotaru, SkillHub Category: Memory): it allows for manual editing of a tree-structured knowledge base on a sidebar canvas and provides the model with a set of read/write tools. Nodes rely on a trigger line—“When should it be recalled?”—for contextual judgment, rather than embedding similarity.
What is this¶
dsh-knowledge-canvas is a tree-structured knowledge base plugin for DSH: data is stored locally in the workspace, the model reads or writes based on judgment via tools, and you view and modify the structure on the canvas in the right-side “Knowledge Base” panel. A knowledge base (base) is a tree; the end of each node’s body should contain a trigger description starting with “When should it be recalled:”, which is also displayed in the outline to help the model match it to the correct context. If the wrong node is selected, the mismatched entry will be visible on the canvas, allowing you to directly edit that trigger phrase.
The current npm package version is 0.4.1 (subject to package.json). The plugin does not automatically sync to the cloud, nor does it archive entire conversations as logs; only content explicitly written by you or the model enters the database.
Core Features¶
Sidebar Panel and Canvas¶
After installation and restarting DSH, the “Knowledge Base” panel will appear in the sidebar. The top of the panel features search, read counts, and refresh; each base has a row where you can toggle “Read in this session,” view reading progress, and rename, delete, change color, or export via the ⋯ menu. The canvas toolbar supports zooming, fitting to view, default width for the whole library, shapes, colors, and layouts (layers / radial / staircase / compact; switching only recalculates default placement).
Common interactions (excerpted from README):
| Action | Effect |
|---|---|
| Click node | Open editor; click again to close |
| Shift+Enter | Start drawing a link line; press Enter on the target to complete |
| Drag node | Move position; writes to layout.json |
| Press and hold ~0.26s then drag / Drag right from node | Draw orange link line (not changing parent) |
| Alt + Drag | Set target as parent node (gray line) |
| Drag to input box | Hand the node to the current session |
| Bottom “Locate to…” | Enter ID to jump to node |
Node size priority: Current node settings → Base default → Canvas zoom. Starting from 0.4.1, font size and contrast are enhanced; hovering over the thumbnail view allows previewing the full screen. Diary-type bases can switch to a notebook view (monthly directory, paging, revision history, drag to chat), which is independent of encryption, session isolation, and storage methods—it is merely a display layer change.
Tools Available to the Model¶
The README lists the following tools under the section title “Tools the model gets (eight)”:
| Tool | Function |
|---|---|
knowledge_read |
Read base or node; lists bases if base is not passed |
knowledge_create_base |
Create a base with a root node, available immediately |
knowledge_write_node |
Write or modify node, returns new ID to use as parent |
knowledge_link |
Link two nodes with a one-line explanation |
knowledge_remove_node |
Mark node for deletion (recoverable) |
knowledge_unlink |
Remove link, keep node |
knowledge_select |
Toggle a base for this session |
knowledge_remove_base |
Mark base for deletion (recoverable, files not actually deleted) |
knowledge_show_images |
Pass images within nodes to the model |
In Workspace Settings → Knowledge Base, you can configure “Record invocation process” (default off) and indexing/full-text injection methods for each base per workspace. Version 0.4.1 supports mixing full-text and on-demand nodes within the same base, sharing workspace-level policies; on-demand indexing still occupies context. For full-text limits and fallback behavior for large libraries, please refer to MANUAL.md in the repository.
Diary Mode (Optional)¶
A diary toggle can be enabled per session at the top of the panel: when the conversation contains paragraphs worth preserving, the session writes a record. It is not a daily calendar entry, nor is it visible to other sessions. Data is stored as diary-<hash>.json, sealed with AES-256-GCM; it remains session-isolated within the same workspace. Starting from 0.4.1, you can select Reply on the diary page to send the reply and page excerpt (reply max 4000 chars, excerpt max 8000 chars) as a user message to the current Session without altering unsent composer drafts.
Upon first opening the workspace, a base named “How to use this knowledge base” is seeded. As versions upgrade, nodes you have modified will not be overwritten.
Installation and Activation¶
Execute the official installation method in the DSH environment:
npm install dsh-knowledge-canvas
Restart DSH once after installation for the “Knowledge Base” panel to appear in the sidebar. Subsequently, if only panel-side logic is changed, a page refresh is usually sufficient; if host-side index.js or lib/* are modified, DSH must be restarted again.
Typical Usage¶
- Install and restart, open the target workspace, and enter “Knowledge Base” in the sidebar.
- Let the model create a base via
knowledge_create_base, or right-click on the canvas blank space to create a top-level node; use the right-click menu or Alt+drag to establish parent-child relationships for sub-nodes. - Edit the node body, ensuring the “When should it be recalled:…” line is written at the end; use
knowledge_selector the panel toggle to determine if the base is injected into this session. - Use
knowledge_readto read the whole library, index, or single nodes as needed; useknowledge_write_nodeandknowledge_linkin the writing chain to maintain structure and associations. - If you prefer a stream-style record, turn on the diary toggle for this session; to ask follow-up questions on a specific diary page, use Reply in the notebook view.
The data directory is <workspace>/.dsh-knowledge/, stored as plain text JSON, which can be backed up or included in version control; the plugin does not provide accounts or remote sync.
Use Cases and Precautions¶
Suitable for long-term, editable, auditable project memory: architectural conventions, operational memos, personal writing habits, etc., where you want the model to select entries based on “context” rather than lexical similarity. The canvas is suitable for visualizing parent-child and associated relationships; with well-written trigger phrases, mis-recalls can be easily located and corrected on the canvas.
Please note before use:
- The plugin runs with the current DSH process permissions. Before installation, it is advisable to review the GitHub repository source code and license to ensure compliance with your security and compliance requirements.
- It is not an automatic chat archive; content not written will not enter the database.
- Diary sealing prevents accidental file reading but cannot prevent intentional decryption; keys are derived from the base name and can be restored with the source code, so sensitive content requires separate key design.
- SkillHub is a community plugin directory and has no official affiliation with DeepSeek / High-Flyer; installation commands should follow the README. Do not assemble undocumented
dsh plugin addforms yourself.
Conclusion¶
dsh-knowledge-canvas separates and then connects “writing down” and “being useful”: tree structure + trigger phrases + sidebar canvas allow the knowledge base to be edited by you, read/written by the model via tools, and injected per-session within the workspace. For further information, see the SkillHub Catalog Page and GitHub: NeoHotaru/dsh-knowledge-canvas.