Intermediate 4 min

DeepSeek Harness

Everything is a plugin — even the agent loop

Prerequisites

  • Agentic Coding Basics

What You'll Learn

  • Explain plugin-first harness architecture
  • See how a swappable agent loop changes what a harness is
  • Judge when preview-stage churn is worth the flexibility

Youone promptHarnessmodel calltool runfeed result backcontextModeltokens in, outLesson 1 recap — the harness is the loop around the model.The Harness, Recapped
01/06
0:00 / 0:31

Plugin-first, precisely

Everything in dsh is a plugin built on the Cordis composability framework: model adapters, the tool registry, the session log, the sandbox, and the agent loop itself are all swappable.

That sentence is doing more work than it looks like. Most harnesses have a plugin story that means "you can add tools at the edges." A composability framework like Cordis inverts that: the core stops being a program with extension points and becomes a board of sockets, where each layer declares an interface and ships as a plugin against it. The interesting consequence is not that you can add things — it is that you can remove and replace the things that came in the box.

Model adapter

Which model answers, and how requests are shaped for it.

Tool registry

What the agent is allowed to do — and how new abilities register.

Session log

How every turn is recorded, replayed, and audited.

Sandbox

Where code and commands actually execute, and with what isolation.

Agent loop

The decision cycle itself — the part no other harness lets you replace.

The project is MIT-licensed, so you can read — and replace — any layer of the stack. Trying it takes one command:

npx @deepseek-ai/dsh web

DeepSeek publishes dsh at github.com/deepseek-ai/deepseek-harness under the MIT license. Facts on this page verified as of August 2026.

Monolithic vs plugin-first, layer by layer

LayerTypical monolithic harnessPlugin-first (dsh)
Model adapterHardwired to the vendor. New providers wait on a release.A plugin. Register an adapter; swap providers without touching the loop.
Tool registryA fixed built-in set, extended through bolt-on protocols.A plugin. The registry itself is replaceable, not just the tools in it.
Session logAn internal format you read but never redirect.A plugin. Log to your own store; replay and audit on your terms.
SandboxOne execution policy. Take it or leave it.A plugin. Bring your own isolation model.
Agent loopThe product itself. You configure it; you never replace it.A plugin. Linear today, plan-first tomorrow — or yours, if you write one.

The right-hand column is one fact wearing five hats — the claim quoted above: every one of these layers is a Cordis plugin. The left-hand column describes the archetype, not any single product; mature harnesses expose some of these layers, but none lets you replace the loop.

Should you build on a v0.1?

DeepSeek Harness (dsh) is a v0.1 developer preview as of August 2026 — DeepSeek says its APIs are expected to break. That is not a footnote — it is the price tag for everything this lesson just showed you. Take it at face value and decide like an engineer.

Reach for dsh when

  • You need to replace a layer no mainstream harness exposes — a custom sandbox, your own session store, or a bespoke agent loop.
  • You are studying harness design and want a reference where every layer is legible and detachable. The project is MIT-licensed, so you can read — and replace — any layer of the stack.
  • You are prototyping an orchestrator that drives other harnesses as workers, and you want that nesting as a first-class feature rather than shell scripts.
  • The project is an experiment you can afford to rewrite when the APIs shift.

Hold off when

  • This is load-bearing team tooling. Preview churn becomes everyone's problem, on nobody's schedule.
  • You cannot budget recurring time to chase breaking API changes across your own plugins.
  • You only need default behavior. If you would never swap a socket, a stable harness gives you the same loop without the churn tax.

The honest summary: dsh is the most interesting answer right now to "what if the harness were entirely replaceable?" — and the least settled one. Both halves of that sentence are load-bearing.

💡 Pro Tips

  • 1.Pin the exact dsh version and upgrade deliberately. Preview APIs break by design — make breakage a scheduled event, not a surprise in your Tuesday.
  • 2.Put a thin adapter of your own between your code and each dsh plugin interface you touch. When the API shifts, you patch one file instead of every plugin.
  • 3.Before writing a custom loop, read the built-in loop plugin's source. It is the best document of how dsh actually thinks, and the license means nothing is hidden from you.
  • 4.Use the harness-as-subagent feature as an escape hatch: keep a mature harness doing the work it is already good at, and let dsh be the orchestration layer you actually wanted to customize.

Go deeper in the repo

dsh documents its own architecture unusually well — these live in the repository this lesson is checked against:

The walkthrough, as text

  1. 1. The Harness, Recapped

    A harness is the machinery around the model: the loop that sends prompts, runs the tools the model asks for, and feeds results back until the job is done. This lesson assumes that mental model from the basics lesson.

  2. 2. Everything Is a Plugin

    Everything in dsh is a plugin built on the Cordis composability framework: model adapters, the tool registry, the session log, the sandbox, and the agent loop itself are all swappable. Where a typical harness is one welded unit, dsh is a socket board.

  3. 3. Swap a Model Adapter

    Because the model adapter sits behind a socket, changing providers is an unplug and a replug. The tool registry, session log, sandbox, and loop never notice.

  4. 4. Swap the Loop Itself

    The punchline: the agent loop is a plugin too. Pull out a linear read-act-repeat loop and seat a plan-first loop in the same socket — every other layer stays put.

  5. 5. Harnesses as Subagents

    dsh can invoke other harnesses, including Claude Code and Codex, as subagents. The harness stops being the whole world and becomes an orchestrator of other harnesses.

  6. 6. The v0.1 Fine Print

    DeepSeek Harness (dsh) is a v0.1 developer preview as of August 2026 — DeepSeek says its APIs are expected to break. Flexibility this deep is priced in churn — decide whether you can afford it before you build on it.

Facts verified against the DeepSeek Harness repository and official docs, as of August 2026.

New lessons, straight to your inbox

5 more harness deep dives are on the roadmap. Subscribers read them first — free.