Deep Dive · Agent Harnesses

DeepSeek Harness and Cordis: What "Everything Is a Plugin" Actually Means

DSH is not a coding agent with an extension API — it is a plugin tree where the agent loop, the tool registry, the system prompt and the model adapter are all rows in a YAML file. This walkthrough covers the architecture, the Cordis framework underneath it (which predates DeepSeek by a year), the five event dispatch modes rather than four, and the safety notice the video never mentions.

DeepSeek Harness (DSH) EXPLAINED — video thumbnail
Video: Alejandro AO, Hugging Face 35:39 8 November 2026
DSH Cordis plugins dependency injection

🧭 What DSH is 5:57

FactValue (GitHub API, 8 Nov 2026)
Repositorydeepseek-ai/deepseek-harness — "Everything is a Plugin"
Stars / forks277,264 ★ / 33,980 forks
Created13 August 2026 — under three months old
Licence / languageMIT, TypeScript
Run itnpx @deepseek-ai/dsh web → http://127.0.0.1:3080
Latest releasedsh-v0.2.2-rc.1 (4 Nov 2026) — every published release is a prerelease
StatusDeveloper preview, with an explicit breaking-change warning

Alejandro's framing is accurate: DSH is a general agent harness — loop, tools, system prompt, session log, UI — that happens to target coding first, and the interface you meet is a web app (or the Electron wrapper around it) rather than a terminal.

The README states loudly what the video does not: "DeepSeek Harness is in developer preview and iterating rapidly. THERE WILL BE COMPATIBILITY-BREAKING CHANGES." Every release so far carries an rc or alpha tag. Anything you build as a plugin today is built against a moving target — which matters far more here than in a normal tool, because the plugin surface includes the agent loop itself.

🖥 The app and the modes 1:01

ModeWhat it changes
StandardThe ordinary coding agent composition
PTCTools are called from inside a generated script, so several can run in one call — the model writes programmatic tool calls instead of one procedural call at a time
MinimalAs little context as possible
CreatorAdds skills and context about DSH's own plugin architecture, so the agent can extend itself
PTC stands for programmatic tool calls, and it used to be called Code Mode. The video describes the behaviour precisely but never spells out the acronym. The repository's own notes record the rename in August 2026 — the feature shipped with one name in the UI and another in the config, and a pre-release rename unified them with no compatibility aliases, because there was no release to be compatible with. That habit is the project's operating principle: rename freely, break freely, ship rc's.

The presets shipped in the repository confirm the mode list: standard, minimal, ptc, plus coding and reviewing.

He also shows model providers: add a third-party provider or a custom OpenAI-compatible base URL, and he runs the whole demo on GLM 5.3 Flash through Hugging Face rather than a DeepSeek model. That is itself an argument — the harness does not require the vendor's own model, because the model adapter is a plugin.

🪄 The self-modifying demo 3:26

In creator mode he asks the agent to write a plugin that registers a "greet" tool, then opens a fresh session and uses it. The agent produces a directory with a package.json and an index.js, registers the tool, and the tool is callable.

What this demonstratesWhy it is unusual
An agent adding a capability to itself, at runtimeNot an extension API bolted on — the same plugin surface that everything else uses
Creator mode is just a preset with documentation attachedThe "magic" is context: skills describing the plugin architecture and how to register things
Nothing requires a fork or a patch of the coreThere is no privileged core to patch, which is the architectural claim being tested
This is the part that deserves caution as much as admiration. An agent that can install code into its own runtime, on a project with no security audit and third-party plugin indexes that DSH validates for format but not for claims, is a different risk posture from an agent with a fixed tool list. The self-extending design is genuinely the innovation; it is also the reason the safety document exists.

🧬 Cordis, and who owns it 8:22

He is careful here, and correctly so: Cordis is its own project, tightly linked to DeepSeek but not DeepSeek's.

ClaimCheck
Cordis is not DeepSeek's own projectCorrect — it lives at cordiverse/cordis, MIT, 9,789 ★
It links the DSH site as its project pageCorrect — the repository's homepage is the DSH Cordis primer
Cordis's first commit predates DeepSeek as a company, by about a yearCorrect — initial commit 17 May 2022; DeepSeek was founded in 2023
The paper is published by DeepSeekHalf right — arXiv 2608.25512, "A Programming Paradigm for Spatiotemporal Composability", is co-authored by Yifan Shi (Peking University and DeepSeek-AI), Wei Zhang (PKU) and Tianyi Cui (DeepSeek-AI), submitted 26 August 2026. It is a paradigm paper that describes Cordis, not a Cordis manual
The provenance is the most interesting fact in the video. A general-purpose composability framework, started in 2022 by someone who later joined DeepSeek, became the substrate for a coding agent — and the agent is now the framework's flagship user rather than its origin. That is the opposite of how these things usually go: the tool was not built to serve the harness.

🧱 Everything is a plugin 10:59

The architecture document is blunt about it: "Every part of the product is a plugin, including the model adapter, the tool registry, the session log, and the agent loop itself, so each is replaceable from configuration. There is no privileged core to patch."

SubsystemAs a plugin, this means
Agent loopYou can replace the thinking entirely — his closing demo is a loop that never calls a model
Tool registryA plugin, and each individual tool is another plugin
System promptA plugin, not a constant
Execution layerSwap bash/PTY/file-system execution for a remote or sandboxed backend without forking anything
Model adaptersDeepSeek, and everyone else's, on equal footing
Session log and storageReplaceable persistence backends
UIA plugin too — there is a headless profile that renders nothing

Profiles ship as templates: web, headless, sdk, sdk-minimal and acp. The SDK and ACP surfaces the video mentions are not separate products — they are the same core with a different application plugin mounted on top.

🔌 The context and dependency injection 15:04

Everything hangs off one shared context object. A plugin does three things: it claims a name, it declares the services it needs, and it registers into services or listens to events.

MechanismWhat it buys
nameOther plugins know where to find your services
injectOrdering guarantee: the dependency is mounted before you, so ctx.tools exists when your tool registers
RegistrationYour contribution becomes a reversible effect, not a global mutation
EventsReact to what other plugins do without importing them
"Registrations are effects that unwind when their plugin unloads."
The cleanup story is the underrated engineering claim. Because Cordis tracks registrations rather than trusting you to undo them, disabling a plugin unregisters its services, frees its names and removes its hooks in dependency order — it cannot pull a plugin out from under another one. Writing it by hand would be a bookkeeping job nobody gets right; making it structural is what allows a UI that toggles plugins at runtime.

📡 Five ways to emit 20:02

The video says there are four dispatch modes. The Cordis primer lists five:

ModeAwaits listeners?Listener behaviourCan transform?
emitNoObserve in registration orderNo
waterfallNoAround-middleware: each listener gets (...args, next)Yes — return through next() or short-circuit by not calling it
parallelYesAll listeners at onceNo
serialYesIn order, each awaitedYes
bailNo — stops earlyUntil one listener bailsYes, terminal
bail is the omission that matters, because it is the cheapest way to veto something. A waterfall listener has to thread a decision through next(); a bail listener stops the chain with a value. When you are writing an approval gate — the exact thing demonstrated later — the choice between these two decides how much wiring you need.

His point about scoping is correct and easy to miss: events belong to the context they are emitted into, and plugins nest, so a nested agent's events do not leak upward. The advice that follows is sound — do not nest everything, plug into the same context and resolve dependencies by injection.

🧩 Seams 12:30

The architecture document names the pattern that the video circles around: a seam is a swappable capability with three roles — a service definition declaring the interface, a provider implementing it, and a consumer using it.

If you want to…The documented seam
Add a model providerRegister its adapter on ctx.llm
Add a model-facing capabilityRegister on ctx.tools; its schema joins prompt assembly
Add shell executionRegister a ctx.shell backend
Confine spawned processesA ctx.sandbox backend; consumers wrap argv before spawning
Add a human command (no model turn)Register on ctx.commands
Intercept a request, tool or turnIts agent/* or tools/* event
Add model-facing contextagent.inject(), landing in the next admitted request
Why seams beat features: the file-system and subprocess providers share one execution world, so pointing both at a remote sandbox moves Bash, PTY and LSP with them — no provider forks, no parallel implementations drifting apart. That is the practical payoff of "everything is a plugin": one swap changes the whole product coherently.

⌨️ Writing a plugin 24:01

Three examples, increasing in complexity — and the minimum is smaller than most people expect: a module exporting apply(ctx) and doing anything at all.

PluginShape
helloAn exported apply(ctx) that logs. No injection, no registration
greet toolDeclares name and inject: ['tools'], then registers a tool with defineTool on the tools service
bash guardSame injection, but listens: logs tool/result, and intercepts tools/pre-execute as a waterfall

The waterfall detail he flags is the one people get wrong: in a waterfall you must return next to continue the normal flow, and return a deny object to stop it.

He is honest that you will rarely write these by hand. The normal workflow is creator mode plus a prompt; the value of seeing the code is being able to read what the agent produced before you let it run. That is a more useful skill than authoring plugins manually, and it is the same argument as everywhere else in 2026: review the artefact, not the prompt.

🛑 The rm -rf guard 27:35

The demo he runs with his three plugins loaded — dsh web --patch ./cordis.patch.yml — asks the agent to greet Ada and then run a destructive shell command. The greet tool fires, and the guard blocks the deletion, telling the model to ask the user to run it themselves.

What it showsWhat it does not show
Policy can be added as a plugin, without touching the loopA string match on a command is not a security boundary
A veto is expressible as an event listenerObfuscated, quoted or scripted equivalents walk straight past a substring check
The refusal is explained back to the model, so it adaptsNothing here is enforced against a plugin that simply does not use the bash tool
The project's own safety document says what the demo implies otherwise: sandboxing, approval prompts and permission controls "can reduce risk, but they do not guarantee isolation or prevent damage." A guard plugin is a tripwire, not a jail. Worth pairing with a disposable environment, least privilege and backups — the document's own advice.

📚 Layers and patches 28:54

This is the part I would keep from the video above all else: the running application is a plugin tree assembled at boot from ordered layers.

LayerRole
Profile's bundlesBase composition — model adapters, tools, persistence, sandbox policy, credentials
Profile's cordis.patch.ymlAdds or replaces rows by id
Home patchYour machine-wide additions
--patch overlaysLast, highest precedence — the flag he demos

A patch targets a row by id and replaces its whole config, or inserts new rows. Two commands make the tree legible without reading source: dsh --profile web --dump-config prints what your machine actually boots, and "any row it prints can be replaced by a patch of your own".

This is the difference between configuration and a plugin system. Not "settings you can change", but a fully enumerated composition where every line — including the loop — is addressable. The mental model to keep: you are not configuring an application, you are editing a dependency graph, and the agent can edit it too. His point that the user patch lives under the harness home, per profile — .dsh/profiles/<profile>/cordis.patch.yml — and that the desktop reserves its own desktop profile, is right.

🖥 The desktop carrier 32:32

The Electron app is newer than the web UI and is, as he says, a wrapper — but the precise shape is worth having, because it explains why the same plugins work in both places:

ComponentResponsibility
Electron shellStarts a private Desktop Host in Electron's Node mode
Desktop HostInvokes the shared CLI profile runner and the complete web application
WindowLoads the packaged web assets and waits for boot injections before activating client plugins in the same document
TransportWeb owns RPC and streams; Node IPC carries boot injections, readiness, fatal errors and shutdown
So it is not "two Cordis applications" as the video puts it, but the same web application carried by a host. The practical consequence is the one he claims: server-side plugins behave identically in both, and the desktop reserves its own profile ($DSH_HOME/profiles/desktop) so that packages and lockfiles stay separate from your CLI install.

🚨 The chapter that is missing 25:40

A 35-minute tutorial that ends with "now you know what it is creating and how it is loading it" leaves out the three facts that should change how you deploy it.

FactSource
It is experimental developer-preview software, has not undergone a security audit, and must not be treated as secure or production-readySAFETY.md
It executes model-generated code and commands, loads third-party plugins, and can reach network, processes, credentials and filesSAFETY.md
Plugin indexes are third-party content — DSH validates the file format but not the claims, icons, sources or authorsdocs/user/guide/plugin-market.md
Compatibility-breaking changes are expected, including to the plugin surfaceREADME.md
The plugin index caveat is the sharp one. A "Discover" tab that installs plugins from an index URL you supply, with format validation but no vetting, on a runtime that can execute shell commands, is a supply-chain surface with a friendly UI. The documentation itself warns that anyone on the network path can change an http: index — including the install specs it lists. Use https, and only sources you trust.

✅ Claims checked

ClaimVerdictEvidence
DSH is an open-source agent harness by DeepSeek, built on "everything is a plugin"CorrectRepository description and README; MIT, TypeScript, 277,264 ★ on 8 Nov 2026
An Electron desktop app was released a few days before the videoConsistentapps/desktop exists and is documented as an Electron carrier of the web app; repository created 13 Aug 2026, releases still prerelease
The desktop is a wrapper around the earlier web appCorrect in substanceDocs: the Host invokes the shared CLI profile runner and the complete web app
There are two Cordis applications, backend and frontendSimplifiedThere are client plugins, but the desktop is a host plus the same web application in one document, not a second independent application
PTC mode runs tools inside a generated scriptCorrectPTC = programmatic tool calls; renamed from Code Mode in August 2026
Four ways to emit eventsFiveemit, waterfall, parallel, serial and bail
A waterfall listener must return next to continueCorrectCordis primer: listeners receive (...args, next); returning without calling it short-circuits
Cordis is not DeepSeek's project, and predates the company by about a yearCorrectcordiverse/cordis, MIT, initial commit 17 May 2022; DeepSeek founded 2023
The Cordis paper was published by DeepSeekCo-authoredarXiv 2608.25512, submitted 26 Aug 2026 — Yifan Shi (PKU + DeepSeek-AI), Wei Zhang (PKU), Tianyi Cui (DeepSeek-AI)
The agent loop, tool registry, system prompt and execution layer are all pluginsCorrectArchitecture doc: "no privileged core to patch"
Cordis tracks registrations and cleans up a disabled plugin safelyCorrectRegistrations are effects that unwind on unload, in order, so nothing is pulled out from under a dependent plugin
The harness ships as web, desktop, SDKs in TypeScript and Python, and ACPCorrectProfiles web, headless, sdk, sdk-minimal, acp; Python SDK has its own guide
Plugins load as config rows with an id and a name, or a pathCorrectA patch targets a row by id and replaces its config, or inserts rows; --patch overlays are the last layer
User configuration lives in .dsh/profiles/<profile>/cordis.patch.ymlCorrect in shapeDocs call it the Harness home ($DSH_HOME); the desktop reserves a desktop profile
A guard plugin blocking a destructive command makes the setup safeNoA substring match is a tripwire; SAFETY.md states sandboxing and approvals do not guarantee isolation
The project is ready to adoptNot claimed by the projectDeveloper preview, no security audit, breaking changes expected, all releases prerelease

Basis note. Built from the full 35:39 recording and checked against the repository's own documentation rather than the narration: README, SAFETY.md, docs/architecture.md, docs/cordis-primer.md, the plugin-index guide and the repository's implementation notes, plus the GitHub API and the arXiv record for the framework paper. Where the video simplifies, the correction is noted separately — the technical content itself is accurate.

🔑 Key takeaways

  • "Everything is a plugin" is literal: the agent loop, tool registry, system prompt, execution layer, session log and UI are all replaceable from configuration.
  • There is no privileged core to patch. You extend DSH by mounting a plugin beside the others — which is why an agent can extend itself.
  • Cordis is older than DeepSeek. A 2022 composability framework whose author later joined the company now powers its harness.
  • The axis is time and composition: profiles stack bundles, bundles patch rows, your patch wins, --patch wins last.
  • dsh --profile web --dump-config is the map. Every row it prints can be replaced.
  • A plugin is an apply(ctx) and a name. Add inject to guarantee ordering; registration becomes reversible automatically.
  • Registrations are effects that unwind — cleanup ordering is structural, not your bookkeeping.
  • Five event modes, not four: emit, waterfall, parallel, serial, bail. bail is the cheap veto.
  • Seams are the payoff: swap one execution provider and Bash, PTY and LSP move together.
  • PTC means programmatic tool calls — several tools inside one generated script, formerly Code Mode.
  • The desktop app is a host carrying the same web application, not a second product; it keeps its own profile and lockfiles.
  • A guard plugin is a tripwire, not a jail. Substring checks on shell commands are not a security boundary.
  • The project says it is not production-ready. No security audit, breaking changes expected, every release a prerelease.
  • Plugin indexes are untrusted input with a friendly install button. Format validation is not vetting; use https and sources you trust.
  • Read what the agent wrote before loading it. Creator mode makes authoring trivial, which makes review the actual skill.

🔗 Resources

Basis note. The corrections here come from the project's own written sources, which are unusually good: the architecture document states the claims the video makes informally, and SAFETY.md states the ones the video omits. Where I disagreed with the video — the event count, "two Cordis applications", the guard's safety value — the repository text is quoted rather than paraphrased.

⏱ Timestamp index

1:01App tour: sessions, modes, the Electron wrapper
2:00PTC mode: tools inside a generated script
3:26Creator mode asks for a plugin
3:57Adding a model provider (GLM 5.3 Flash via Hugging Face)
5:57What DSH is, and how it ships
8:22History: Cordis is not DeepSeek's, and predates it
10:59Everything is a plugin — including the loop
12:30Execution layer, model providers, UI as plugins
15:04Services, names, and dependency injection
18:57Cleanup: Cordis remembers what to unwind
20:02Event modes: emit, waterfall, serial, parallel
22:18Nesting and event scoping
24:01Plugin code: apply, inject, defineTool
27:35The pre-execute guard and next
28:54Loading: cordis.patch.yml and --patch
31:49The guard blocking rm -rf, live
32:32npm packages, the desktop helper, the user profile
34:50Re-running the demo inside the desktop app
☰ View all