Introduction¶
DeepSeek Harness (DSH) is a plugin-first Agent Harness. An Agent session contains a large amount of valuable engineering memory: what was tried, how the user corrected it, which evidence matters, which decisions were effective, and where the task got stuck. Raw conversation logs are often too large and noisy to place directly into long-term context, while one-off summaries are hard to audit.
DSH Knowledge Forge is a native DeepSeek Harness plugin that adds automatic local knowledge distillation to DSH without relying on external memory services. It transforms Agent conversation traces into progressively reusable knowledge, separating operational evidence from reusable knowledge.
Core Features¶
The plugin provides the following core capabilities:
- Local-first capture: Sanitizes credentials in persistent text and limits top-level turn length before writing content to a project-local SQLite database.
- Session-aware batching: Independently processes a source Session after either 5 pending top-level turns or 60 minutes have elapsed.
- One-shot distillation: Performs knowledge extraction using a non-interactive, tool-free background Agent with a strictly structured output.
- Wiki → Skill evolution: Stores the first valuable task case as a human-readable Wiki page; when independent cases repeatedly execute the same stable workflow, it promotes the case into a native DSH Skill.
- Progressive disclosure: Injects a compact Wiki index into the Agent context and loads full Wiki pages or Skills only when needed.
- White-box observability: Preserves readable Markdown artifacts, batch receipts, retry status, and provides a DSH Web Dashboard.
How It Works¶
Knowledge Forge maintains a local knowledge loop:
- Capture completed top-level turns: The plugin listens to DSH’s top-level turn lifecycle and extracts user-visible messages, assistant output, condensed tool evidence, and related paths. Reasoning traces and full tool outputs are not copied.
- Schedule Sessions independently: A Session is considered “due” when it has 5 pending turns or its oldest pending turn has waited for 60 minutes. Turns from different Sessions are not merged.
- Run a one-shot background curator: Knowledge Forge starts a restricted DSH sub-Agent: only a single non-interactive response, no tools, a strict JSON output schema, and coverage of all input events. All candidate and knowledge text is treated as untrusted data.
- Distill and evolve: The strategy is progressive. It first discards lookup-like, chit-chat, and unchanged Skill reuse. If an existing Skill covers the task, it is reused. For persistent task cases, it writes or updates a Wiki entry (including goal, feedback, evidence, decisions, outcomes, etc.). A case is promoted to a Skill only when new independent cases repeat the same stable workflow; at that point, the Wiki body is replaced with lightweight metadata pointing to the Skill.
Installation and Activation¶
Prerequisites:
- Node.js ^22.19.0 || >=24.0.0
- DeepSeek Harness 0.1.0-rc.6
Installation steps:
- Clone the repository and install dependencies:
git clone https://github.com/bill084153-cell/dsh-knowledge-forge.git
cd dsh-knowledge-forge
npm install
- Build and package the plugin:
npm run build
npm pack
This will generate a `.tgz` archive.
- Install it into the DSH Web profile:
dsh plugin --profile web add ./dsh-knowledge-forge-0.1.0.tgz
- Start DSH and verify:
dsh web
After installation, you can verify it with the following command:
dsh plugin --profile web exec dsh-knowledge-forge doctor --workspace .
The doctor check should output the workspace path, local database path, queue count, Wiki count, Skill count, and status.
Storage and Retention¶
The plugin writes data into the current project directory and does not depend on external services:
<project>/.dsh/
├── knowledge-forge/
│ ├── knowledge-forge.sqlite # queue state, batches, receipts, retries, full-text index
│ └── wiki/
│ ├── index.md # compact recall mapping injected into Agent context
│ └── pages/
│ └── <wiki-id>.md # persistent task case or Skill metadata
└── skills/
└── <skill-id>/
└── SKILL.md # native DSH Skill
SQLite is used to maintain runtime state (queues, scheduling, retries), while Markdown files (Wiki pages and SKILL.md) serve as long-term readable and editable artifacts.
Use Cases and Considerations¶
Use cases:
- Scenarios where Agent development memory needs to be managed locally, without uploading data to cloud memory services.
- Scenarios where structured Wikis and reusable Skills should be distilled from conversation records.
Considerations:
- The plugin runs with the permissions of the current DSH process; the source code and license should be reviewed before installation.
- Installing TypeScript DSH plugins directly from GitHub requires build time. It is recommended to package a tarball first, which keeps the installation process explicit and avoids running repository build scripts inside the user’s DSH profile.
- DSH’s philosophy is “everything is a plugin”. The community directory is an independent site and has no official relationship with DeepSeek or High-Flyer.
Conclusion¶
After the steps above, DSH Knowledge Forge is integrated into the Harness. By combining SQLite and Markdown, it enables localized knowledge accumulation and evolution. Agents can extract Wikis from conversations and then convert them into Skills, allowing that knowledge to be reused in future sessions, reducing repetitive work, and improving development efficiency.
- Plugin directory: https://www.skillhub.cn/plugins/bill084153-cell/dsh-knowledge-forge
- Project repository: https://github.com/bill084153-cell/dsh-knowledge-forge