Plugin directory / Developer / knowlp-rag
knowlp-rag
Verified · install-tested on dsh wly8691-jpg
What it does
KnowLP-RAG: dual knowledge graph retrieval for Markdown notes - MCP stdio server for DeepSeek Harness (dsh) & Claude Code
Works — verified, early-stage project
KnowLP-RAG: dual knowledge graph retrieval for Markdown notes - MCP stdio server for DeepSeek Harness (dsh) & Claude Code It installs cleanly and boots without issues in our testing. It's early-stage but functional.
“Verified” means our automated CI actually ran dsh plugin add in a clean profile and it booted — nothing more. Feature descriptions and version compatibility are the author’s claims. This is not a security audit and not an endorsement of third-party code.
README
KnowLP-RAG
双图检索 + 衰减遗忘的记忆插件 —— 把你的 Markdown 笔记建成会"用进废退"的知识图谱,给 DSH / Claude Code 提供带阅读路径的检索:该读哪几篇、按什么顺序读、哪篇是相似替代。
快速开始(3 步)
# ① 安装(npm 官方源)
dsh plugin add "@eqman00003/knowlp-rag"
# ② 必配两个环境变量(不配则双图引擎空转,只剩全文搜索)
export KNOWLP_VAULT="$HOME/Notes" # 你的 Markdown 笔记目录
export KNOWLP_GRAPH_DIR="$HOME/.knowlp-dsh" # 可写索引目录
# ③ 重启 dsh web,首次搜索触发 Python 环境自举(约 30s,勿中断)
五个工具
| 工具 | 作用 |
|---|---|
knowlp_search |
四引擎扇出检索(双图 P/S-Agent + 向量 + 全文) |
knowlp_get_note |
读笔记内容(只读,防路径穿越) |
knowlp_stats |
引擎/图健康度自检(排障第一入口) |
knowlp_record_feedback |
显式反馈(权重闭环唯一入口) |
skill_search |
技能索引检索 |
文档
- 安装与使用说明:docs/usage.md
- 排障手册:docs/troubleshooting.md
- dsh 接入细节(环境变量/Cordis 插件):dsh/README.md
为什么是 KnowLP?
Grep 搜 "RAG architecture" 给你 105 个文件。KnowLP 给你 3 条带依赖上下文的排序命中。
grep |
朴素向量库 | KnowLP | |
|---|---|---|---|
| 结果排序 | ❌ | ✅ | ✅ |
| 依赖链(P-Agent) | ❌ | ❌ | ✅ |
| 相似替代(S-Agent) | ❌ | ❌ | ✅ |
| 无 GPU 可用 | ✅ | ❌ | ✅(n-gram 模式) |
| 越用越好(反馈) | ❌ | ❌ | ✅(权重闭环) |
| 段落级匹配 | ❌ | ❌ | ✅ |
| 衰减遗忘(用进废退) | ❌ | ❌ | ✅(半衰期三档) |
区别:向量搜索找"包含关键词"的文档;KnowLP 找"因你的查询而该读"的文档,附阅读路径。笔记间的权重随使用演化——被消费的边加强,长期不用的边按半衰期衰减(过程性 1 天 / 一般 30 天 / 陈述性永不)。
Demo
$ knowlp_search "RAG architecture"
1. [HIT] RAG检索架构.md (score 0.77)
2. [LINK] 向量数据库选型.md (score 0.61) ← 前置依赖链
3. [LINK] 检索评估踩坑记录.md (score 0.42)
4. [LINK] _索引-阅读顺序 (depth 1) ← 告诉你从哪里读起
5. [LINK] _索引-相关概念.md (depth 2)
本地开发
git clone https://github.com/wly8691-jpg/knowlp-rag.git
cd knowlp-rag
pip install -e . # 生成 knowlp-mcp / knowlp-build / knowlp-search
# config.yaml 里配 vault → 建图 → 检索
python build_graph.py
python knowlp_search.py "RAG architecture"
Install
Install the catalog once, then DeepSeek Harness can find and install any plugin from this site automatically:
dsh plugin add dshbase-catalog Then say "install knowlp-rag for me" — your agent finds it in the directory and installs it. Docs: dshbase-catalog · verified packs.
This plugin is GitHub source (not published to npm) — install it straight from the repo:
Web profile:
dsh plugin --profile web add github:wly8691-jpg/knowlp-rag Headless (CLI) profile:
dsh plugin --profile headless add github:wly8691-jpg/knowlp-rag Test report
Verified: L1 install + L2 load + L3 runtime from GitHub source on dsh 0.1.0-rc.6.
When to use it
Extend the agent's coding surface — give it a new tool, workflow, or integration so it handles a dev task it couldn't before.
Who it's for
Developers who want dsh to behave like a teammate on real codebases — editing, running, and verifying changes rather than just answering.
For developers — extending it
The tool/command surface is the seam: expose more of the SDK, add smarter context wiring, or tighten the loop between code changes and verification.