dsh-handbook
Identified★ 922DeepSeek Harness (dsh) In-Depth Guide from 0 to 1: Installation/Plugin Development/Performance Optimization/Real-World Cases/Comparative Testing of Multi-Agent with the Same Model (Chinese + English PDF)
DeepSeek Harness White Paper · dsh-handbook
DeepSeek Harness Chinese Handbook × Ecosystem Watch Center — from 0 to 1 with dsh, decode the ecosystem through 780 discussion threads · Chinese · English
📖 Read online · 📄 Download PDF · ⭐ Star to support
· 15-chapter handbook · 195 community discussion threads · 280+ Stars*
[!WARNING] The current GitHub version of dsh is
v0.1.3-alpha.1(pre-release tag; npm published line0.1.2-rc.1). Evaluate carefully for production use. See ℹ️ Version Notes.
🚀 Quick Start (30 Seconds)
# 1. 安装(需要 Node.js ≥ 22)
npx -y @deepseek-ai/dsh web
# 2. 浏览器打开 http://127.0.0.1:3080,开始对话
# 3. 或跑一次性任务(适合脚本/CI)
dsh --profile headless "你好,请用一句话介绍自己"
Want to learn systematically? See 🗺 Learning Path (3-Day Plan); want to get started fast? Chapter 2: Five-Minute Quick Start; want a quick reference? 📇 One-Page Cheat Sheet
30 秒看懂 dsh Web UI:新建会话 → 输入任务 → 模型选择 → 发送 → AI 回复
🎯 What This Is
DeepSeek Harness (dsh) is the Agent runtime officially open-sourced by DeepSeek on 2026-08-13 — an "everything is a plugin" framework.
But the official docs focus on architecture, lacking a from-zero path.
This white paper fills that gap: starting from "what is an Agent runtime," covering installation, usage, plugin development, and performance tuning — every chapter includes copy-paste-runnable commands, all verified on real machines. Goal: any developer can go from 0 to 1, up and running and building, following this book.
Why Read This (Instead of Just the Official Docs)
| Official Docs | This White Paper |
|---|---|
| Architecture perspective (AGENTS.md / architecture.md) | Beginner perspective: a 0-to-1 path |
| Scattered examples | Runnable in every chapter, all commands tested |
| No Chinese tutorial | Chinese-first, English in sync |
| No ecosystem practice | Real plugin/PR teardowns (including pitfalls and security constraints) |
🎁 What This Book Gives You
| If you are… | You get |
|---|---|
| 🆕 First time with dsh | 3-day 0-to-1 learning path (daily goals + acceptance criteria) |
| 🛠 Developer | Cloneable plugin templates + config reference (copy-paste and it runs) |
| ⚖️ Evaluating options | Comparison of 6 major Agents (tables + text) + same-model real-world benchmark |
| ⚡ Need to tune | Reasoning tier strategy + cache hit rate deep-dive (97% measured) |
| 📚 Need case studies | 5 real complex cases (with timing/outputs/verification) |
🌟 Acknowledgments & Community
First, thanks to every Star, reply, and contribution — this handbook isn't one person's work; it's what the dsh community "grew" together.
In two days, we received this feedback:
- ⭐ 280+ Stars — far beyond expectations for a freshly published tutorial; thanks for the recognition
- 💬 195-thread replies in the official repo — we keep troubleshooting, debugging, and sharing with the community in the discussion forum
- 🧠 Most of the 39 FAQ questions come from real user queries — whatever the community asks, we document (#380/#817/#1052…)
- 📦 Submitted an inclusion PR to awesome-dsh-plugin (#33, pending merge); self-nomination to Ruan Yifeng's weekly submitted
- 🤝 Cross-linked with 30+ community projects (dsh-usage / dsh-sgme / AgentSoul / dsh-vault / egress-guard / agentmemory…)
Content is continuously updated with the discussion forum (feedback pipeline, 19 tracked items). If you found this useful, starring is the biggest support you can give us.
🔭 Ecosystem Watch (Chapter 15 · Panoramic Report)
Cross-validated data from 1,804 plugin repos against qualitative observations from 780 discussion threads, yielding 5 key conclusions:
| Conclusion | In one line |
|---|---|
| 🪟 Windows is the #1 pain point | Chinese paths (15+ threads, same root cause) / koffi / ports / child processes — confirmed by both data and discussion |
| 🧩 "What's missing officially, the community built" | Desktop shell 140+ / TUI / memory 77 / visual 132 — healthy complementarity |
| 🛡️ Security audits active, tooling scarce | Only 9 sandbox-classified plugins — supply gap |
| 🐛 Serialization bug family | unknown tool / reasoning omission / run_code dropped — main battleground in rc phase |
| 💰 Cost transparency is a hard need | 97% measured cache hit + cost tools sprouting everywhere |
6 capability gaps (priorities for the official team): visual channel · memory seam · desktop TUI protocol · eval loop · first-class Windows support · plugin registry
Full report (with advice for developers / evaluators / wait-and-sees): Chapter 15
📚 Table of Contents (0 to 1)
| 🗺️ Learning Path (3-Day Plan) | 0 to 1: daily goals + acceptance criteria + learning principles |
|---|
🟢 Phase 1 · Intro: Concepts & Getting Started
| 📖 Ch. 1 · Getting to Know Harness | ⚡ Ch. 2 · Five-Minute Quick Start |
|---|---|
| Full comparison with major Agents · FAQ · EN | Installation · web/headless dual mode · reasoning tiers · EN |
🔵 Phase 2 · Development: Skeleton & Plugins
| 🧩 Ch. 3 · Profiles & Plugin System | 🛠️ Ch. 4 · Plugin Development in Practice |
|---|---|
| Customizable skeleton · plugin mounting · extension points · real pitfalls | Write your first plugin from scratch (complete code + tests + real-machine verification) |
🟠 Phase 3 · Practice: Scenarios & Tuning
| 📦 Ch. 5 · dsh Use Cases | 🚀 Ch. 6 · Advanced & Performance Tuning |
|---|---|
| 5 major scenarios · high cache hit rate deep-dive · 5 industry perspectives | Reasoning tier strategy · latency analysis · pitfall checklist |
🟣 Phase 4 · Ecosystem: Capabilities & Orchestration
| 🌐 Ch. 7 · Ecosystem & Resources | 🧰 Ch. 8 · Tools & Context System | 🔗 Ch. 9 · MCP, Sub-Agents & Workflows |
|---|---|---|
| Official entry points · participation paths · reading suggestions | 60+ capability package map · built-in tools · compaction | External tool integration · parallel sub-agents · multi-step orchestration |
🔴 Phase 5 · Advanced: Complex Cases & Outlook
| 🧪 Ch. 10 · Complex Real-World Cases | 🔮 Ch. 11 · Future Outlook | ⚠️ Ch. 12 · Known Limitations & Boundaries |
|---|---|---|
| dsh in action: data-pipeline 186s · 5-bug fix 94s | Tech/ecosystem/competition/opportunity/risk forecasts + timeline | Honest rc assessment: instability · early ecosystem · cross-platform gaps |
| 🛡️ Ch. 13 · Security & Sandbox | 💰 Ch. 14 · Caching & Cost |
|---|---|
| Sandbox mechanisms · permission model · approval flows · plugin security audit checklist | 97% measured cache hit rate · cost model · reasoning tier linkage · budget in practice |
| 📊 Ch. 15 · Ecosystem Panoramic Report | |
|---|---|
| 1,804 plugins × 780 threads cross-validated: 5 key insights + 6 capability gaps + advice for ecosystem participants |
📎 Appendices
| 📚 Appendix A · Glossary · 📦 Appendix B · Official Package Quick Reference · 📊 Appendix C · Benchmark |
|---|
| 30+ terms · command quick reference · official @deepseek-ai/* package list · same-model 3-Agent benchmark |
💎 Content Highlights (click to view, not just links)
📖 第 1 章:认识 DeepSeek Harness —— 三个直觉 + 能力矩阵
- Three intuitions: dsh = the Lego base for Agents; harness = the engineering layer wrapped around the model; 2026 = the era of programmable Agents
- Core facts: MIT open-source · TypeScript · "everything is a plugin" · released 2026-08-13
- dsh vs 5 major Agents capability matrix (Claude Code / Codex / OpenCode / Gemini / Kimi): open-source ✅, model-agnostic ✅, official-grade plugin system (unique), custom UI ✅, headless CI ✅
- Selection decision: deep customization + ecosystem → dsh; out-of-the-box → Claude Code
⚡ 第 2 章:五分钟快速上手 —— 30 秒跑起来
-
Launch with one command:
npx -y @deepseek-ai/dsh web→ http://127.0.0.1:3080 -
Dual modes: web (chat UI) / headless (
dsh --profile headless "任务", CI-friendly) -
Three reasoning tiers:
low(fastest / simple tasks) ·high(default) ·max(strongest / complex reasoning) — performance-critical: thinking accounts for 90% of the toolchain time. > Note:lowis a tier of the gateway tested in this whitepaper (pi-ai/opencode-go); the official DeepSeek adapter usesoff(thinking disabled / fastest) /high/max(see the note in 02-quickstart 2.3) -
First plugin: mount the Git panel in 4 steps
🧩 第 3 章:profile 与插件系统 —— 可定制骨架
- profile = bundle stack + your patch layer (
package.json+cordis.patch.yml) - Mounting a plugin requires only 2 changes (add dependency + add insert line)
- Host/client dual-half: one npm package = Node-side tools/services + browser-side UI
- 5 major extension points:
agent/requestwaterfall,conversationEvents,ctx.slots,settings,ctx.provide - 6 real pitfalls: rc.1 dependency breakage, missing plugin main, forgetting to await
next(), unrecognizable types, ModuleLoader, port occupation
🛠 第 4 章:插件开发实战 —— 完整可运行代码
- Write a speed-boost plugin from scratch (full teardown): pure-function decision +
agent/requestwaterfall injection - Core technique: extract decision logic into pure functions (unit tests in milliseconds) → real-machine only verifies "whether injection happened"
- 3 dev disciplines: find the extension point first / extract logic into pure functions / never skip real-machine verification
- Real-machine log evidence:
calls=[{name:"write"}] => reasoningEffort=low
📦 第 5 章:实战案例 —— 三个真实开源 PR 的完整闭环
- Git panel push/pull/fetch (PR #10):
--force-with-leasesafety red line + local bare-repo integration test + Playwright real-machine verification - HTML draft preview (PR #11): srcdoc decision pure function under sandbox security constraints
- Speed-boost plugin example: downgrade reasoning per step in long toolchains
🚀 第 6 章:进阶与性能调优 —— 时间花在哪
- Performance model: 90% of toolchain task time is model thinking (before each tool call)
- Tier strategy: simple turns low / everyday high / complex max — downgrading is the highest-leverage speedup
- 7 real pitfalls: including the eval trap where "simple task suddenly faster = cache hit"
- Three questions to check a scorecard: who ran it / what harness / how strict the validator
🌐 第 7 章:生态与资源 —— 加入 dsh 生态的地图
- Official entry points: repo / API docs / Discord / Discussions
- Current status: official team not accepting external PRs yet → building dsh-plugin ecosystem projects is the officially named contribution path
- Beginner path: use it → small PR → ship a plugin → write content
🧰 第 8 章:工具与上下文系统 —— 能力引擎
- 60+ official capability packages map: tools / context / conversation / sub-agents / MCP / workflow / security
- Built-in tools (measured): read/write/grep/glob/edit/bash/todo/skill
- Artifact tracking: tool returns locations → open artifacts at conversation end
- Context injection: layered system prompt + skills directory
- Auto compaction for long conversations + sandbox/permission/approval security layer
🔗 第 9 章:MCP、子代理与工作流 —— Agent 系统化
- MCP: connect external tool servers (community already has a token-tracking plugin)
- Sub-agents: parallel task delegation (large-repo research / long-task decomposition)
- Workflows: deterministic multi-step orchestration (pull → clean → report → validate)
- Four-stage beginner path: single Agent → +MCP → +sub-agents → +workflows
🧪 第 10 章:复杂实战案例 —— dsh 真实跑出来的
- Case A: data quality analysis → cleaning → visualization (186s, 52→35 rows to zero, chart.png, with tradeoff notes)
- Case B: 5-bug fix + 49 tests (94s, pytest 49 passed, covering divide-by-zero/negative/precision boundaries)
- Profile: multi-step toolchain auto-orchestration + judgment + traceable artifacts
- Privacy notice: all synthetic data / self-made code
📚 附录:术语表 + 命令速查
- 30+ terms: harness/profile/bundle/cordis/extension points/waterfall/compaction…
- Command quick reference: dsh core / env / troubleshooting / plugin dev
- Benchmark: same-model 3-Agent measured (median of 3 runs)
🔮 第 11 章:未来展望 —— 五个维度的预测
- Tech/ecosystem/competition/opportunity/risk five-dimension forecast + timeline
- Opportunity: official ecosystem in early stage; building dsh-plugin projects is the entry bonus
⚠️ 第 12 章:已知不足与边界 —— rc 版诚实说
- Instability: rc iterating fast, frequent breaking changes
- Early ecosystem: 60+ official packages but plugin ecosystem just starting
- Cross-platform gaps: Windows family pitfall records (incl. Node version red lines)
🛡️ 第 13 章:安全与沙箱模型 —— 敢上生产的关键
- Sandbox mechanism: process isolation (bwrap/Landlock/Seatbelt) + permission tiers + approval flows
- Community audit boundaries: node:vm not a security boundary, approval loops, workspace-write recursive delete, and other real escape surfaces
- Plugin security audit checklist: third-party audit methodology (#454)
💰 第 14 章:缓存与成本工程 —— 把"便宜"变工程
- Cache mechanism: context caching + 97% measured hit rate (Flash discount 98% / Pro 99%+)
- Cost model: where tokens go + reasoning tier linkage + real task budgets
- Visualization: session log / balance plugin to see per-item cost
🖥 Demo — See It in Action
① Web UI Chat (dsh web)
dsh web # → http://127.0.0.1:3080

② Headless CLI (one-shot tasks, ideal for scripts/CI)
运行 dsh --profile headless "你好,请用一句话介绍你自己"(命令见 🚀 快速体验):
# → 你好!我是 DeepSeek 驱动的 AI 编程助手,可以帮你写代码、调试问题、
# 处理文件、搜索资料,以及完成各种开发和办公任务。
③ Plugin Ecosystem (Git panel, dsh-better-sidebar)

Full illustrated demo: 📺 Understand dsh in 30 Seconds.
🧰 Quick-Start Assets (highlights, view directly)
📇 一页速查卡 —— 安装 · 命令 · 推理档位 · 排障
npx -y @deepseek-ai/dsh web # 安装即启动 Web UI
dsh --profile headless "任务" # 一次性任务(脚本/CI)
Reasoning tiers: low (fastest/simple turns) · high (default) · max (strongest/complex reasoning) — low is the tier measured in the gateway (pi-ai); the official adapter uses off/high/max
90% of toolchain task time is thinking — downgrading is the highest-leverage speedup Full card: docs/cheatsheet.md
🔧 插件模板 —— 挂载只需 2 步
# ① package.json 加依赖
"my-plugin": "link:C:\\path\\to\\my-plugin"
# ② cordis.patch.yml 加挂载
- insert:
- id: my-plugin
name: my-plugin
cd ~/.dsh/profiles/web && pnpm install && dsh web
Cloneable template (incl. pure function + waterfall + tests): examples/plugin-template/
⚙️ 配置参考 —— settings.yaml 核心
agent-default-model:
model: deepseek-v4-flash # 或 deepseek-v4-pro
reasoningEffort: high # off(关闭思考/最快)/ high(默认)/ max(最强)
All fields (profile/cordis.patch.yml/common scenarios): docs/config-reference.md
❓ FAQ Top 5
- Is dsh a model? No — it's a runtime; the model connects via the llm plugin
- How is it different from Claude Code? Claude Code is a "complete car"; dsh is the "Lego base" (open-source, customizable)
- Does it cost money? dsh is free and open-source; conversations are pay-per-use (cache discounts: Flash tier 98% / Pro tier 99%+, measured session cache hit rate 97%)
- Plugin install 404? rc.1 dependency break — use dependency line
>=0.1.2-rc.1 <0.2.0 - Production-ready? rc phase has breaking changes; ecosystem use cases can start now
Full FAQ (six categories): docs/faq.md
⚖️ DSH vs Major Agents (Capability Matrix)
| Dimension | dsh | Claude Code | OpenAI Codex | OpenCode | Gemini CLI | Kimi CLI |
|---|---|---|---|---|---|---|
| Open-source | ✅ MIT | ❌ | ✅ Apache-2.0 (CLI/harness) | ✅ MIT | ❌ | ❌ |
| Model binding | Model-agnostic | Claude family | GPT family | Any | Gemini family | Kimi family |
| Plugin system | Official-grade: everything is a plugin, 60+ official packages | Config/hooks | Config | Config | None | None |
| Custom UI | ✅ (client half) | ❌ | ❌ | Partial | ❌ | ❌ |
| Automation/CI | ✅ headless | ✅ | ✅ | ✅ | ✅ | ✅ |
| TUI | Plugin can do | ✅ Built-in | ✅ Built-in | ✅ Built-in | ✅ | ✅ |
| Ecosystem stage | Day zero (2026-08-13) | Mature | Mature | Mature | Mature | Early |
| Best for | Deep customization + ecosystem | Out-of-the-box | Out-of-the-box | OpenCode users | Kimi |
Measured cases, same-model multi-Agent comparison data in Chapter 1 and the benchmark section.
📊 Same Model × Different Agents (2026-08-13)
Unified model
deepseek-v4-flash(same gateway, same key), comparing only the Agent engineering layer. All 5 tasks completed correctly; differences in efficiency:
| Agent | Total time | Accuracy |
|---|---|---|
| omp | 70s | 45/45 ✅ |
| dsh | 130s | 45/45 ✅ |
| opencode | 172s | 45/45 ✅ |
5 tasks × 3 rounds, median (T1 create file → T5 multi-file refactor), 45/45 all correct. Full method/interpretation in 📊 Benchmark Appendix.
📄 White Paper PDF
- Full Chinese version: DeepSeek-Harness-白皮书.pdf (15 chapters + Appendices A/B/C, ~130k+ chars, 5.5MB)
- Full English version: DeepSeek-Harness-Handbook.pdf (15 chapters + appendices, 83 pages, ~160k chars, 1.7MB)
🌐 Ecosystem Integration
Methodology from real open-source practice:
- DSH-better-sidebar — community sidebar plugin (Chapter 5 case)
🧩 Community Plugin Recommendations (from official discussions / awesome-dsh-plugin picks)
| Plugin | Purpose |
|---|---|
| dsh-specflow | Spec-driven development: skills+commands+goal implementation+progress context |
| dsh-gitflow | Approval-gated Git workflow (status/diff/commit/branch) |
| dsh-guardian | Dangerous-operation policy checks + output redaction + security review |
| dsh-code-intel | Tree-sitter symbol index + hybrid search |
| dsh-tianshu-tui | Terminal UI (TUI) |
| dsh-computer-use | Accessibility-first macOS computer control |
| dsh-data-agent | Data Agent that connects to databases and writes SQL |
| dsh-balance-meter | Balance + session cost real-time display |
| dsh-usage | Token usage + cost estimation + 52-week heatmap (#1169) |
| dsh-sgme | Memory engine: context injection by scenario + auto pruning (saves 65-96% of sessions, #1052) |
| AgentSoul | Local persona + long-term memory + memory distillation (#1478) |
| dsh-vault | Encrypted credential vault: TOTP/API Key/SSH encrypted storage (#1457) |
Full list at awesome-dsh-plugin (122+ plugins). Want to be featured? Community Case Submission
📣 Active Responses in Official Discussions
Actively responding in deepseek-ai/deepseek-harness Discussions (100+ threads): plugin pitfalls #380 / security audit #817 / cache & cost #1052/#1234 / ecosystem insights #839, etc. (feedback pipeline continuously ingests feedback)
🙏 Contributing & Feedback
- ⭐ Found it helpful? Star to support ongoing updates
- 📝 Ran a real case? Submit for inclusion in the white paper (credit + quarterly selected PDF): Community Case Submission ← just reply, template ready
- Broken chapter/command? Due to rc version iterations; welcome issue corrections
- Want to participate? See 🤝 Contributing Guide · Roadmap? 🗺️ ROADMAP · Ecosystem participation in Chapter 7
ℹ️ Version Notes
- Measured content based on dsh
0.1.0-rc.6/ DeepSeek-V4-Flash-0731 (open-sourced 2026-08-13); version line synced tov0.1.3-alpha.1(npm published line0.1.2-rc.1) - Sample environment: Windows 11 + Node 24
🔄 Recent Updates
- Full 15-chapter version (Ch. 13 Security Sandbox / Ch. 14 Cache & Cost / Ch. 15 Ecosystem Panoramic Report) + Appendices A/B/C
- Continuous discussion-forum feedback integration: 39 FAQs / KVCache rules / built-in Agent presets / run_code async pitfall (feedback pipeline)
📜 License
Content CC BY-NC-SA 4.0 · Sample code MIT
Comments
Loading…
Similar plugins
by webkubor
给 DSH 模型页补上官方适配器缺的那半:网关可达性探测、模型目录拉取、DeepSeek 余额常驻。零运行时依赖,不改动 DSH 安装。
★ 2
↓ 25/wk
MIT
JavaScript
Oct 18, 2026
dsh plugin --profile web add dsh-llm-hubby NinjaSln-labs
DeepSeek Harness 插件:Cursor-as-subagent 提供方——一次本地 @cursor/sdk one-shot 运行、摘要优先结果、可无人值守的 Profile Bundle
★ 0
↓ 353/wk
MIT
TypeScript
Oct 2, 2026
dsh plugin --profile web add dsh-subagent-cursorby Asteroid0449
Agent 专用的 DSH 插件检索、审计、安装与验证工具桥;不提供可视化市场界面。
★ 0
MIT
JavaScript
Aug 21, 2026
dsh plugin --profile web add dsh-agent-plugin-researchby exoticknight
One sentence to an AI agent: create, release and list a DeepSeek Harness plugin. DSH 插件模板与 AI 操作手册
★ 3
Apache-2.0
JavaScript
Oct 28, 2026
dsh plugin --profile web add dsh-plugin-templateby MaRi23333
DeepSeek Harness 具名子代理库插件:settings 驱动的角色名册,list_subagents / delegate 工具与设置页。Named subagent roster plugin for DeepSeek Harness.
★ 6
↓ 614/wk
MIT
JavaScript
Oct 20, 2026
dsh plugin --profile web add dsh-subagent-libraryby RaganaBloodedge
DeepSeek Harness 长期记忆插件:分层任务记忆 + 关系图谱 + 索引常驻稳定前缀;零运行时依赖,另附同源的 Agent skill 形态
★ 0
MIT
TypeScript
Oct 15, 2026
dsh plugin --profile web add dsh-lmmarr