Hands on DSH

DeepSeek Harness (DSH): Architecture, Implementation, Deployment, and Usage — Compared with OpenClaw

DeepSeek Harness (DSH) is an open-source agent harness from DeepSeek AI. Its central design decision is simple but far-reaching: every agent capability is a plugin. Models, tools, skills, sessions, sandboxes, storage, loops, scheduling, and the user interface can be selected, replaced, or recomposed through configuration.

This makes DSH different from an application that merely adds tools around a model. It is a runtime for constructing agent systems. OpenClaw takes a complementary approach: it is a self-hosted assistant gateway that connects an agent runtime to the messaging channels and devices people already use.

Executive summary

QuestionDeepSeek HarnessOpenClaw
Primary abstractionComposable agent runtimeLong-lived assistant gateway
Orchestration centerCordis plugin tree, profiles, and agent loopGateway, deterministic routing, and agent sessions
Multi-agent modelAgent registry, scoped registrations, subagents, workflows, and code modeSeveral isolated agents in one Gateway, routed by channel/account/peer bindings
State modelAppend-only session events and replayable trajectoriesPer-agent workspaces, agent directories, SQLite session stores, and channel state
Best fitAgent research, custom presets, benchmarking, and runtime experimentationAlways-available personal or team assistants across chat apps and devices

1. Architecture: DSH is a plugin-composed runtime

DSH is built on the Cordis plugin framework. Plugins contribute services, typed events, and reversible effects to a shared context. There is intentionally no large privileged core that developers must patch. A new capability is added by mounting a plugin beside the existing plugins.

At startup, DSH builds a plugin tree from an ordered profile. The repository ships profiles such as web, headless, sdk, sdk-minimal, and acp. A profile stacks bundles, then applies profile-level patches, home-level patches, and optional command-line overlays. This layering makes the runtime itself configurable.

LayerResponsibility
Cordis kernelMounts, unmounts, and resolves plugin dependencies.
Bundles and profilesDefine a runnable composition, such as Web UI, headless, SDK, or ACP.
Core pluginsProvide the model adapter, tool registry, session log, agent interface, agent loop, persistence, sandbox, and approvals.
ApplicationsExpose the selected composition through dsh web, headless execution, SDK JSON-RPC, or ACP.

The implementation also separates durable facts from live extension points. Session events such as user messages, assistant messages, tool calls, and step boundaries are appended to the session log. Live agent and capability events allow plugins to observe, reject, transform, or extend execution. This is the basis for DSH’s trajectory view and for resume, fork, search, and replay.

2. Multi-agent orchestration: the key difference

DSH treats orchestration primarily as a runtime-composition problem. The agent loop exposes an agent interface and events. Standard mode includes planning, goals, subagents, and workflows. Code mode lets the model use the Code Mode SDK to combine multiple rounds of tool calls in one TypeScript program. Creator mode is intended for inspecting the live runtime and creating new presets.

OpenClaw treats orchestration primarily as a routing-and-operations problem. One long-lived Gateway owns channel connections, sessions, tools, and events. Multiple configured agents can run inside that Gateway. Each agent has its own workspace, agentDir, auth profiles, model registry, and SQLite-backed session history. Bindings route inbound messages to the correct agent according to channel, account, peer, guild, or other matching fields.

DimensionDSHOpenClaw
What is being composed?Runtime capabilities and application profiles.Agent identities, workspaces, channel accounts, and routing bindings.
How does work fan out?Subagents, workflows, Code Mode programs, and event-driven plugins.Agent sessions, native subagent/child sessions, and configured cross-agent access.
How are agents isolated?Scopes, workspaces, sandbox and approval plugins, and profile composition.Separate workspace, agentDir, auth/session database, skill allowlists, and tool policies.
How are messages assigned?Workspace/session entry points and the selected runtime profile.Deterministic bindings; most-specific matching wins.
How is execution inspected?Append-only event stream and Trajectory view.Gateway events, session history, Control UI, diagnostics, and channel status.

The practical distinction is important. If the question is “How should I build a new kind of agent runtime?”, DSH is the more direct substrate. If the question is “Which assistant should receive this Slack message, and which isolated persona may execute it?”, OpenClaw’s Gateway and binding model are the more direct answer.

3. Implementation details

A DSH turn consists of one or more steps. The loop claims input, assembles prompt sections and tool schemas, prepares the model call, streams the response, executes tools through guarded pre- and post-execution hooks, records the results, and continues if more work is owed. Durable events make this process reconstructible; live waterfall events let plugins participate without importing the entire loop.

The DSH architecture documentation identifies packages for the session log, system-prompt assembly, scoped tools, agent registry, default agent loop, LLM adapter seam, and authenticated webhook delivery. The Python SDK uses the same application architecture by launching the version-matched SDK profile rather than carrying a separate runtime design.

OpenClaw’s implementation is a networked control plane. The Gateway exposes a typed WebSocket API. Clients such as the CLI, web UI, and macOS app connect as control-plane clients. iOS, Android, macOS, and headless nodes connect with a node role and explicit capabilities. The first frame must be a signed and authenticated connect message; requests, responses, and server-push events then flow over JSON frames.

4. Deployment

DeepSeek Harness

# Web UI
npx @deepseek-ai/dsh web

# From source
git clone https://github.com/deepseek-ai/deepseek-harness
cd deepseek-harness
pnpm install
pnpm run build
pnpm dsh web

After the Web UI starts, configure a model in Settings, choose a workspace, and run a repository task. For automation, use the SDK or ACP profiles. For debugging a composition, inspect the booted tree with dsh --profile web --dump-config. DSH is in developer preview, so profile and plugin APIs may change.

OpenClaw

# Local install
curl -fsSL https://openclaw.ai/install.sh | bash
openclaw onboard --install-daemon
openclaw dashboard

# Optional Docker deployment
./scripts/docker/setup.sh
docker compose up -d openclaw-gateway

OpenClaw’s Gateway is designed to remain running. It can be supervised by launchd, systemd, or a Windows scheduled task. Docker is optional and is useful for an isolated gateway or a host without a local install. Remote access is normally provided through Tailscale, a VPN, or an SSH tunnel. Before exposing it beyond localhost, configure authentication, pairing, allowlists, and sandboxing.

5. Usage examples

Example A: benchmark two agent compositions with DSH

Start a minimal profile for a controlled benchmark, then compare it with Standard mode. Keep the workspace and task fixed. Inspect the append-only trajectory to compare tool calls, retries, model requests, and completion quality.

# Minimal runtime for a controlled baseline
dsh --profile sdk-minimal

# Full runtime for comparison
dsh web

The point is not merely to run the same prompt twice. The point is to change the harness composition while preserving the task and retaining an inspectable execution record.

Example B: route a team’s channels with OpenClaw

Create separate coding and social agents. Give each its own workspace and session store, then bind one agent to a development channel and the other to a community channel.

openclaw agents add coding
openclaw agents add social
openclaw gateway restart
openclaw agents list --bindings
openclaw channels status --probe

For a stricter boundary, restrict cross-agent visibility, apply per-agent tool policies, and sandbox the less trusted agent. The Gateway remains shared, but each persona keeps its own state and routing boundary.

Conclusion

DeepSeek Harness and OpenClaw are not identical products competing for the same layer. DSH is a programmable substrate for composing and studying agent runtimes. OpenClaw is an operational gateway for making assistants reachable, persistent, and routable across human communication surfaces.

A useful architecture pattern is to treat them as complementary. Use DSH when the research question concerns the agent loop, plugin boundary, tool policy, or orchestration strategy. Use OpenClaw when the product question concerns channels, device access, persistent sessions, multi-persona routing, and safe operations. The next generation of agentic systems will likely combine both kinds of infrastructure: composable runtimes underneath and trustworthy gateways around them.

References

  1. DeepSeek Harness developer preview
  2. DeepSeek Harness repository
  3. DeepSeek Harness architecture documentation
  4. OpenClaw Gateway architecture
  5. OpenClaw multi-agent routing
  6. OpenClaw Docker deployment
← Previous Post

Leave a Comment