DeepSeek Harness: DeepSeek Harness Introduction

Last updated: 2026-08-31

DeepSeek Harness (DSH) is DeepSeek's open-source Agent framework, with the core philosophy of "everything is a plugin" — from model adapters to tool systems, from session management to sandbox mechanisms, all are injected into a shared context as plugins, achieving ultimate extensibility.

💡 Tip: DSH's core innovation lies in the Cordis architecture — plugins don't call each other directly, but instead contribute services, typed events, and reversible side effects to a shared context. This design keeps plugins fully decoupled, so adding new features never requires modifying existing code.

📋 Prerequisites: No prior experience needed; basic command-line knowledge is sufficient

1. What You'll Learn


2. An AI Engineering Team's Selection Story

(1) Pain Point: Agent Framework Fragmentation

Alice is an architect at an AI startup. Her team faced an Agent framework selection dilemma in Q2 2026:

Product manager Bob turned up the pressure:

"We need a model-agnostic, plugin-pluggable Agent framework that supports multiple interaction modes. It must go live within three months."

(2) DSH's Solution

After evaluation, Alice chose DeepSeek Harness:

TEXT 📖 Display only
Plugin system:      0 extensible → everything is plugin
Model support:      1 provider → DeepSeek + OpenAI-compatible
Interaction modes:  CLI only → Web UI + CLI + SDK + Headless
Runtime overhead:   high → minimal (Cordis lazy-loading)
Community:          GitHub 187.3k stars, MIT license

DSH's "everything is a plugin" approach let Alice's team assemble capabilities on demand:

  1. Week 1: Web UI + DeepSeek API to run the first Agent
  2. Week 3: Connected to an OpenAI-compatible endpoint, switched to GPT-4o
  3. Week 6: Custom tool plugin, connected to internal company API
  4. Week 10: Python SDK integrated into the production pipeline

(3) Results

After three months of using DSH:


3. What Is DeepSeek Harness?

DeepSeek Harness (DSH) is an open-source Agent framework from the DeepSeek team, with 187.3k stars on GitHub and an MIT license. It's not an Agent itself, but a framework for running Agents — providing infrastructure for model adaptation, tool orchestration, session management, and sandbox execution.

DeepSeek Harness Overview

(1) ▶ Example 1

100%
graph TB
    subgraph DSH[DeepSeek Harness]
        C[Cordis Kernel<br/>Plugin Engine]
        M[Model Adapter<br/>DeepSeek / OpenAI]
        T[Tool System<br/>file_edit / shell / search]
        S[Sandbox Engine<br/>Approval & Isolation]
        L[Session Log<br/>append-only log]
    end
    C --> M
    C --> T
    C --> S
    C --> L
    U[User] -->|Web UI / CLI / SDK| DSH
Dimension DSH Traditional Agent Frameworks
Design philosophy Everything is a plugin Hardcoded features
Model binding Model-agnostic Locked to a specific LLM
Extension method Plugin injection Modify source code or callbacks
Interaction modes Web/CLI/SDK/Headless Usually CLI only
Runtime Cordis lazy-loading Full initialization

(2) Developer Preview Notes

DSH is currently in developer preview stage, which means:

BASH
# Developer preview notice during installation
npx @deepseek-ai/dsh web
# ⚠️ DeepSeek Harness is in developer preview.
# APIs may change before stable release.

However, developer preview doesn't mean it's unusable — core features (conversations, tools, plugins) are stable and functional, and the community is iterating rapidly.


4. Cordis Kernel: Everything Is a Plugin

Cordis is DSH's core framework, named after the Latin word for "heart" — it's the beating center of the entire system.

(1) Plugin Contribution Model

Each plugin contributes three types of content to the Cordis shared context:

TYPESCRIPT
interface PluginContribution {
  services: Service[];        // Callable capabilities exposed by the plugin
  events: EventType[];        // Typed event streams
  sideEffects: SideEffect[];  // Reversible side-effect operations
}

(2) ▶ Example 2

100%
graph LR
    P1[LLM Plugin] -->|contributes service| CTX[Shared Context]
    P2[Tool Plugin] -->|contributes service| CTX
    P3[Sandbox Plugin] -->|contributes event| CTX
    P4[Log Plugin] -->|subscribes to event| CTX
    CTX -->|dispatches| P1
    CTX -->|dispatches| P2
    CTX -->|dispatches| P3
    CTX -->|dispatches| P4

Cordis Plugin Architecture

This design ensures:

(3) ▶ Example 3

TYPESCRIPT
import { definePlugin } from '@deepseek-ai/dsh';

export default definePlugin({
  name: 'hello-dsh',
  version: '1.0.0',
  contribute(ctx) {
    ctx.registerService('hello', {
      greet(name: string) {
        return `Hello, ${name}! Welcome to DSH.`;
      }
    });
    ctx.emit('hello.registered', { timestamp: Date.now() });
  }
});

5. Four Running Modes Overview

DSH provides four running modes, adapted for different use cases and preferences:

(1) Mode Quick Look

Mode Full Name Characteristics Use Cases
Standard Standard Default mode, Agent autonomously decides when to use tools General programming, Q&A
PTC Plan-then-Code Plan first, then execute; plan is visible and controllable Complex tasks, code refactoring
Minimal Minimal Fewest tool calls, Agent relies mainly on its own capabilities Simple Q&A, knowledge queries
Creative Creative Highest freedom, encourages exploratory output Creative writing, brainstorming

(2) Mode Switching

BASH
# CLI mode switching
dsh --mode standard
dsh --mode ptc
dsh --mode minimal
dsh --mode creative

In the Web UI, modes can be switched in real-time via the dropdown menu at the top.

100%
graph LR
    USER[User Input] --> MODE{Running Mode}
    MODE -->|standard| S[Agent Autonomous Decision]
    MODE -->|ptc| P[Plan First, Then Code]
    MODE -->|minimal| M[Minimal Tool Calls]
    MODE -->|creative| C[Exploratory Output]
    S --> TOOLS[Tool System]
    P --> TOOLS
    M --> TOOLS
    C --> TOOLS

Four Running Modes

For detailed mode comparison and configuration, see 04-modes.md.


6. Comparison with Other Agent Frameworks

(1) Core Dimension Comparison

Dimension DeepSeek Harness Claude Code Cursor OpenCode
Open Source ✅ MIT ❌ Closed source ❌ Closed source ✅ MIT
Model-agnostic ✅ Multi-model adapter ❌ Claude only ❌ Multi-model ✅ Multi-model
Plugin System ✅ Cordis ❌ None ⚠️ Limited ❌ None
Web UI ✅ Built-in ❌ CLI only ✅ IDE-integrated ❌ CLI only
SDK ✅ Python
Headless
Sandbox ✅ Configurable ⚠️ Built-in
GitHub Stars 187.3k

(2) DSH's Differentiating Advantages

  1. Model Freedom: Not locked to any LLM vendor; DeepSeek API and OpenAI-compatible endpoints are plug-and-play
  2. Plugin Ecosystem: The Cordis architecture turns feature extension into "writing plugins" rather than "modifying source code"
  3. Multi-channel Interaction: Web UI for beginners, CLI for developers, SDK for integration, Headless for automation
  4. Reversible Side Effects: Operations can be rolled back, which is extremely rare among Agent frameworks

(3) Scenarios Where DSH Is Not Suitable


7. Technology Stack Overview

DSH's complete technology stack:

100%
graph TB
    subgraph Interaction Layer
        WEB[Web UI<br/>React + Vite]
        CLI[CLI<br/>Terminal Interaction]
        SDK[Python SDK<br/>Programmatic Access]
        HEAD[Headless<br/>Unattended Execution]
    end
    subgraph Core Layer
        CORDIS[Cordis<br/>Plugin Engine]
        SESSION[Session Manager<br/>Session Management]
        TRAJ[Trajectory<br/>Log Engine]
    end
    subgraph Plugin Layer
        LLM[LLM Adapter<br/>DeepSeek / OpenAI]
        TOOLS[Tool Plugins<br/>file_edit / shell / search]
        SANDBOX[Sandbox Plugin<br/>Approval & Isolation]
        PROFILE[Profile Plugin<br/>Configuration Composition]
    end
    WEB --> CORDIS
    CLI --> CORDIS
    SDK --> CORDIS
    HEAD --> CORDIS
    CORDIS --> SESSION
    CORDIS --> TRAJ
    CORDIS --> LLM
    CORDIS --> TOOLS
    CORDIS --> SANDBOX
    CORDIS --> PROFILE

❓ FAQ

Q Is DSH free?
A Yes, DSH itself is completely free and open-source (MIT license). However, using the DeepSeek API or other LLM APIs requires corresponding API Keys and fees.
Q Does developer preview mean it can't be used for real projects?
A No. Core features (conversations, tools, plugins) are stable and usable, but APIs may change in future versions. We recommend validating on non-critical projects first and waiting for the stable release before using in production.
Q What's the difference between DSH and AutoGPT?
A DSH is an Agent runtime framework (Harness), not an Agent itself. AutoGPT is a specific Agent implementation. DSH is lower-level and more flexible; you can use the DSH framework to build Agents similar to AutoGPT.
Q Must I use DeepSeek models?
A No. DSH is model-agnostic. You can connect to GPT-4o, Claude, Gemini, or any API-compatible model through OpenAI-compatible endpoints.
Q Is Cordis exclusive to DSH?
A Cordis is a general-purpose plugin framework developed by the DSH team that could theoretically be used in other projects. However, it is currently released with DSH and has not been independently open-sourced.
Q What hardware does DSH require?
A DSH itself has minimal hardware requirements (just a Node.js runtime). The Agent's reasoning capability depends on your chosen LLM API. If using local models, you'll need corresponding GPU resources.

📖 Summary


📝 Exercises

1. ⭐ Basic: Visit DSH's GitHub repository, read the README, list three features that appeal to you most, and explain why.

2. ⭐⭐ Intermediate: Use a table to compare DSH with another Agent tool you're familiar with (e.g., Claude Code, Cursor), including at least 6 comparison dimensions.

3. ⭐⭐⭐ Challenge: Draw a Mermaid architecture diagram showing your understanding of the Cordis plugin contribution model — include at least 3 plugins, annotating the services, events, and side effects they contribute.

Web-Tutorial.com

Web-Tutorial Tech Team

A team of developers maintaining programming tutorials. Each tutorial is written and reviewed by developers with expertise in that field. We work to keep our content accurate and reliable — if you spot an issue, please let us know.

100%

🙏 帮我们做得更好

我们是刚上线的编程教程站,几个人的小团队,精力有限。页面虽经检查,难免还有疏漏——链接失效、排版错乱、内容有误、语言生硬……

如果您发现了,麻烦告诉我们,我们会在收到反馈后第一时间进行修复,再次感谢您的光临 🙏