DeepSeek Harness is not a fixed “kernel plus optional plugins” application. Even the agent loop is contributed by plugins. The final runtime is a Cordis plugin tree produced by merging several configuration layers.
Profile
└─ Bundles + Patch layers
└─ Cordis plugin tree
├─ Model adapters
├─ Tools and capability providers
├─ Agent + Agent Loop
├─ Session event log
├─ Permissions / sandbox
└─ Web or Headless surface
Composition entry point: Profile
A profile is a named runnable composition, such as the built-in web and headless profiles. It determines which bundles, external plugins, and patches are loaded.
Inspect the final local composition instead of guessing its defaults:
dsh --profile web --dump-config
This command does not launch the application.
Execution entry point: Agent Loop
The agent loop reads context from the session log, asks the model for the next action, parses tool calls, executes them, and records the results back into the session. A step is one model request and its tool calls; a turn may contain zero or more steps.
Source of truth: Session log
The session log is the source of truth for model history, recovery, forks, replay, persistence, and the UI. Any new model-visible input should be reconstructable from the log; otherwise a recovered session can behave differently from the original.
Replaceable capabilities: three roles
The official architecture recommends dividing replaceable capabilities into:
- Service definition: defines the interface and context property.
- Service provider: supplies one implementation.
- Consumer: depends on and uses that service.
This seam allows local Bash, a remote sandbox, different file-system policies, or different model adapters to share the same calling surface.
Prerelease boundary
Events, session formats, and package boundaries may still change. Do not treat current internals as a permanently stable API. Plugins should declare compatible versions and retain migration notes.
Evidence and revision
Primary sources
This guide is intentionally concise; use the official source or documentation below as the authority for commands, behavior, and risk boundaries.