DeepSeek Harness: A Plugin Runtime Where the Agent Loop Itself Is Replaceable
Most coding agents hardcode the loop that calls models and runs tools. Harness makes that loop a replaceable plugin, so teams can swap models, execution environments, and safety policies without rewriting the agent. The framework's strict lifecycle management and session-auditability also make it viable for production deployments where resource leaks and unreconstructable model inputs are unacceptable.
DeepSeek Harness treats every agent capability as a plugin mounted on a shared runtime context. A YAML configuration file wires together session management, system prompts, tools, LLM adapters, file access, subprocesses, sandboxes, and the agent loop itself. The underlying Cordis micro-framework enforces strict lifecycle management: registrations are effects that auto-revoke on unload, dependency injection is continuously tracked rather than checked once, and the session log serves as a reconstructable source of truth for every input the model sees.
The architecture splits each capability into three independently evolving roles—service definition, provider, and consumer—so swapping a local shell for a sandboxed one changes nothing in the tools or loop. Hot module replacement works out of the box because unloading a plugin rolls back its effects and reloading satisfies the dependency graph. A built-in diagnoser surfaces exactly which plugin is stuck in PENDING state when a required service is missing.
Compared to Claude Code and Codex, Harness is a framework for platform engineers who need to self-host, embed, and evolve an agent runtime with replaceable models and loops. Against Alibaba's AgentScope, it trades Python's multi-agent workflows and visualization tooling for TypeScript's configuration-driven composition and strict engineering discipline—100% test coverage gates, branded types, and declarative surface validation.
Making the agent loop itself a replaceable plugin is a genuinely unusual architectural choice. Most frameworks treat the loop as sacred infrastructure; Harness demotes it to just another component, which means the entire agent's behavior can be rewritten without forking the framework.
The 'model-visible equals logged' invariant is a hard architectural constraint, not a logging best-practice. This means debugging a bad model response becomes deterministic replay rather than guesswork—a property that matters for compliance and production incident response.
Harness's engineering discipline (100% coverage gates, branded types, type-equiv doc sync) signals that it is built as infrastructure for other products, not as an end-user tool. The strictness is a feature for platform teams who need the runtime to never silently fail.
The comparison with AgentScope reveals two competing philosophies for agent frameworks: configuration-driven plugin runtimes versus imperative component libraries. Harness bets that YAML composition and hot-swapping beat Python's flexibility when the goal is a long-lived, self-hosted platform rather than rapid experimentation.