DeepSeek Opens Harness: How a Plug‑in‑First Architecture Makes Every Agent Component Swappable
DeepSeek's newly open‑sourced Harness (dsh) introduces a plug‑in‑first design that decouples models, tools, sessions, storage, and UI into interchangeable modules, detailing its Cordis meta‑framework, profile‑bundle layering, turn/step loop, event system, and early support for context compression and long‑term memory.
DeepSeek Harness Developer Preview (v0.1) Overview
DeepSeek released the developer preview of Harness (dsh) under the MIT license. The project’s ambition is not merely to build a functional Agent but to create a foundational framework where every component—model adapters, tools, session logs, and the Agent loop—can be replaced via plug‑ins.
Core Design: "Everything Is a Plug‑in"
The engine is driven by the Cordis meta‑framework, inspired by the paper "A Programming Paradigm for Spatiotemporal Composability". Cordis treats plugins as contributors to a shared context, providing typed events and reversible effects. Consequently, there is no privileged kernel; extending dsh only requires mounting new plugins alongside the existing tree, and uninstalling a plugin automatically revokes its registrations.
Profile and Bundle – Layered Assembly
A Bundle packages a set of Cordis configuration lines and associated code, while a Profile (the cordis.patch.yml file) lists the bundles to load and can install external plugins. The runtime builds the plugin tree by applying bundles in the order defined by the profile, then applying profile‑level, user‑level, and command‑line patches (e.g., --patch). dsh --profile web --dump-config Each line in the dumped configuration can be replaced via a patch, turning code changes into configuration edits.
Agent Loop: Turn and Step Model
In dsh, a step consists of a single model request plus any tool calls it triggers. A turn comprises zero or more steps, starting with the first input and ending when no pending work remains.
-> Claim next input and queued messages<br/>-> Assemble prompt partitions and tool schema<br/>-> Enter agent/pre-step to decide model visibility<br/>-> Append messages to the log<br/>-> Issue model request<br/>-> Stream results<br/>-> Invoke tools as needed<br/>-> Decide whether another step is needed until the turn finishesThe loop itself is a default plug‑in ( core/agent-loop) that can be fully replaced with custom scheduling logic.
Event System – Extension Points
Every critical node in the loop emits an event that plugins can listen to or intercept. Events are categorized as:
Session events : persistent facts written to the log, broadcast via session/event.
Agent events ( agent/*): carry a live Agent object (inbox, steps, state, request, validation) for observation or intervention.
Capability events : attached to file‑system, tools, telemetry, etc., without involving the loop.
Session, Agent, and Capability events follow a waterfall pattern requiring an explicit next() call to continue, while agent/turn-stopping is a serial event that terminates a turn without next().
Session Log as the Single Source of Truth
All model‑visible data must be reconstructible from the append‑only SessionEvent stream. The function deriveMessages() projects this log into the model’s view, while the assistant/chunk stream preserves full fidelity for replay and UI rendering. This design enables fork, resume, full trajectory replay, telemetry, and persistence without separate snapshot logic.
Compression and Memory – Early‑Stage Capabilities
The compaction/ package defines a replaceable compression interface with a basic provider implementation. The ecosystem already offers third‑party plugins for adaptive context compression (ACP), long‑term memory, and causal‑graph retrieval, reflecting the community’s effort to tackle these frontier challenges.
Capability Seam – Global Replacement
A seam consists of three roles: Service Definition, Service Provider, and Consumer (typically a model‑oriented tool). A single package can fulfill multiple roles, but all three are needed for a complete seam. Replacing a seam component propagates globally—for example, swapping the file‑system and subprocess providers to a remote sandbox instantly migrates Bash, PTY, and LSP capabilities.
Four Runtime Modes
Standard mode : full tool suite.
PTC mode : programmatic tool calling where the model generates code to orchestrate multi‑turn tool usage.
Minimal mode : only a shell tool and a file‑edit tool for baseline testing.
Creation mode : inspect the runtime and experiment with Cordis plugins to craft new modes.
Quick start on a machine with Node.js: npx @deepseek-ai/dsh web Build from source:
git clone https://github.com/deepseek-ai/deepseek-harness.git<br/>cd deepseek-harness<br/>pnpm install<br/>pnpm run build<br/>pnpm dsh webConclusion
DeepSeek emphasizes that the architectural choice—making every component a plug‑in with no privileged core—is the most significant outcome of the v0.1 release. The framework provides a clean, controllable foundation; its ultimate potential depends on the community extending it with advanced compression, memory, and multi‑Agent collaboration features.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
TonyBai
Tony Bai's tech world (tonybai.com). Not satisfied with just "knowing how", we strive for mastery. Focused on Go language internals, high-quality engineering practices, and cloud‑native architecture, exploring cutting‑edge intersections of Go and AI. Gophers who pursue technology are welcome—follow me and evolve with Go.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
