DeepSeek Harness

Everything is a Plugin|Agent = Model + Harness

DeepSeek Harness is an open-source, production-grade AI Agent execution scaffolding built by DeepSeek. Grounded in the core engineering paradigm of 'Agent = Model + Harness', while the model acts as the reasoning engine, Harness serves as the control center managing environment interaction, tool contracts, context flow, and sandboxing. Powered by the Cordis plugin kernel and native KV Cache optimization, it delivers a high-throughput, modular, and cost-effective agent infrastructure.

What is DeepSeek Harness

DeepSeek Harness is a next-generation AI Agent execution scaffolding open-sourced by DeepSeek. It embodies the classic 'Agent = Model + Harness' engineering paradigm—where Large Language Models provide cognitive reasoning, and Harness acts as the central nervous system enabling safe physical execution, precise command-line control, and persistent long-term memory.

Built entirely on the lightweight Cordis plugin kernel, DeepSeek Harness separates core routing from business logic. LLM provider interfaces, tool contracts, sandbox isolation, session storage, and UI components are completely decoupled into standard plugins. Developers can select, swap, or compose capabilities directly in configuration files without modifying core framework source code.

To support diverse engineering and evaluation workflows, Harness provides 4 preset modes: Standard Mode, PTC Mode (TypeScript orchestration), Minimal Mode (zero-noise benchmarks), and Creative Mode (in-memory plugin labs). All model perceptions and tool actions are logged into an append-only Trajectory event stream, providing complete auditability, timeline tracing, branch forking, and session replay.

Core Features

Open architecture powered by the Cordis plugin system, featuring DeepSeek KV Cache optimization, append-only Trajectory logs, and multi-mode presets.

Cordis Kernel & Plugin Architecture

1. Cordis Plugin Kernel & Decoupled Design (Everything as a Plugin)

Eliminates legacy frameworks that hardcode Agent flows into Python scripts. Built on the Cordis plugin framework, DeepSeek Harness decouples models, tools, skills, sessions, sandboxes, storage, loops, scheduling, and UI into pluggable components. The Cordis kernel manages lifecycles and dependency routing for maximum extensibility.

1. Cordis Plugin Kernel (Cordis Kernel)
Lightweight Cordis Kernel
Handles plugin loading, unloading & dependency routing without hardcoded business logic
Everything as a Plugin
Models, tools, skills, sessions, sandboxes, storage, loops, scheduling & UI are all independent plugins
Cordis Services & Events
Plugins collaborate seamlessly via standardized Cordis service interfaces and event buses
Config-Level Composition
Select, replace, or extend capabilities in YAML/JSON config without touching Harness source code
4 Preset Agent Running Modes

Includes Standard mode, PTC mode (Code Mode SDK), Minimal mode, and Creative mode presets with declarative YAML config switching and composition to seamlessly cover full-stack coding, testing, and debugging workflows.

Tool Contracts & Sandbox Safety

Enforces unambiguous TypeScript tool contract specs with high-precision multi-chunk diff code replacement algorithms paired with Docker container isolated sandboxes for stable and secure code execution.

Built-in DSBench Automated Suite

Out-of-the-box DSBench & LM-Eval benchmark runner suites logging append-only Trajectory event streams in real time for automated CI/CD regression testing and RL feedback alignment.

Competitor Comparison

Comparing DeepSeek Harness against leading open-source AI Agent frameworks in architecture, extensibility, and observability.

Architecture Philosophy
OpenClaw
Open-source autonomous AI coding agent framework (Docker + Web/CLI)
Hermes Agent
Open-source lightweight Agent prototyping & experiment library by Nous Research
OpenHands
Open-source AI software engineering agent platform for autonomous coding
DeepSeek Harness推荐方案
Plugin-based Agent infrastructure built on Cordis (Agent = Model + Harness)
License & Deployment
OpenClaw
MIT Licensed open source, supports local & Docker container deployment
Hermes Agent
Apache/MIT Licensed open source, supports Python local source deployment
OpenHands
MIT Licensed open source, supports Docker containerization & local deployment
DeepSeek Harness推荐方案
MIT Licensed open source, available via npm (@deepseek-ai/dsh) & GitHub
Extensibility & Plugins
OpenClaw
Supports custom tool scripts and prompt templates; deep changes require Python code edits
Hermes Agent
Requires writing Python subclass inheritance; extensions closely coupled with core logic
OpenHands
Supports event-driven architecture and custom Micro-Agents via Python SDK
DeepSeek Harness推荐方案
Everything is a plugin; freely compose models, tools & sandboxes in config
Observability & Trajectory Logs
OpenClaw
Offers WebSocket/Web console and JSON logs; lacks standardized trajectory replay
Hermes Agent
Standard console print output & log files without interactive trajectory tracing
OpenHands
Provides interactive Web UI and Action/Observation logs; lacks full trajectory forking
DeepSeek Harness推荐方案
Trajectory append-only event logs, full trace, fork & replay
KV Cache & Token Cost
OpenClaw
Relies on generic prompt concatenation without prefix cache alignment optimization
Hermes Agent
Basic Python prompt construction with high redundant calculations during multi-turn code edits
OpenHands
Standard LLM interaction loops; higher Token consumption during multi-turn complex tool calls
DeepSeek Harness推荐方案
Deeply aligned with DeepSeek architecture; 99.93% prefix cache hit rate, saving 80%+ Token costs
Sandbox Safety & Tool Contracts
OpenClaw
Docker container sandbox with standard Shell execution; parameter validation relies on LLM compliance
Hermes Agent
Native Python function calls and local process execution; sandbox security depends on host setup
OpenHands
Event Stream & Docker container runtime for strong isolation, requiring complex setup
DeepSeek Harness推荐方案
Unambiguous TypeScript Tool Contracts with lossless multi-chunk diff replacement and secure sandbox
Benchmark & Evaluation Suite
OpenClaw
Focused on interactive task execution without built-in automated benchmark runner suites
Hermes Agent
Mainly used for experimental scripts; requires developers to manually set up evaluation logic
OpenHands
Supports SWE-bench evaluation benchmarks; microservice evaluation setup is relatively complex
DeepSeek Harness推荐方案
Built-in DSBench & Eval Harness suites supporting automated regression pipelines
Quickstart Command
OpenClaw
Install via Docker or Python virtualenv and configure environment variables
Hermes Agent
Clone repository via Git and set up local Python dependency environment
OpenHands
Deploy via Docker container or launch inside Python virtual environment
DeepSeek Harness推荐方案
npx @deepseek-ai/dsh web / git clone deepseek-harness
Preset Running Modes
OpenClaw
CLI interaction and Web UI execution modes focused on assistant scenarios
Hermes Agent
Hardcoded Python script execution mode without decoupled preset scheduling
OpenHands
Supports CodeAct mode, Browser mode, and Batch evaluation mode
DeepSeek Harness推荐方案
4 preset modes: Standard, PTC, Minimal & Creative

Application Scenarios

Extending across full-stack coding, automated scripts, plugin development, benchmark evaluations, and long-running tasks via Cordis architecture.

Full-Stack Coding (Standard Mode)

Out-of-the-box coding Agent with native support for file editing & diff replacement, Shell execution, semantic code search, Skills expansion, and sub-agent task planning.

Programmatic Tool Orchestration (PTC Mode)

Exposes tool contracts via Code Mode SDK, empowering models to write TypeScript code that expresses complex loops, branches, and conditional logic with lower token overhead.

In-Memory Plugin Lab (Creative Mode)

Tailored for custom Agent presets and developer debugging, enabling live in-memory Cordis plugin hot-reloading to rapidly validate new tool contracts and service routes.

Model Benchmark Evaluation (Minimal Mode)

Retains only persistent bash and file-replace dual tools, eliminating prompt noise and extra plugins to provide a clean environment for benchmarks like SWE-bench and DSBench.

Full Trajectory Audits & Replays

Powered by append-only session logs and Trajectory views to deconstruct system prompts, reasoning traces (Think), and tool calls, supporting branch forking and idempotent replay.

Community Plugin Development (dsh-plugin)

Adheres to Cordis service registration & event standards, allowing developers to build and publish custom plugins to GitHub Topic (dsh-plugin) to enrich the open ecosystem.

Frequently Asked Questions

Comprehensive answers regarding DeepSeek Harness architecture, Cordis plugin system, 99.93% KV Cache hit rate, Trajectory tracking, and private deployments.

What is DeepSeek Harness, and how does it differ from traditional LLM SDKs?

DeepSeek Harness is an industrial-grade AI Agent execution scaffolding open-sourced by DeepSeek based on the 'Agent = Model + Harness' paradigm. Unlike traditional SDKs providing raw API calls, Harness manages environment interaction, Tool-Contract scheduling, context management, and sandbox safety to grant DeepSeek models autonomous execution capabilities.

How does DeepSeek Harness achieve up to a 99.93% KV Cache hit rate?

DeepSeek Harness is deeply aligned with DeepSeek-V3/R1 native Prefix Cache architecture. By enforcing strict prompt prefix ordering, fixing system Tool-Contract definitions, and chunking incremental conversation histories, it eliminates redundant context re-computation, achieving a 99.93% KV Cache hit rate and cutting Token costs by 80%+.

What does 'Everything is a Plugin' mean, and how does the Cordis system work?

Built on the Cordis plugin kernel, DeepSeek Harness decouples model providers, tools, skills, sandboxes, session storage, and UI into independent plugins. The lightweight Cordis kernel handles lifecycles and service routing without hardcoding agent logic. Developers can declaratively swap or extend any capability in configuration files.

What are the 4 preset modes (Standard / PTC / Minimal / Creative) used for?

Harness provides 4 preset modes tailored for different engineering tasks: Standard Mode for out-of-the-box coding automation; PTC Mode using Code Mode SDK for writing TypeScript programs to express complex loops; Minimal Mode with dual tools for noise-free benchmarks; and Creative Mode for debugging Cordis plugins directly in memory.

What is Trajectory Tracking, and how does it help developers debug black-box Agents?

The Trajectory view relies on an append-only session event stream. It transparently logs system prompts, reasoning chains (Think), tool parameters, execution outputs, and sub-agent spawns. Developers can trace decision logic along a clear timeline and easily perform session restoration, branch forking, and replay on standardized event streams.

How does DeepSeek Harness ensure security during local Shell execution and file editing?

DeepSeek Harness uses unambiguous TypeScript Tool Contracts to regulate model actions and employs a lossless Multi-chunk diff replacement algorithm for exact code edits. Paired with Docker containers and isolated sandbox environments, it strictly enforces path access boundaries and execution privileges to prevent unauthorized commands.

How to quickly install DeepSeek Harness, and does it support private deployment?

Developers can run npx @deepseek-ai/dsh web in any Node.js environment to launch the Web UI in seconds. Released under the MIT open-source license, DeepSeek Harness supports complete private deployment on local machines or enterprise clouds via GitHub (deepseek-ai/deepseek-harness) without vendor lock-in.

How to contribute plugins or integrate custom LLM providers into DeepSeek Harness?

Thanks to Cordis declarative service architecture, developers can write independent plugins adhering to standard contracts and specify service routes in config files to seamlessly connect OpenAI, Anthropic, Ollama, or local LLMs. Developers can publish or explore community plugins on GitHub tagged with dsh-plugin.