DeepSeek Harness Runs on an Engine Where the Agent Loop Itself Is a Replaceable Plugin
Agent frameworks are still evolving fast, and locking scheduling logic into a fixed core forces teams to fork and maintain diffs. Cordis makes every component swappable through service keys and reversible side effects, so replacing the agent loop, filesystem, or tool pipeline is a plugin swap—not a rewrite.
DeepSeek Harness (DSH) rejects the fixed-core architecture of LangChain and AutoGen by building on Cordis, a meta-framework validated by over 4,000 community plugins. In DSH, the model adapter, tool registry, session log, and even the agent loop itself are all ordinary plugins—no component is irreplaceable, and no fork is required to change core scheduling logic. The system ships with 159 default plugins, all collaborating through service keys and typed events rather than hardcoded imports.
Cordis enforces automatic cleanup through a single primitive, `ctx.effect()`, which tracks every side effect and rolls them back in LIFO order when a plugin unloads. This makes hot-reloading safe: modifying a tool plugin automatically disposes the old instance and reloads the new one without other plugins noticing. Dependencies are declared via `inject`, and the framework handles loading order and lifecycle linkage—when a service disappears, its consumers pause; when it returns, they reload.
Product modes—Standard, PTC, Minimal, Creative—differ only in which plugin set a YAML profile loads. Swapping the local filesystem for a remote sandbox requires only a new Seam provider; Bash, PTY, and LSP tools migrate automatically because they consume the `ctx.fs` service key, not a concrete import. The architecture turns product configuration into plugin-tree assembly, letting one codebase spawn development tools, CI bots, and benchmarking platforms without maintaining multiple forks.
The claim that 'even the agent loop is a plugin' is not marketing—DSH's `agentLoop` service key is provided by a plugin that can be disabled and replaced, which is architecturally impossible in LangChain or AutoGen without forking.
Cordis's `ctx.effect()` LIFO rollback is a stronger guarantee than React's `useEffect` cleanup because it is enforced by the framework's Fiber disposal, not left to developer discipline.
The Seam model turns what would be a major refactor in other frameworks—swapping local filesystem for remote sandbox—into a single `ctx.provide('fs', newImpl)` call that automatically propagates to Bash, PTY, and LSP tools.
DSH's four product modes being pure configuration files means the same codebase can produce a web UI, a headless CI bot, and a benchmarking harness just by loading different plugin trees—no feature flags or build-time conditionals.
The 159 default plugins suggest DSH is already a substantial system, but the architecture's real test will be whether third-party plugin ecosystems form around it the way Koishi's 4,000+ plugins validated Cordis in the chatbot domain.