dsh-swarm-orchestrator: DSH Parallel Sub-Agent Swarm Plugin

Preface

When making substantial changes in DSH, the common practice is to have the agent in the main conversation modify files serially step-by-step: advancing one block per round, which linearly extends the total time as the task scope grows. If the objective is split into non-overlapping slices and multiple independent sub-agents are dispatched simultaneously to write code, the wall-clock time can theoretically be shortened. However, the difficulties lie in how to dispatch slices, control concurrency, prevent repeated calls from re-running the entire task, and providing a clear, at-a-glance view of what each sub-agent is doing at runtime.

Below is an introduction to the community plugin dsh-swarm-orchestrator (maintainer zhuchuovo): It registers global tools on the host plane. After the parent agent provides the goal and the list of slices, it drives sub-agents concurrently according to the configuration and provides a real-time dashboard above the conversation input box. It is categorized under “Workflow” in the DSH ecosystem directory. The plugin is released under the MIT license, and its current GitHub star count is 0; the version in package.json is 1.1.0. The DSH community plugin directory is hosted on independent sites such as SkillHub and has no official affiliation with DeepSeek / High-Flyer.

What is this

dsh-swarm-orchestrator is a resident plugin for DeepSeek Harness: The parent agent splits the overall goal into multiple non-overlapping slices and drives multiple independent sub-agents to write code simultaneously based on the configured concurrency. After all are completed, an independent verification agent can optionally be dispatched. A real-time display above the conversation input box shows what each sub-agent is doing right now.

The plugin is installed in a single line in the host plane’s profile bundle. Cluster state is keyed by the caller’s session id, shared via a registry across sessions, and consumes the subagents singleton on the host plane, so it cannot be placed in a preset. Tools are registered at the global tools layer, meaning all conversations and all presets can call them; the dashboard, however, is rendered independently per session.

Core Features

Model Tools (Globally Available)

Tool Function
swarm_run Provide goal + tasks[] to dispatch sub-agents simultaneously based on concurrency; wait:false transfers it to the background. Idempotent: Repeated calls with the same goal + same batch of slices will not re-dispatch
swarm_status Lists ongoing items: slice, status, model, current tool and target, elapsed time, files touched, and delivery summary for each sub-agent
swarm_control cancel_all / cancel_unit / cancel_queued / clear

Idempotency Guardrails

Each cluster round calculates a “project fingerprint” (goal + slice list). When swarm_run is called repeatedly, it judges based on the fingerprint to prevent the model retry or upstream continuation from causing the entire round of slices to run from scratch again:

Situation Behavior
Same project is currently running Joins that round and returns its results (never restarts)
Same project has finished successfully Directly reuses the existing report, does not create any new sub-agents
Same project failed/was cancelled last time Allows passage, permitting retry
Goal or slice list changed Allows passage, treats it as a different project
Explicitly pass rerun: true Skips guardrails, forces a re-run

Changing only the concurrency or verification switch does not count as a new project and will still be reused; to re-run, you must pass rerun: true, or use swarm_control’s clear to wipe records before calling.

Interface and Configuration

  • Dashboard (conversation.input.dock, id swarm-board): One row per sub-agent, including status light, slice name, model, current tool and target file, steps/tool count, latest self-report, elapsed time, and progress bar; clicking the row opens that sub-agent’s conversation. It does not occupy space when the current session has no cluster tasks.
  • Settings Page (settings.section, id swarm): Concurrency 1–8, verification agent switch, sub-agent backend (fork / spawn / auto), per-slice model assignment (provider and model list fetched from existing operators).

Configuration is persisted in $DSH_HOME/swarm-orchestrator.json (default ~/.dsh/) and retained after restart; [swarm] config loaded from … may appear in host logs indicating successful read-back.

Installation and Enablement

Installation involves appending the plugin name to the bundle list in the profile. After installation, a profile restart is required (refresh the page if necessary). Combinations are read at startup; they will not take effect without a restart.

Append to dsh.profile.bundles:

// Append to dsh.profile.bundles
"dsh-swarm-orchestrator"

The client half is assembled via the declaration in package.json’s dsh.client, while the host half is inserted as a line via bundle patch.

After restarting, it is recommended to self-check in the order described in the README:

  1. The output of dsh --profile web --dump-config should contain - id: swarm-orchestrator.
  2. In any conversation, the three tools swarm_run, swarm_status, and swarm_control should be visible (switching sessions should also show them).
  3. A “Parallel Sub-agent Swarm” page should appear in settings; after changing concurrency and saving, $DSH_HOME/swarm-orchestrator.json should appear.
  4. Dispatch a 2-slice task: A dashboard should appear above the input box, with two rows showing “Running” simultaneously; clicking a row should jump into the sub-agent conversation.
  5. After restarting DSH, confirm whether the file from step 3 is read back.

Typical Usage

The parent agent calls swarm_run in the conversation, passing the overall goal and the tasks[] slice list; the plugin dispatches sub-agents simultaneously based on the concurrency setting on the settings page. For asynchronous needs, set wait:false to transfer to background, then use swarm_status to view the status of each sub-agent, or use swarm_control to cancel or clean up.

The sub-agent backend is selected from available names in subagents.list(), prioritizing fork (inheriting the context of the parent agent’s completed rounds); the verification agent prioritizes spawn (a brand new session). A maximum of 8 slices per run, with a concurrency limit of 8. After all sub-agents are completed, if the verification agent is enabled, an independent agent will be dispatched to perform acceptance.

Recursion is structurally limited by maxDepth: 1: Grandchild agents will be rejected by the sub-agent service. Although tools are registered at the global layer, if a preset uses tools.restrict({ allow: [...] }) to narrow down global tools, swarm_* may also be blocked, which is the preset’s own choice.

Applicable Scenarios and Notes

Suitable for: DSH users whose goals can be split into non-overlapping slices, wish to modify code in parallel, and need to see the real-time progress of each sub-agent in the main session; consistent with “multi-agent orchestration” workflow requirements.

Notes:

  • The plugin runs on the host plane and relies on the host’s subagents; it cannot be used as a bundle inside a preset.
  • Cancelling the entire round will abort all sub-agents in that round; background clusters with wait:false are held by the plugin’s AbortController and are not affected by the return of a single tool call.
  • Before installation, please review the GitHub Source Code and MIT license yourself; the plugin runs with the current DSH process permissions, and installation implies trust in the maintainer and code behavior.

Links

Through the steps above, you can use the parent agent in DSH to split slices, let concurrent sub-agents write code, and grasp the real-time status of each row via the dashboard above the input box; concurrency and models for each slice are adjusted on the settings page, while idempotency guardrails reduce the risk of repeatedly dispatching the entire task.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye