Laojin GlobalAI · GO GLOBAL
Back to tutorials
DeepSeek Harness Architecture: Why ‘Everything Is a Plugin’ Is Not a Slogan
DeepSeek HarnessIntermediate2026-08-13

DeepSeek Harness Architecture: Why ‘Everything Is a Plugin’ Is Not a Slogan

Creator:DeepSeek

Use the official architecture.md to explain profiles, bundles, the session log and turn/step. No package table dump — only where new behavior should attach.

Open the official tutorial
ItemDetails
ProviderDeepSeek Harness
LevelIntermediate
Date2026-08-13
Official sourceDeepSeek Harness
Topics#agents · #engineering · #open-source

One sentence first

The official architecture doc assumes you know Cordis. If you do not, remember its job: plugins contribute services, typed events and reversible effects to a shared context. There is no privileged core. The model adapter, tool registry, session log and agent loop are all plugins.

Profiles and bundles

A running dsh is a plugin tree composed at boot.

  • A profile is a named composition. Shipped templates are web and headless. It lists the bundles it stacks and keeps your cordis.patch.yml.
  • A bundle is a patchable plugin layer. dsh-base is the first layer of every profile (models, tools, persistence, sandbox, credentials). dsh-web-app adds the browser app. dsh-headless is a one-shot runner with no server.

Layers apply in this order: each bundle, then the profile patch, then the home-level patch, then --patch. To see the tree your machine actually boots:

sh dsh --profile web --dump-config

Any row it prints can be replaced by a patch of your own.

The session log is what the model sees

Official hard rule: Model-visible means logged. Anything that reaches a model request must be reconstructable from the session log. Fork, resume, transcripts and telemetry all derive from that stream. New model-visible input needs a new session event — do not sneak text into the loop.

Turns and steps

A step is one model request plus the tools it calls. A turn is zero or more steps. Input reaches one inbox. agent/pre-step decides what the model sees; listeners may rewrite or reject. A rejected first claim still closes a durable turn that spent no step.

To intercept a request, tool or turn, hang off agent/* or tools/*. Do not start by editing the loop.

Where new behavior goes

The official map is the authority. The rows you will use first:

GoalMechanism
Add a model providerctx.llm
Add a model-facing capabilityctx.tools; its schema joins prompt assembly
Add a human commandctx.commands; no model turn
Add filesystem access or policyctx.fs or fs/*
Confine spawned processesctx.sandbox

FAQ

What is the difference between dsh, a profile and a bundle?

dsh is the launcher. A profile is a named composition. A bundle is a patchable plugin layer.

Why not patch the agent loop?

The official doc says new behavior attaches to a documented extension point. Changing the loop itself updates that map. In a developer preview, forking the core loop means you merge conflicts on every upgrade.

Official source: DeepSeek Harness architecture.md. This is a decision map; package names and event tables belong to the repo.
Note: This is an original Laojin Global companion to the official tutorial, not a replacement for provider documentation. Use the official link for current models, SDKs, pricing, quotas, and safety policies.

Sources & Further Reading

This page is grounded in the authoritative sources below — verifiable and citable by AI engines and readers.

Citation: Please attribute Laojin Global (laojinchuhai.com) and keep the original link.

Made by Laojin · AI that ships

AllModelsAPIOne key for many models

AllModelsAPI is a multi-model API gateway: one key reaches many models through an OpenAI-compatible interface — point your existing code at a new base URL and you're migrated. It's not a demo: our own production workloads run on it every day.

More from Laojin: Sellenca · 365AIOrg · 365Loopa · 365 Ops · 365Skill

Related

Linked by topic, people and hubs