DeepSeek Harness: plugin tree and Agent Turn cutaway
This is not the old core-plus-plugins pattern. A profile selects the product shell, ordered patches rewrite the composition, and Cordis injects services into the same plugin tree. Every runtime input, model stream, tool result, and stop event ultimately lands in a reconstructable log.
One repository, five product entry points
Developer Preview · MIT · Node 22.19+ / 24+
Read the edges before the modules
Green = composition and execution; blue = service provision; violet = model and tools; amber = event append and replay.
PROFILE → HOME PATCH → --PATCH → PLUGIN TREE
Each later layer can override the one before it. The result is still one plugin tree that starts and disposes by lifecycle.
01: profile base
→
02: home patch
03: --patch
04: plugin tree
Readable, but not a frozen interface
The project is explicitly marked Developer Preview. This plate shows the current documented contract, not a permanent API.
From composition to one Agent Turn
Read from the compositor through the service backplane into one Agent Turn. Green tracks startup, purple tracks execution, and the amber loop carries the log into the next turn. Zoom into a module or expand the canvas to inspect its details.
Profiles → Patch Stack
A profile is a product bill of materials, not a theme. Patches apply in order and produce a plugin tree that can start, be replaced, and dispose cleanly.
WEB: UI
HEADLESS: CLI
SDK: HOST
ACP: PROTO
L0 · BASE: profile plugins
L1 · HOME: user patch
L2 · CLI: optional --patch
BOOT RESULT: ordered plugin tree
ctx.* Service Seams
Service definitions, providers, and consumers meet in the shared context. Replacing one provider gives every consumer the same implementation.
CORDIS SHARED CONTEXT: definition → provider → consumer
ctx.agents: identity
ctx.agentLoop: steps
ctx.systemPrompt: assemble
ctx.llm: stream
ctx.tools: execute
ctx.sessions: append
LIFECYCLE EFFECTS: start · dispose · replace
Agent Loop + Session Log
One input passes through preparation, the model stream, and an optional tool branch. Messages and events are append-only; resume, fork, and replay are derived from the log.
T0 · INBOX: input / webhook
T1 · PRE-STEP: session + prompt + schemas
T2 · LLM STREAM: assistant chunks
T3 · TOOL BRANCH: pre → execute → post
T4 · APPEND: message + result + event
DERIVED: resume · fork · replay · persistence · telemetry
EXECUTE: compose / main execution
PROVIDE: service injection
MODEL / TOOL: stream and tool branch
EVENT: append / replay
Five entry points, not five runtimes
The horizontal axis lists five official profiles. Lit cells show the product surfaces each profile selects; the shared runtime spans every entry point.
DSH profile surface matrix
Product-surface selection matrix for web, headless, sdk, sdk-minimal, and acp.
Three rings of one runtime
The inner ring divides composition, services, and runtime. The outer ring expands five profiles, three patch layers, six service seams, and five turn phases. Arc length counts documented units, not lines of code.
DSH architecture hierarchy
DeepSeek Harness architecture hierarchy across composition, services and turn phases.
Four mechanisms, four boundaries
Profiles handle product variation; patches handle ordered overrides; Cordis handles service replacement; the append-only log handles time and recovery. Separating those concerns removes the need for a privileged core that bypasses the plugin system.
One turn in nine checkpoints
This is event order, not package dependency. A tool call may create a branch, but messages and results return to the same session log.
00: Inbox
01: Pre-step
02: Prompt
03: LLM
04: Stream
05: Tool?
06: Append
07: Next / Stop
08: Replayable
Sources, version status, and visual encoding
This snapshot is frozen as of August 31, 2026, from the official DeepSeek Harness README, Architecture, and Development documents. The profile matrix encodes documented product surfaces. Sunburst arc length counts documented units, not code volume, call volume, or complexity. The project is in Developer Preview, so interfaces and behavior may still change incompatibly.