Introduction¶
DeepSeek Harness (DSH) uses an “everything is a plugin” architecture. In agent development and collaboration, temporary files and knowledge within a session often become invalid when the session ends, leading to fragmented team knowledge. The dsh-kb plugin aims to solve cross-session and cross-person knowledge sharing and accumulation. It provides a fixed, searchable team knowledge base that is accessible through the sidebar. Unlike dsh-file-share, which manages only the session workspace, dsh-kb manages long-term, fixed knowledge bases.
Core Design¶
dsh-kb is built based on the Karpathy LLM Wiki pattern and includes three core layers:
- raw (immutable materials): original files uploaded by users (such as logs and screenshots). The server forces files into the
raw/directory and rejects overwriting. - wiki (documented knowledge): structured articles processed by Agents according to agreed conventions.
- schema (conventions): defines the processing rules for the current knowledge base, with each knowledge base independent.
The default storage path is ~/.dsh/kb/, including raw/, wiki/, index.md (catalog), log.md (operation log), and schema.md (processing conventions).
Main Features¶
- Full-page knowledge base: Access it from the sidebar. The left side has a catalog tree (supports lazy loading for wiki/raw), and the right side is used for reading or searching.
- Multiple knowledge bases: Supports creating multiple knowledge bases (material libraries or output libraries); you can switch or remove them in the interface.
- Editable library conventions: Each knowledge base can have its own
schema.md, used to specify page specifications, directory purposes, and processing workflows. Changes take effect immediately after saving. - Automatic distillation: After materials are uploaded, they are queued and processed serially into articles by the
kb-botsession according to the schema. Manual specification is also supported. - Full-text search: Built-in zero-dependency scanning supports case-insensitive full-text search and highlighting.
- Ask AI: Enter a question in the search box and click “Ask AI”. The system automatically searches for and cites matched pages, allowing the Agent to answer with supporting evidence.
- Version history: wiki pages are automatically snapshotted, retaining the most recent 50 versions, with support for viewing and rollback.
- Page feedback loop: The reading page provides a feedback entry point. After submission, the Agent can automatically revise the page content based on the feedback.
- Staleness hints: Automatically marks pages not updated for more than 90 days.
- Download/export: Supports downloading any document as markdown or plain text.
Installation and Enablement¶
Run the following command in the terminal to install the plugin:
dsh plugin --profile web add @weibaohui/dsh-kb -w
After installation is complete, restart the dsh web process to make the configuration take effect.
Supporting Agent Skills¶
The Agent’s processing and accumulation capability depends on supporting skills. Please install skill/dsh-kb/ from the skill marketplace. After installation, the Agent will have the ability to query, perform two-step processing, annotate contradictions, and follow logging discipline.
Usage Flow¶
- Browse and search: Click “📚 Knowledge Base” in the sidebar. Enter keywords in the top search box and press Enter for full-text search, or browse the catalog in the tree on the left.
- Read and navigate: Click a file name to read it. Internal links using
[[links]]are supported. Click “@ to agent” to inject the current entry into the dialog box. - Upload materials: In the
raw/directory tree, open any page and click “Upload materials” in the upper-right corner. - Process and accumulate: In the conversation, enter
@raw/xxx.logand instruct the Agent to “process and ingest it according to the schema”. After the Agent completes two-step processing, it will generate an article in wiki and update the index. - Customize conventions: On the knowledge base page, click “📐 Conventions” in the top bar and edit the current knowledge base’s
schema.md. For example, specify that a particular knowledge base only stores documents in the form of “solutions”; changes take effect after saving.
Environment Dependencies¶
- DeepSeek Harness version: Must be
0.1.7-rc.2or higher. - Node version: Must be
20or higher. - Scheduled task recommendation: It is recommended to add a monthly lint task to
dsh-tasksto check for dead links, orphan pages, and stale entries.
Differences from dsh-file-share¶
dsh-file-share manages files in the session workspace (following the session cwd) and may become invalid or be cleaned up when the session ends. dsh-kb manages a cross-session, cross-person fixed knowledge base, focusing on read-only browsing, search, and raw material uploads. The two do not depend on each other.