Skip to content
Projects

About

DeepSeek Harness (dsh) handbook from 0 to 1: installation, plugin development, performance tuning, real-world testing cases, and real-world comparative tests of multiple agents using the same model (Chinese + English PDF)

Learning & Education

How these counts are measured

Measured star growth

in 24h
+3
in 7 days
+17
in 15 days
+64
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.en.md

Original

DeepSeek Harness Handbook · dsh-handbook

From zero to one with DeepSeek Harness — the beginner's encyclopedia for DeepSeek's open-source agent runtime. English · 中文

📖 Read online · 📄 Download PDF · ⭐ Star us

dsh-handbook banner

GitHub stars GitHub release dsh-handbook chapters pdf license dsh

[!WARNING] The prose was measured on 0.1.0-rc.6 (the version line was synced to v0.1.3-alpha.1); DSH is now v0.2.2-alpha.3. Breaking changes since that baseline: Node >=24.9 (0.2.2), enforced engines.dsh (0.2.1-alpha.4), removal of ctx.menus (0.2.2-alpha.3, renamed ctx.contextMenus); separately, @deepseek-ai/dsh-client-runtime was removed in 0.1.2 and Typert codecs moved to create() in 0.1.6-alpha.2. Before following this handbook, check the official docs and the upgrade guides; examples may still target the 0.1 API.

🚀 30-Second Quickstart

# 1. Install (needs Node.js ≥ 24.9)
npx -y @deepseek-ai/dsh web

# 2. Open http://127.0.0.1:3080 and start chatting
# 3. Or run a one-shot task (scripts / CI)
dsh --profile headless "Hello, introduce yourself in one sentence"

dsh Web UI live demo
30 seconds to "get it": new session → type a task → pick model → send → AI replies

Want the full path? 🗺 3-day learning path · Jump straight in: Chapter 2: 5-min quickstart · Cheat sheet: 📇 one-page card

🎯 What Is DeepSeek Harness

DeepSeek Harness (dsh) is the agent runtime open-sourced by DeepSeek on 2026-08-13 — an "everything is a plugin" framework built on Cordis, with web + headless profiles and a plugin ecosystem.

dsh overview

But the official docs focus on architecture — the beginner path is missing. This handbook fills it: from "what is an agent runtime" to install, usage, plugin development and performance tuning. Every chapter is copy-paste runnable and verified on real hardware. Any developer can go from zero to productive.

Why read this (instead of the official docs)

Official docs This handbook
Architecture view (AGENTS.md / architecture.md) Beginner view: a zero-to-one path
Scattered examples Every chapter runnable, commands verified
English only Bilingual, Chinese-first + English chapters
No ecosystem practice Real plugin/PR breakdowns (pitfalls & safety included)

🎁 What You Get

If you are… You get
🆕 New to dsh A 3-day zero-to-one path (daily goals + acceptance checks)
🛠 A developer Clone-and-run plugin template + full config reference
⚖️ Evaluating options 6-agent comparison (table + prose) + same-model benchmark
⚡ Tuning for speed Reasoning-effort strategy + cache-hit deep dive (measured ~97%)
📚 Looking for cases 5 real complex cases (with timing / artifacts / verification)

📚 Table of Contents (Zero → One)

🟢 Stage 1 · Understand & Onboard

📖 Ch. 1 · Understanding Harness ⚡ Ch. 2 · 5-Minute Quickstart
What it is, vs Claude Code/Codex/OpenCode, capability matrix Install, web/headless modes, reasoning effort, troubleshooting

🔵 Stage 2 · Build: Skeleton & Plugins

🧩 Ch. 3 · Profiles & Plugin System 🛠️ Ch. 4 · Plugin Dev, Hands-On
Customizable skeleton, mounting, host/client halves, extension points, real pitfalls Write your first plugin (full code + tests + live verification)

🟠 Stage 3 · Practice: Scenarios & Tuning

📦 Ch. 5 · Real-World Cases 🚀 Ch. 6 · Advanced & Performance
3 real open-source PRs, cache-hit-rate deep dive, industry views reasoning_effort strategy, latency analysis, 7 pitfalls

🟣 Stage 4 · Ecosystem: Capability & Orchestration

🌐 Ch. 7 · Ecosystem & Resources 🧰 Ch. 8 · Tools & Context System 🔗 Ch. 9 · MCP, Subagents & Workflows
Official entry points, how to join, reading paths 60+ capability packages, built-in tools, compaction External tools, parallel subagents, multi-step orchestration

🔴 Stage 5 · Advanced: Complex Cases & Outlook

🧪 Ch. 10 · Complex Real Cases 🔮 Ch. 11 · Future Outlook ⚠️ Ch. 12 · Known Limitations
Run live in dsh: data pipeline 186s, 5-bug fix 94s Tech / ecosystem / competition / risk predictions rc instability, Windows bugs, early ecosystem — honest edition
🛡️ Ch. 13 · Security & Sandbox 💰 Ch. 14 · Cache & Cost
sandbox model · permissions · approval flow · plugin audit checklist cache hit 97% · cost model · reasoning-effort × cost · budget
📊 Ch. 15 · Ecosystem Report
1,804 plugins × 780 posts cross-validated: 5 insights + 6 capability gaps + advice for ecosystem players

📎 Appendix

📚 App. A · Glossary · 📦 App. B · Official Packages · 📊 App. C · Benchmark
30+ terms · command cheatsheet · official @deepseek-ai/* package list · same-model 3-agent benchmark

💎 Key highlights (open to read, not just links)

📖 Ch. 1 — three intuitions + capability matrix
  • dsh = the LEGO base for agents; harness = the engineering layer around the model; 2026 = the programmable-agent era
  • MIT · TypeScript · "everything is a plugin" · released 2026-08-13
  • dsh vs 5 agents (Claude Code / Codex / OpenCode / Gemini / Kimi): open-source ✅, model-agnostic ✅, official-grade plugin system (unique), custom UI ✅, headless CI ✅
⚡ Ch. 2 — 30 seconds to running
  • One command: npx -y @deepseek-ai/dsh web → http://127.0.0.1:3080
  • Dual modes: web (chat UI) / headless (dsh --profile headless "task", CI-friendly)
  • Reasoning effort: low (fast/simple) · high (default) · max (hard reasoning) — thinking is ~90% of tool-chain latency
🧩 Ch. 3 — profiles & the plugin system
  • profile = bundle stack + your patch layer (package.json + cordis.patch.yml)
  • Mounting a plugin = 2 edits (add dependency + add insert line)
  • host/client halves: one npm package = Node-side tools/services + browser-side UI
  • 5 extension points + 6 real pitfalls (rc.1 dependency breakage, missing main, un-awaited next()…)
🛠 Ch. 4 — plugin development, full working code
  • From-scratch speed-up plugin (full walkthrough): pure-function decision + agent/request waterfall injection
  • Key trick: extract decision logic into pure functions (millisecond unit tests) → verify only "did injection happen" on real hardware
  • Live log evidence: calls=[{name:"write"}] => reasoningEffort=low
📦 Ch. 5 — three real open-source PRs, end to end
  • Git panel push/pull/fetch (PR #10): --force-with-lease safety line + local bare-repo integration tests + Playwright verification
  • HTML draft preview (PR #11): srcdoc decision pure function under sandbox constraints
  • Speed-up plugin example: step-by-step reasoning downgrade
🚀 Ch. 6 — where the time goes
  • Performance model: ~90% of tool-chain time is model thinking (before every tool call)
  • Strategy: low for simple rounds / high daily / max complex — downgrading is the highest-leverage speedup
  • 7 real pitfalls, incl. the evaluation trap "task suddenly faster = cache hit"
🌐 Ch. 7 — the map to the dsh ecosystem
  • Official entry: repo / API docs / Discord / Discussions
  • Current status: official repo isn't accepting external PRs → plugins are the named contribution path
  • Beginner path: use it → small PR → ship a plugin → write content
🧰 Ch. 8 — tools & context system
  • 60+ official capability-package map: tools/context/session/subagents/MCP/workflows/security
  • Built-in tools (verified): read/write/grep/glob/edit/bash/todo/skill
  • Artifact tracking: tool returns locations → open at end of conversation
  • Context injection (layered system prompt + skill catalog), auto-compaction, sandbox/permission/approval security layer
🔗 Ch. 9 — MCP, subagents & workflows
  • MCP: connect external tool servers (community token-tracking plugin exists)
  • Subagents: parallel delegation (large-repo research / long-task decomposition)
  • Workflows: deterministic multi-step orchestration (fetch → clean → report → verify)
  • 4-stage path: single agent → +MCP → +subagents → +workflows
🧪 Ch. 10 — complex cases actually run by dsh
  • Case A: data-quality analysis → cleaning → visualization (186s, chart.png, trade-offs documented)
  • Case B: 5-bug fix + 49 tests (94s, pytest 49 passed, edge cases covered)
  • Profile: auto-orchestrated tool chains, real judgment, traceable artifacts
  • Privacy: all synthetic data / self-written code
📚 Appendix — glossary + commands
  • 30+ terms: harness/profile/bundle/cordis/extension point/waterfall/compaction…
  • Command cheatsheet: dsh core / env / troubleshooting / plugin dev
  • Benchmark: same-model 3-agent (3-round median)
🔮 Ch. 11 — future outlook across five dimensions
  • Tech / ecosystem / competition / opportunity / risk predictions + timeline
  • Opportunity: the ecosystem is day-zero — building dsh-plugin projects is the early-mover entry point
⚠️ Ch. 12 — known limitations & boundaries (rc honest view)
  • Instability: fast rc iterations, frequent breaking changes
  • Early ecosystem: 60+ official packages but plugin ecosystem just starting
  • Cross-platform gaps: Windows-family pitfalls (incl. the Node version red line)
🛡️ Ch. 13 — security & sandbox model
  • Sandboxing: process isolation (bwrap/Landlock/Seatbelt) + permission tiers + approval flow
  • Community-audited boundaries: node:vm is not a security boundary, approval loops, recursive workspace-write deletion
  • Plugin security audit checklist (third-party audit methodology, #454)
💰 Ch. 14 — cache & cost engineering
  • Caching: context cache + measured hit rate 97% (Flash discount 98% / Pro 99%+)
  • Cost model: where tokens go + reasoning-effort interplay + real-task budgets
  • Visibility: session logs / balance plugins to see every cent of spend
📊 Ch. 15 — ecosystem panorama report (1,804 plugins × 780 posts)
  • Data snapshot: 1,804 plugin repos (1,663 flagged "true DSH") — tools 569 / utility 345 / session 229 … sandbox only 9
  • 5 insights: Windows = #1 pain point (60+ posts) · "community fills what the official side doesn't build" · security audits active but security tooling scarce · serialization/boundary bug family · cost transparency as a hidden must-have
  • 6 capability gaps (data + discussion double-verified): vision channel · memory seam · desktop/TUI shell protocol · evaluation loop · first-class Windows support · plugin registry
  • Advice for plugin developers / evaluators / onlookers — full report: Ch. 15

🖥 Demo

① Web UI chat (dsh web)

dsh web    # → http://127.0.0.1:3080

dsh Web UI chat

② Headless CLI (one-shot task, scripts/CI)

dsh --profile headless "Hello, introduce yourself in one sentence"
# → Hello! I'm a DeepSeek-powered AI coding assistant...

③ Plugin ecosystem (Git panel, dsh-better-sidebar)

dsh Git panel (better-sidebar plugin)

🧰 Quick Assets (Essentials Right Here)

📇 One-page cheatsheet — install · commands · reasoning effort · troubleshooting
npx -y @deepseek-ai/dsh web          # install & launch Web UI
dsh --profile headless "task"        # one-shot task (scripts/CI)

Reasoning effort: low (fastest/simple) · high (default) · max (hardest)

Full card: docs/cheatsheet.md

🔧 Plugin template — mount in 2 steps
# ① package.json dependency
"my-plugin": "link:C:\\path\\to\\my-plugin"
# ② cordis.patch.yml mount
- insert:
    - id: my-plugin
      name: my-plugin
cd ~/.dsh/profiles/web && pnpm install && dsh web

Clone-and-run template (pure functions + waterfall + tests): examples/plugin-template/

⚙️ Config reference — settings.yaml core
agent-default-model:
  model: deepseek-v4-flash    # or deepseek-v4-pro
  reasoningEffort: high       # off (fastest/no thinking) / high (default) / max (strongest)
                              # Note: 'low' is only for custom gateways (pi-ai); the official DeepSeek adapter accepts off/high/max only

Full reference (profile/cordis.patch.yml/scenarios): docs/config-reference.md

❓ FAQ Top 5
  1. Is dsh a model? No — a runtime; models plug in via the llm plugin
  2. vs Claude Code? Claude Code is the "whole car"; dsh is the "LEGO base" (open, customizable)
  3. Does it cost money? dsh is free/open-source; conversations billed per use (cache discount: Flash tier 98% / Pro tier 99%+, ~97% session cache hit rate measured)
  4. Plugin 404? rc.1 dependency breakage — use the >=0.1.2-rc.1 <0.2.0 line
  5. Production-ready? rc stage has breaking changes; ecosystem play is fine now

Full FAQ: docs/faq.md

⚖️ dsh vs mainstream 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+ packages config/hooks config config none none
Custom UI ✅ (client half) ❌ ❌ partial ❌ ❌
Automation/CI ✅ headless ✅ ✅ ✅ ✅ ✅
TUI plugin-able ✅ 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 Google Kimi

📊 Same model × different agents (measured 2026-08-13)

Same model deepseek-v4-flash (same gateway, same key) — only the agent engineering layer differs. All 5 tasks completed correctly; the difference is efficiency:

Agent Total time Correct
omp 70s 45/45 ✅
dsh 130s 45/45 ✅
opencode 172s 45/45 ✅

5 tasks × 3 rounds, median; all 45/45 correct. Full methodology: 📊 Benchmark appendix

benchmark bar chart: omp 70s / dsh 130s / opencode 172s

📄 PDF

  • Chinese full edition: DeepSeek-Harness-白皮书.pdf (15 chapters + appendices A–C, ~130k+ chars, 5.5MB, professional typesetting: cover/TOC/styles)
  • English edition: DeepSeek-Harness-Handbook.pdf (14 chapters + appendices, 81 pages, ~150k chars, 1.6MB, professional typesetting: cover/TOC/styles; appendices in Chinese original — EN edition covers 14 chapters; Ch. 15 available online)

🌐 Ecosystem Links

Methodology comes from real open-source work:

🧩 Recommended Community Plugins (from Official Discussions / awesome-dsh-plugin)

Plugin Description
dsh-specflow Spec-driven development: skills, commands, target tracking, progress context
dsh-gitflow Approval-gated Git workflows (status/diff/commit/branch)
dsh-guardian Guardrails: dangerous operation policy check + output sanitization
dsh-code-intel Tree-sitter code symbol indexing + hybrid search
dsh-tianshu-tui Terminal UI (TUI) for dsh
dsh-computer-use Accessibility-first macOS computer control
dsh-data-agent Database connection & SQL-writing agent
dsh-balance-meter Real-time balance and session cost tracking

Full list at awesome-dsh-plugin (122+ plugins). Want yours listed? Community Case Submissions

📣 Active on Official Discussions

Active on deepseek-ai/deepseek-harness Discussions — 8 threads: #380 plugin pitfalls / #401 Windows path bugs / #392 TUI suggestions / #384 visionDS / #118 / #655 community five projects / #735 token cost / #781 LSP proposal

🙏 Contribute

  • ⭐ Found it useful? Star it — it drives continued updates
  • 📝 Run a real case? Submit it to be featured in the handbook (with author credit + quarterly curated PDF): Community Case Submissions ← reply directly, template ready
  • Commands broken? rc releases iterate fast — open an issue
  • Want to help? See CONTRIBUTING.md · ROADMAP.md · Ch. 7: Ecosystem

ℹ️ Version

  • Prose measured against dsh 0.1.0-rc.6 / DeepSeek-V4-Flash-0731 (open-sourced 2026-08-13); version line synced to v0.1.3-alpha.1 (npm published line 0.1.2-rc.1)
  • Verified on Windows 11 + Node 24

📜 License

Content CC BY-NC-SA 4.0 · Example code MIT

Explore related projects

Loading…