Preface¶
Running multiple agents in parallel directly within DeepSeek Harness (DSH) typically requires manually orchestrating the lead, workers, and verifier, while also handling branch merging, verification result aggregation, and runtime status display. Repetitive coordination logic is error-prone, and state scattered across multiple conversations makes it difficult to get a holistic view.
dsh-swarm is a local Swarm-mode plugin that adds unified orchestration and visualization capabilities to DSH: the lead decomposes a task into independent slices, spawns a worker for each slice, each worker operates in its own Git worktree and commits changes, the verifier inspects the results in read-only mode, and finally the lead merges the branches and cleans up. The entire run is presented in a single sidebar panel, including the Board (message stream), Members (member status and cost), Graph (agent relationship diagram), and real-time monitoring.
Overview¶
- Plugin name: dsh-swarm
- Maintainer: VukanCekic
- Category: Workflow
- Description: A local Swarm-mode plugin that provides parallel workers, a fresh verifier, a sidebar panel, and an agent graph for DeepSeek Harness.
Core Capabilities¶
- Task decomposition and parallel execution: The lead splits a task into independent slices and spawns a worker for each slice.
- Git worktree mode: In a Git repository, each worker works in an isolated worktree and branch (
.agents/worktrees/<worker-name>), commits after completion, is checked by the verifier, and then merged by the lead viagit merge --no-ff. - Read-only verification: The verifier uses a read-only toolset and verifies each worker’s commit in an isolated worktree (PASS/FAIL).
- Shared mode: In scenarios where Git worktrees are unavailable (non-Git repositories, detached HEAD, empty repositories, etc.), workers edit files in a shared directory and are verified in groups.
- Sidebar panel: Adds a Swarm tab on the right side of DSH, containing:
- Header meters: Run status, coordinator context window bar, session cost estimate, and total token statistics.
- Board: A unified message stream (user prompts, delegation briefs, peer relays, verifier verdicts, close reports), with support for search, member filtering, and a Follow toggle.
- Members: Grouped by Coordinator, Active, Standing by, and Retired, showing model, reasoning effort, token/time/cost statistics, passive stall detection (5 minutes of inactivity or stuck in a tool call), and the last error. Clicking a member opens their conversation.
- Graph: The coordinator is at the top, with workers, verifiers, and other members displayed in a role-grouped grid, supporting 3 to 100+ agents. Cards show status and message counts, preserving peer-to-peer message arrows. Supports Step/Play/Scrub replay, highlighting the sender and all recipients of each message; Live mode returns to the current state.
Installation & Activation¶
Package the plugin from the repository root:
node scripts/pack.mjs
Or in Windows PowerShell:
./scripts/pack.ps1
The output is ./dist/dsh-swarm-<version>.tgz (output directory is configurable).
Install it into DeepSeek Harness:
- Launch DSH once to create the
desktopprofile, then fully quit. - Use the DSH built-in CLI to install the
.tgzfile (the CLI is not on PATH and must be invoked from the installation directory):
# If using a non-default data directory:
$env:DSH_HOME = "<path-to-your-dsh-home>"
& "<DeepSeek Harness install folder>\resources\runtime\cli\bin\dsh.cmd" plugin --profile desktop add "file:<path-to-repo>/dist/dsh-swarm-0.5.0.tgz"
Paths containing spaces can be wrapped in quotes. On macOS/Linux, use the same dsh plugin command.
3. Enable the bundle in <DSH_HOME>/profiles/desktop/package.json:
"dsh": { "profile": { "bundles": [ "...your existing bundles...", "dsh-swarm" ] } }
- Launch DSH — Swarm will appear in the mode selector.
Typical Usage¶
- Open DSH in your project root directory.
- Switch to Swarm in the mode selector.
- Send your task description — the lead will automatically decompose the task and spawn workers and verifiers.
- In a Git repository, the lead checks the repository state: if it’s a clean branch or an approved baseline, it enters GIT mode and creates a worktree and branch for each worker.
- In non-Git scenarios or if the baseline is declined, it enters SHARED mode and workers operate in the shared directory. - Track progress and results in real time via the Board, Members, and Graph in the Swarm sidebar panel.
- Once all branches pass verification, the lead performs
git merge --no-ffto merge, runs the final verifier, and cleans up worktrees and branches.
Use Cases & Notes¶
- Use cases: Scenarios that require decomposing complex tasks for parallel execution, isolating worker workspaces within a Git repository, or needing unified visualization and cost monitoring for multi-agent collaboration.
- Notes:
- The plugin depends on
@deepseek-ai/cordis >=4.0.4 <5.0.0. It is recommended to use DSH 0.2.2-rc.3 or later and to ensure@deepseek-ai/dsh-experimental-worktreeis installed. - Node.js and Git must be available on PATH, and Git must have
user.nameanduser.emailconfigured. - By default, the
deepseek-v4.1-flashmodel from theopencode-goprovider is used, which requires an OpenCode Go account. You can modify theprovider/modeland effort level incordis.patch.yml. - Do not use this plugin simultaneously with DSH’s “Change requests & worktrees” (forge) bundle, as both register a
worktreeservice. - It is recommended to review the source code and license (MIT) before installation.
Closing¶
dsh-swarm provides DeepSeek Harness with a reusable Swarm orchestration workflow and visualization interface, ideal for scenarios that require orchestrating multiple agents in a local environment with unified runtime monitoring. For more details, refer to the plugin directory and the GitHub repository.