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-vec for 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: true by default.

Typical Usage

After installation, the agent can call related tools to perform operations. A typical workflow is as follows:

  1. Create a knowledge base: Call create_kb to create a new knowledge base instance.
  2. Import documents: Call import_document to import local files or URLs. This operation returns a job_id; use get_job to query import progress.
  3. Search content: Call search_kb for hybrid retrieval. The search results always include an untrusted: true flag.
  4. Trace sources: To trace sources, call get_chunk to retrieve the text chunk with its context and metadata.
  5. Deletion operations: Use delete_document to delete a document, supporting soft deletion (recoverable by re-importing). Use delete_kb to delete an entire knowledge base, which requires a confirm_token for 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: true by default, indicating that the content is for data reference only and should not be executed directly as instructions.
  • Deletion restriction: The delete_kb operation requires a confirm_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