DeepSeek Harness plugin

dsh-knowledge-graph-fango199

Durable knowledge graph for DeepSeek Harness agents: remember lessons/patterns/decisions, FTS5 search across sessions. Zero dependencies (node:sqlite).

Jump to install

Source facts

Repository
fango19961106-dotcom/dsh-knowledge-graph
Latest update
Aug 18, 2026
Category
Docs & Rendering
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/fango19961106-dotcom/dsh-knowledge-graph
Plugin: dsh-knowledge-graph-fango199
Author: fango19961106-dotcom

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer2 files
README.mdSource · read only

dsh-knowledge-graph

Durable knowledge graph plugin for DeepSeek Harness (DSH).

Gives every agent session three model-facing tools backed by one embedded FTS5 database — so lessons, patterns and decisions survive session ends, preset switches and process restarts:

ToolPurpose
kg_rememberPersist a lesson / pattern / decision / field note / false positive
kg_searchBM25 full-text recall across everything ever remembered
kg_recentNewest entries — cheap context refresh at session start

Extracted from the agent-knowledge-graph architecture (L1 entries → L3 BM25 recall → L4 memory), compressed into a single zero-dependency plugin.

Features

  • Zero npm dependencies — storage is Node's built-in node:sqlite (FTS5, WAL mode, porter tokenizer)
  • One file, one store~/.local/share/dsh-knowledge-graph/knowledge.db (respects $XDG_DATA_HOME), shared by every session and preset in the profile
  • Triggers keep FTS in sync — insert/delete triggers, no manual reindex
  • Sanitized MATCH input — model-supplied queries are stripped of FTS operators; malformed input falls back to recent-listing instead of erroring
  • Clean unload — the DB handle closes when the plugin unloads (Cordis effect unwinding)

Install

Requires Node >= 22.5 (for node:sqlite).

# from a checkout
git clone https://github.com/fango19961106-dotcom/dsh-knowledge-graph
cd dsh-knowledge-graph

Then add to a DSH profile (a running dsh is a plugin tree composed of bundles — add this as an out-of-tree plugin):

mkdir -p ~/.dsh/plugins
cp -r . ~/.dsh/plugins/dsh-knowledge-graph

and list it in your profile's cordis.patch.yml:

- insert:
    - id: knowledge-graph
      name: '~/.dsh/plugins/dsh-knowledge-graph/src/index.ts'

(or install from npm once published: npm i dsh-knowledge-graph, then reference dsh-knowledge-graph by name in the patch file).

Tool contract

kg_remember:

{
  "kind": "lesson | pattern | decision | field_note | false_positive",
  "title": "One-line imperative summary",
  "body": "Self-contained note: what happened, the rule, the evidence",
  "tags": ["optional", "keywords"],
  "project": "optional-scope"
}

kg_search / kg_recent return ranked hits with «highlighted» snippets (FTS5 snippet()).

Verify without a model

node --experimental-strip-types -e "
import('./src/store.ts').then(async m => {
  const s = new m.KnowledgeStore('/tmp/kg-test.db');
  s.remember('lesson', 'Pin third-party action SHAs', 'Tag-pinned actions can be mutated; @vX tags are moveable refs.', ['supply-chain'], 'dsh-plugin');
  console.log(JSON.stringify(s.search('supply chain'), null, 1));
  s.close();
})"

License

MIT