DeepSeek Harness plugin

dsh-kb-rag

Local-first RAG knowledge tools for DSH: kb_query / kb_ingest / kb_crawl / kb_related, backed by the kb-rag Python pipeline (Ollama bge-m3 + ChromaDB + SiYuan). Zero API cost, data never leaves your

Jump to install

Source facts

Repository
YuMu247/dsh-kb-rag
Latest update
Aug 15, 2026
Category
Docs & Rendering
GitHub stars
1
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/YuMu247/dsh-kb-rag
Plugin: dsh-kb-rag
Author: YuMu247

Check the source files

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

File explorer3 files
README.mdSource · read only

@dsh-external/dsh-kb-rag

Local-first RAG knowledge tools for DSH — thin tool wrapper around the kb-rag Python pipeline (Ollama bge-m3 + ChromaDB + SiYuan). Four tools, all on-premises, zero API cost, your documents never leave the machine.

ToolWhat it doesBacking script
kb_querySemantic search over your local vector DB (top-k chunks with source + similarity)query.py --json
kb_ingestIngest a docs directory into ChromaDB (incremental, manifest hash-idempotent; Shiyu notes auto-stripped of front-matter + machine layer)ingest.py
kb_crawlBatch-crawl URLs to clean Markdown (Scrapling + markdownify)crawl.py
kb_relatedRelated-document recommendations: retrieval-style, graph-style knowledge walk, or from a known docrelated.py

The plugin is a pure forwarder: it locates Python, spawns the kb-rag scripts and parses their output. All knowledge-base logic lives in the Python project, which you can also use standalone.

Install

# requires a dsh build with the `dsh plugin` subcommand; <profile> = tui/headless/web/...
dsh plugin --profile <profile> add github:YuMu247/dsh-kb-rag
dsh --profile <profile>        # restart: kb_query / kb_ingest / kb_crawl / kb_related injected

Peer dependencies (@deepseek-ai/dsh-tools, @deepseek-ai/cordis) are provided by the dsh profile.

Prerequisites (one-time, on the host)

# 1. the Python pipeline
git clone https://github.com/YuMu247/kb-rag
pip install -r kb-rag/requirements.txt

# 2. Ollama + embedding model
ollama pull bge-m3        # ~1.2GB

# 3. tell the plugin where kb-rag lives (either one)
#    a) plugin config:  kbRagDir: "/path/to/kb-rag"
#    b) env var:        KB_RAG_DIR=/path/to/kb-rag
#    c) default:        ./kb-rag under the session working directory

# 4. ingest something, then ask
python kb-rag/ingest.py --docs /path/to/docs

Optional (Windows daily sync): examples/sync_daily.cmd in the kb-rag repo starts Ollama, syncs Shiyu video notes, ingests and imports into SiYuan.

Tool arguments

  • kb_queryquery (required), k (default 5, max 20). Returns {ok, count, chunks:[{source, chunk, similarity, text}]}.
  • kb_ingestdocs (default <kb-rag>/docs), force, reset, heading, chunkSize (default 512), overlap (default 64). Returns {ok, summary}.
  • kb_crawlurls (array) or urlsFile (path), out (default <kb-rag>/out), delay (default 1.5s, min 0.2). Returns {ok, summary, outDir}.
  • kb_relatedseed or fromDoc (exactly one), k (default 5), graph (>0 enables graph-style walk). Returns {ok, text}.

Plugin config

All keys optional, set in the profile plugin config:

KeyDefaultMeaning
pythonCmdpython (win) / python3 (other)Python executable
kbRagDirKB_RAG_DIR env, then <cwd>/kb-ragkb-rag checkout directory

Development

npm install                 # typescript + @types/node + dsh-tools/cordis types (compile only)
npm run typecheck           # tsc -b

Runtime has zero npm dependencies; src/ is the source of truth and lib/ the compiled copy (both shipped).

中文说明

DSH 的本地优先知识库插件:kb_query(语义检索)/ kb_ingest(增量入库)/ kb_crawl(网页批量抓取)/ kb_related(关联推荐),底层调用 kb-rag Python 管线(Ollama bge-m3 + ChromaDB),全程本地、零 API 成本。安装:dsh plugin --profile <profile> add github:YuMu247/dsh-kb-rag。前置:克隆 kb-rag、pip install -r requirements.txtollama pull bge-m3,并用配置 kbRagDir 或环境变量 KB_RAG_DIR 指明 kb-rag 路径。

License

[MIT](LICENSE)