Introduction¶
DeepSeek Harness (DSH) provides a plugin-based architecture that allows developers to extend system capabilities. When building agents, scenarios such as long-term memory and document retrieval, or RAG use cases, need to be handled. dsh-kb-manager is a plugin for local knowledge base lifecycle management. By using native SQLite indexing and hybrid retrieval, it provides a document management solution for agents without requiring additional services.
Installation and Enablement¶
Before installing this plugin, ensure that DeepSeek Harness is installed in the environment and that the Node.js version is 22.19.0 or higher.
Run the following command to install it:
dsh plugin add github:xiaoshi7915/dsh-kb-manager
After installation, you can use its features via the Web panel or Headless mode.
Core Features¶
This plugin focuses on full lifecycle management of local knowledge bases and includes the following capabilities:
- Multi-format import: Supports importing local files or HTTP(S) URLs into the knowledge base.
- Smart chunking: Uses a CJK-language-aware chunking strategy to better handle Chinese, Japanese, and Korean text.
- Vector indexing: Uses
sqlite-vecfor KNN retrieval without starting an additional vector database process. - Hybrid retrieval: Combines BM25 full-text search and vector search, with results fused via Reciprocal Rank Fusion (RRF).
- Asynchronous task system: Operations such as import and index rebuilding are processed as async tasks, supporting progress querying and cancellation.
- Management features: Provides management capabilities such as soft deletion (instant recovery), physical compaction, snapshot/export/import, and a Web panel.
- Security and auditing: Includes SSRF protection, an import path allowlist, audit logs, and search results marked as
untrusted: trueby default.
Typical Usage¶
After installation, the agent can call related tools to perform operations. A typical workflow is as follows:
- Create a knowledge base: Call
create_kbto create a new knowledge base instance. - Import documents: Call
import_documentto import local files or URLs. This operation returns ajob_id; useget_jobto query import progress. - Search content: Call
search_kbfor hybrid retrieval. The search results always include anuntrusted: trueflag. - Trace sources: To trace sources, call
get_chunkto retrieve the text chunk with its context and metadata. - Deletion operations: Use
delete_documentto delete a document, supporting soft deletion (recoverable by re-importing). Usedelete_kbto delete an entire knowledge base, which requires aconfirm_tokenfor secondary confirmation.
Notes¶
- Prerequisites: It must run in an environment where DeepSeek Harness is installed.
- Version requirement: Node.js >= 22.19.0 is required.
- Security: Search results are marked
untrusted: trueby default, indicating that the content is for data reference only and should not be executed directly as instructions. - Deletion restriction: The
delete_kboperation requires aconfirm_token(60-second TTL) for confirmation to prevent accidental deletion. - Security protection: The plugin includes built-in SSRF protection and an import path allowlist, restricting file import sources.
Conclusion¶
dsh-kb-manager addresses the pain points of local knowledge base management in DeepSeek Harness. By leveraging native SQLite indexing and hybrid retrieval, it provides agents with a lightweight, auditable long-term memory solution. The related directory and source code addresses are as follows:
- Directory page: https://www.skillhub.cn/plugins/xiaoshi7915/dsh-kb-manager
- GitHub: https://github.com/xiaoshi7915/dsh-kb-manager