Deep research for DeepSeek Harness
A Gemini-Deep-Research-style mode for DeepSeek Harness: give it a topic, and an agent plans research angles, browses many sources over several rounds, cross-checks claims, and writes a long-form Markdown report with validated, linked citations.
This repository is a complete DSH plugin bundle. It adds model-facing tools, a short research protocol to the system prompt, and a Deep research page to the Web sidebar.
What it does
- Structured runs instead of one-shot answers.
research_startcreates a run with a depth budget (Quick / Standard / Deep), recommended angles, and an outline. Runs live inresearch/<timestamp>-<slug>/inside the session workspace. - Bulk gathering with stable citations.
research_gathersearches several queries at once, deduplicates and ranks the hits, fetches the best pages, extracts the passages most relevant to the topic, and numbers every fetched source[S1],[S2], … across rounds. Full page text is saved next to the run for follow-up reads. - Validated reports.
research_saveenforces the depth's minimum cited-source and word counts, rejects citations to pages that were never fetched, strips a hand-written reference list, and appends a canonical linked bibliography. It writesreport.mdand refreshesresearch/index.md. - Autonomous sessions. The launcher creates a real session, pins a
Deep research: …title, submits a short brief, and opens the run so every search and fetch is visible in chat. - Deliverable card. The agent is told to call
presenton the saved report when that tool is available, so the report appears as a file card as well as in the workspace. - Recent runs. The page lists earlier research sessions (English and Chinese title prefixes) with running state and reopens them.
Requirements
- DeepSeek Harness 0.2.2-rc.5 (the version this bundle was built and tested against).
- A model that can call tools, and a usable web search and fetch provider.
research_startandresearch_gatherare only offered to the model while the deployment reports both as ready. - No package dependencies, no build step: plain ESM Host code and a plain browser module.
Install
The plugin is a DSH bundle (it carries its own cordis.patch.yml).
- Clone this repository somewhere local:
git clone https://github.com/leonardrua/dsh-deep-research.git - In the DSH Web UI, open Plugins → Add plugin and choose the checkout directory (the manager installs it as a linked package and selects the bundle), or install it with the
plugin_managerhost tool usingaction: install_bundleand the absolute directory. - Enable the Deep research bundle if it is not already on. Reload the page once if the sidebar entry does not appear immediately.
Uninstall from Plugins → Deep research → Remove.
Use
From the sidebar
- Open Deep research in the sidebar.
- Enter a topic. Optionally add focus questions/constraints.
- Pick a depth: Quick (3–5 min, 8-source target), Standard (8–12 min, 15-source target), or Deep (15–25 min, 25-source target).
- Select a workspace and press Start research.
The page opens the new session; the agent runs the protocol and saves the report. Reports are plain Markdown under research/ in the workspace.
From chat
Ask for a deep, multi-source investigation. The research_* tools and the protocol are already in the session's tool/prompt set, so the agent can run the same workflow without the page.
How a run works
- Plan —
research_startfixes the depth budget and lists angles/outline. - Gather — two to five rounds of
research_gather, each with different queries. The dossier returns relevant excerpts, full-text paths, fetch failures, indices of unfetched hits, and the cumulative source map. - Verify — the protocol asks the agent to prefer primary sources, cross-check important claims against an independent source, and record conflicts and uncertainty.
- Write — the agent writes the complete report and calls
research_save; validation errors must be fixed before the report is written.
Configuration
The bundle row accepts these optional fields (values are clamped; there is no schema-backed editor yet):
- id: deep-research
name: '@local/dsh-deep-research'
config:
reportDir: research # workspace-relative report root (absolute paths allowed)
searchMaxResults: 8 # sources requested per query
maxQueriesPerCall: 6 # distinct queries accepted by one gather round
maxPagesPerCall: 6 # hard cap on pages fetched per round
perPageChars: 1800 # excerpt budget per source
fetchConcurrency: 4 # parallel page fetches
gatherTimeoutMs: 180000 # round budget; the tool timeout is +5s
fullTextMaxChars: 200000 # saved page text cap
reportIndex: true # refresh research/index.md on save
Development
There is nothing to build.
node --check index.js
node --check client.js
node test/engine.test.mjs
test/engine.test.mjs exercises the Host engine against a fake web seam: start, two gather rounds, save, reference generation, validation failure, and a non-Latin topic that must still produce an ASCII-safe run id.
Layout
| Path | Role |
|---|---|
index.js |
Host plugin: research_start / research_gather / research_save, prompt section, run storage |
client.js |
Browser plugin: sidebar entry and the Deep research page |
cordis.patch.yml |
Bundle patch inserting the deep-research row |
locale/ |
Plugin Manager metadata (English / Chinese) |
docs/DETAIL.md |
Plugin detail document |
icon.svg |
Plugin icon |
test/ |
Engine regression test |
Limits
- Sources are real fetched pages, but the report is a model synthesis; read the cited references before relying on a claim.
- Fetching is bounded by the deployment's providers. Many publishers return 403 or require JavaScript, so some rounds fetch nothing; the dossier lists the failures and tells the agent to change domains.
- PDFs and other non-HTML resources are not extracted.
- Reports are plain Markdown in the session workspace; nothing is uploaded or synced.
- Tested against DSH
0.2.2-rc.5. Slot IDs, tool contracts, and Remote shapes may change in later releases.
License
MIT © 2026 leonardrua. See LICENSE.
还没有评论,来写第一条。