DeepSeek Harness

What is DeepSeek Harness?

A language model on its own has no tools, no permissions, no session state and no interface. DeepSeek Harness is the runtime that supplies them — and the plugin system that lets a domain workflow become a first-class surface.

A model is not an agent

An API call to a language model is a text transformation: messages in, tokens out. That is a useful primitive, but it is not an agent. An agent is a loop that decides to act, acts through tools, observes the result and continues — and every one of those verbs implies machinery the model does not have.

Consider what has to exist before a model can do a day of work on a codebase or a target list:

  • Tool definitions and execution. The model must be told which capabilities exist, in a schema it can call reliably, and something must translate a call into a real process, API request or file write.
  • Permissions. A tool call is an action taken with your account's authority. Someone, or something, has to decide whether this particular action may run, ask a human when the answer is not obvious, and refuse when nobody answers.
  • State. A conversation window is not a record. The runtime needs a durable log of what was said and done, so a session can be resumed, audited, compacted or replayed.
  • An interface. Someone has to stream the work, show pending approvals, display artifacts and let a human intervene without editing JSON.
  • An extension path that is not a fork. Every domain — security testing, data analysis, support — needs its own tools and its own panel. If adding them means patching the core, the runtime is already dead.

That list is the job of an agent harness. DeepSeek Harness, abbreviated dsh, is DeepSeek AI's open-source implementation of one. Its own documentation describes the design in one line: everything is a plugin.

What DeepSeek Harness is

DeepSeek Harness is an agent runtime written in TypeScript/Node and published under the MIT licence at deepseek-ai/deepseek-harness. It ships as the npm package @deepseek-ai/dsh and as a signed desktop application. At the time of writing, the registry's latest release is 0.2.2-rc.5 (18 November 2026); the source checks behind this article were made against the installed 0.2.2-rc.3 (13 November 2026), the release this site's plugin verifies against. The package declares Node.js >= 24.9.0 and is explicitly a developer preview: the repository warns that compatibility-breaking changes will happen.

The architecture is unusual in one respect that matters more than any feature list. dsh is built on Cordis, a plugin framework where plugins contribute services, typed events and reversible effects to a shared context. There is no privileged core to patch: the model adapter, the tool registry, the session log and the agent loop are themselves plugins. A running dsh is therefore composed as a plugin tree at boot rather than an application with a fixed extension API, and every part of it can be replaced from configuration.

That tree is assembled in layers. A profile — web, headless, sdk, sdk-minimal or acp — names an ordered set of bundles; the profile's own cordis.patch.yml, the user's home patch and any --patch overlay are applied on top. A patch inserts rows or replaces one row's whole configuration, which is why a third-party plugin can add a tool without forking the bundle beneath it.

Anatomy of a running DeepSeek Harness Web client — browser Cordis client plugins · slots · right-sidebar tabs · theme tokens dsh host process (Node) Agent loop turn → step Tool registry ctx.tools · schemas Execution approval · sandbox Web server HTTP + SSE · plugin routes Model adapter ctx.llm Session store append-only events · JSONL Plugin manager bundles · profiles state under $DSH_HOME · one plugin tree per profile HTTP + SSE argv · filesystem · network Your account, the OS and the network the real boundary: user permissions, containers and network policy
The two halves of a running harness. The Node host owns the loop, the tools, the policy decisions and the state; the browser is a client assembled from the same plugin graph. Only the host touches the filesystem and the network.

A session is the unit of work, and the session log is the source of truth. dsh records durable SessionEvents — turns, steps, messages, tool calls, tool results — in an append-only log and derives what the model sees from it. The documentation states the invariant bluntly: model-visible means logged. Every request must be reconstructable from the log, which is what makes resume, forking, transcripts and audit possible without a second, drifting record.

Work proceeds in a loop of turns and steps. A step is one model request plus the tools it calls; the request passes through prompt assembly and a tool pipeline that applies hooks, permission checks and sandbox policy before a tool body runs. The approval seam answers exactly one question — may this specific action proceed — with a closed set of outcomes. Only allowed-once opens the gate; a missing answerer, a rejection or a cancellation fails closed. The sandbox seam separately bounds file effects with three modes: read-only, workspace-write and danger-full-access. Note what that vocabulary covers: filesystem effects, not network reach or process visibility.

Around the loop sit the capabilities most users meet first. Skills are optional instruction packs — discovered from providers, loaded on demand by the model through a skill tool — that teach procedure without consuming context until needed. Agent presets are YAML-declared compositions that give one session a different capability set from another. And storage is a seam with JSON and SQLite backends for everything that is not a session event, rooted by default under $DSH_HOME or ~/.dsh.

How a plugin becomes part of the harness

Installable extensions in dsh are bundles. A bundle is an ordinary package that declares a patch file in its manifest:

{
  "name": "dsh-redteam",
  "exports": {
    ".": "./index.js",
    "./client": "./client.js",
    "./locale/*.json": "./locale/*.json",
    "./icon": "./icon.svg"
  },
  "dsh": {
    "bundle": { "patch": "./cordis.patch.yml" },
    "client": {
      "platform": "web",
      "immediately": true,
      "inject": ["@deepseek-ai/dsh-client-ui-slots", "@deepseek-ai/dsh-client-ui-sidebar-right"]
    }
  }
}

The patch is a loader document, not code. It inserts rows into the composed tree, and each row names a module and carries that plugin's configuration:

- insert:
    - id: dsh-redteam
      name: 'dsh-redteam'
      config:
        defaultMode: default

The Host half is a Cordis plugin with the standard export shape: an apply(ctx, config) function, an optional inject list naming the services it needs, and an optional Config schema that validates the row. Registrations go through ctx.effect() or ctx.on(), so unloading the plugin unwinds its tools, routes and listeners in order. The redteam bundle, for example, injects tools and webServer, registers its agent tools on the former and an HTTP bridge on the latter.

Anatomy of a bundle package.json name · version · files exports: "." · "./client" dsh.bundle.patch → patch file dsh.client: platform, inject locale and icon exports no dependencies required cordis.patch.yml - insert: - id: dsh-redteam name: 'dsh-redteam' Host plugin index.js · apply(ctx, config) inject: tools, webServer Client bundle client.js · slots.register sidebarRightTabs dsh.client locale/en.json meta.title meta.description meta.detail icon.svg read without activating the plugin docs/DETAIL.md bundle detail page; relative links stay text exports Rows mount the Host plugin at boot; the Client bundle is fetched by the module loader when the page loads.
One package, three audiences. The manifest is what the installer reads, the patch is what the loader composes, and the locale, icon and detail document are what the Plugin Manager shows before anything is activated.

The manifest also carries the display contract. locale/en.json supplies meta.title, meta.description and an optional meta.detail document; ./icon exports an SVG, PNG, JPEG or WebP under 256 KiB. The Plugin Manager reads those files directly, without activating the plugin, so a bundle has a name, a description, a detail page and an icon before it ever runs.

Installation is deliberately boring. dsh plugin --profile web add <path> forwards to pnpm inside the profile, records the link, and appends the bundle to dsh.profile.bundles. Because the package declares dsh.bundle.patch, dsh selects the bundle too. The link points at the checkout rather than copying it, which is convenient during development and means moving the directory breaks the install.

Why the client side matters

Most agent tooling stops at the chat box: a plugin adds a tool, the model calls it, and the human reads a wall of text. dsh's client is a second Cordis application assembled from independently loaded plugins, and its composition system — slots — is typed. A feature registers a React component into a declared slot with ctx.slots.inject() and ctx.slots.register(); registering into an undeclared slot fails at activation rather than silently rendering nothing. Registrations follow the plugin's effect lifetime and disappear when it unloads.

That is how a plugin gets a first-class panel instead of a slash command. The right sidebar is itself a docking surface with a tab-type registry: a plugin registers a tab type, a body and a title, and inherits drag, split, float, fullscreen, resize and per-session layout memory. The redteam bundle registers its panel as the redteam kind through sidebarRightTabs, contributes into sidebar.right.pane.tab and .title, and follows the Host's --dsw-alias-* theme tokens so light, dark and system appearance work without a second stylesheet.

The practical difference: a panel can show state the model never speaks aloud — a phase rail, a live graph, pending approvals, a hash list — and the agent's tools can write to the same store. An operator action and an agent action become two views of one object rather than two conversations about it. That is the design the dsh-redteam guide exercises end to end, and it is why the client architecture is worth understanding even if you only write Host tools.

What the harness is not

The honest limits are as important as the features, and dsh documents several of them itself.

  • It is not a hosted service. You run the process: npx @deepseek-ai/dsh web serves the UI on 127.0.0.1:3080 by default, and a public deployment is your reverse proxy and your problem. Sessions, credentials and state live in your $DSH_HOME.
  • It is not a security boundary by itself. Approvals are a policy seam, not a jail: a missing or broken answerer fails closed, but danger-full-access deliberately bypasses file confinement, and the sandbox vocabulary covers filesystem effects only — not network egress, not process visibility. The boundary is the OS account, the container and the network policy around the process.
  • It does not authorize anything. A harness can run a tool with your authority; it cannot verify that you were permitted to point that tool at a target. Controls such as scope checks and Rules of Engagement are properties of the plugins that implement them, with a human still owning the authorization.
  • It is not finished. The project labels itself a developer preview and warns of breaking changes; plugin APIs, session formats and profile composition have already moved between release candidates.
  • It is not the model. A better harness gives a model better tools, memory and review; it does not make a weak model reliable or a careless operator safe.

Read that list as a map of where to invest. If you need a managed agent platform, this is not it. If you need a runtime you can inspect, extend and run yourself — with the extension mechanism documented down to the manifest field — dsh is a credible base. The next article takes the harness into security work, and the third shows one bundle that turns it into an engagement workbench.

Key takeaways

  • A model is a text transformation; an agent needs a loop, tools, permissions, durable state and an interface. dsh supplies that runtime.
  • dsh is MIT-licensed, built on Cordis and composed entirely of plugins: profiles order bundles, patches insert or override rows, and nothing is privileged.
  • A bundle is a package declaring dsh.bundle.patch; a Host plugin is apply(ctx, config) with injected services, and a Client bundle registers typed slots into the Web UI.
  • Sessions are append-only event logs, and the documentation's invariant is that everything model-visible is logged.
  • Approvals fail closed and the sandbox bounds filesystem effects only — the real security boundary is still the OS account, container and network around the process.