AI State of the Art
SOTA/Agents & Tool Use/16 min
Section 156

DeepSeek Harness: The All-Plugin Agent

Listen as a podcast →

The Event, and Why It Is More Than News

On August 13, 2026, the same day its V4-Pro model went generally available, DeepSeek published DeepSeek Harness (command dsh): the complete program its agents run in, under an MIT license, full code on GitHub. The reception gives the scale: roughly 90,000 GitHub stars in two days, one of the fastest starts the platform has ever seen.

Until now, DeepSeek was the company that crashed the price of models (see DeepSeek). This time it goes after the layer above: the software that surrounds the model. And it ships a genuine design paper with it, which is rare for this kind of tool.

First, What Is a "Harness"?

The word comes from horses: the harness is what connects the animal to the cart and turns its strength into useful work. In AI, the agent harness is the program surrounding the language model that turns its text into actions: the loop that calls it again and again, the tool catalogue, context management, the sandbox that runs code, the log of what happened.

It is exactly what the LLM agents lesson calls the scaffold, and whose patterns tool use and orchestration details. The reminder that matters: the model only produces text; everything that gives that text consequences lives in the harness. Claude Code (Anthropic) and Codex CLI (OpenAI) are harnesses. What 2026 changed is that this layer became a product in its own right, and now an open one.

The Central Idea: Everything Is a Plugin, Even the Loop

The architecture of dsh fits in one sentence from its documentation: the model adapter is a plugin, the tool catalogue is a plugin, session storage is a plugin, the sandbox is a plugin, the interface is a plugin, and the agent's main loop is itself a plugin.

At the centre sits a micro-kernel: a tiny core whose only job is to plug, unplug and replace plugins while the program is running, without a restart. That core is called Cordis, and it was not invented for the occasion: it is a plugin framework with four years of production service in another open source project (the Koishi chatbot framework).

Concretely, execution is cut into interceptable events. A step is one call to the model plus the tool calls that follow from it; a turn is the sequence of steps between a request and its answer. Every stage (turn/start, system-prompt/assemble, tools/execute, step/end...) can be observed or modified by a plugin. Where the frameworks described in CrewAI and LangGraph make you pick a structure up front, dsh exposes the structure itself as something you can swap.

Three concrete capabilities follow:

  • Hot swapping. Change the model, a tool or the storage without stopping the agent or losing the running session.
  • The log as a contract. The harness enforces an invariant that is easy to state: what the model saw has been logged. The event stream only ever grows, never rewrites itself, which makes it possible to resume a session, duplicate it to try something else, or replay it to understand an incident.
  • Code mode. Rather than chaining ten round trips of tool calls, the model can write a small TypeScript program that batches those ten calls into a single execution. Fewer round trips, less context burned.
The plugin that writes plugins, handle with care

dsh includes a family of tools that lets the agent inspect and write its own plugins while it runs. This is the "self-evolution" claim that went around social media, and it should be read with the project's own precautions: the capability is off by default, and limited to memory (nothing is written to disk). An agent that modifies its own tooling stacks up the risks described in prompt injection and tool use: if poisoned content influences the plugin's code, the harness itself is compromised. The distinction to keep: the demonstration is real, and a sensible deployment leaves it off.

The Paper: Grounding "Unplug Cleanly"

Alongside the code, DeepSeek and researchers from Peking University published a paper, "A Programming Paradigm for Spatiotemporal Composability", which formalises what the kernel guarantees. Behind the intimidating title, two ideas that can be said in plain words.

Revertible effects. Every change a plugin makes (adding a tool, changing an instruction, opening a connection) is recorded together with its undo, which the kernel keeps. Unplugging a plugin means replaying its undos in reverse order. That is what makes hot swapping dependable: nothing stays attached, no orphaned state lingers. The paper calls this composability in time.

Reactive coeffects. Every plugin declares what it needs in order to work (this service, that configuration). The kernel activates it when its needs are met, and deactivates it on its own when one of them disappears. Dependencies are no longer wired by hand: you declare them, and activation follows. The paper calls this composability in space.

Published on GitHub rather than arXiv, this paper is not a model-science advance: it is software engineering, formalised. Its value lies elsewhere: it explains why hot swapping, which sooner or later breaks in most plugin systems, can be guaranteed here by construction.

What Early Testing Holds Against It, Deservedly

This page's habit applies to harnesses as much as to models: launch numbers get read together with the counter-evidence. Three serious criticisms surfaced within days.

Flexibility is paid in tokens. An independent preliminary test measured the same task on the same model: around 47,600 tokens consumed with dsh against 4,500 with a minimalist harness (Pi). An order of magnitude. All that event-and-plugin machinery lengthens what the model reads on every turn, and you pay for those tokens.

It is a preview, and says so. Version 0.1.0-rc, breaking changes promised, a third-party plugin ecosystem still failing widely under test. One already-confirmed bug sums up the era nicely: dsh reads both the CLAUDE.md and AGENTS.md instruction files, and when the two are identical (a common cross-tool compatibility practice), the instructions get injected twice into the system prompt.

Complexity has to earn its keep. For most uses a simple harness is enough, and the most-repeated criticism asks who actually needs to hot-swap their agent loop. The honest answer: few people today; the infrastructures running many long-lived agents, perhaps, tomorrow.

The Bigger Picture: Commoditisation Moves Up One Floor

The move is the same one told in DeepSeek, applied one floor up. In 2025, DeepSeek showed a frontier model could cost ten times less; market prices followed. In August 2026, dsh argues that the harness has no business being a closed product tied to a subscription: here it is under MIT, compatible with some forty model providers, and able to delegate subtasks to Claude Code or Codex CLI as if they were ordinary tools.

One detail of the repository says something about the era: it contains 1,386 "agent notes" documenting architecture decisions, a trace of the fact that the harness was largely built by agents running inside it. The tool is the first user of its own philosophy.

What to remember fits in three sentences. The harness has become a layer of its own, distinct from the model, and it is the layer that decides what an agent can actually do. dsh pushes one strong idea, everything hot-swappable with formal guarantees, and pays for it with a real overhead in tokens and complexity. And the event confirms the market's trajectory: after model prices, it is agent tooling that is being commoditised into open source.

Check your understanding0 / 4

1. In this page's vocabulary, what is an agent « harness »?

2. « Everything is a plugin, even the agent's main loop. » What does this architecture actually make possible?

3. Why does the kernel keep an « undo » for every change a plugin makes?

4. A preliminary test measures ~47,600 tokens consumed by dsh where a minimalist harness consumes ~4,500, for the same task and the same model. What should you conclude?