Introduction¶
If you are already running an AI coding agent in DeepSeek Harness (DSH) and wish to assign different tasks to different models, backends, toolsets, and result contracts without wanting to introduce another independent multi-agent framework, dsh-legion is introduced below.
DSH’s plugin ecosystem allows extending capabilities on top of an existing runtime. Compared to writing model IDs directly in every prompt, or adopting an independent multi-agent framework that comes with its own runtime, state, and process lifecycle, dsh-legion’s approach is to leave delegation strategies to deployment-side configuration: the coordinating agent only selects semantic Specialists, for example quick, deep, review, while specific model routes, subagent backends, personas, tool filters, depth, and result contracts are determined by plugin configuration.
What is it¶
dsh-legion is a DeepSeek Harness plugin maintained by wxxb789, positioned as a TypeScript multi-agent orchestration and LLM model routing plugin. The license is MIT.
It is a DSH plugin, not an independent agent framework or application. DeepSeek Harness provides Agent, Session, model adapters, subagent runtime, sandbox, approvals, Web GUI; dsh-legion does not introduce an additional scheduler, session store, database, or agent runtime.
Core Features¶
Semantic Specialists¶
dsh-legion provides a model-oriented legion tool for coordinating agents to select semantic Specialists, for example:
quick
deep
review
These names are used to express delegation intent, replacing the raw model selection in every prompt.
Precise Model Routing¶
Each Specialist can carry its own deployment-specific model route. The routing supports up to 8 ordered provider/model candidates, along with static context and output budget constraints.
Multiple Backends and Strategies¶
Each Specialist can use spawn, fork, codex, claude-code, or other DSH-registered subagent providers.
At the same time, the following can be configured:
- Subagent tool limits;
- Specialist instructions;
- Depth;
- Foreground / Background defaults.
Structured Results¶
dsh-legion provides versioned foreground result contracts:
text
findings-v1
review-v1
Cohorts and Strategies¶
Custom Cohorts can declare bounded Member Slots and reference existing Specialists.
Declarative Strategies can compile typed artifact graphs into frozen DSH delegation primitives.
Each Cohort Run can set hard limits, including:
agents
concurrency
deadline
acceptable output size
Catalog and Prompt Resources¶
Catalog customization supports the following for user or third-party catalog entries:
- Layering;
- Replacement;
- Disabling;
- Restoring.
Prompt Fragments can load restricted, immutable UTF-8 prompt resources from the deployment’s root directory.
Interpretability and Boundaries¶
dsh-legion provides stable digests, deterministic diagnostics, routing evidence, and JSON explain outputs.
The boundaries to note are: prompts can only select a Specialist and cannot expand the model, tools, persona, or depth behind that Specialist. dsh-legion does not provide aggregated token or monetary cost admission.
Installation and Enablement¶
The steps below are used to connect an environment already running DSH to dsh-legion.
- Install the plugin to the DSH host profile. You can append
#<commit-sha>to fix the revision.
dsh plugin --profile web add github:wxxb789/dsh-legion
- Copy the Legion line to your own agent preset, then start a new session. The template path is:
examples/legion.agent.cordis.fragment.yml
- Verify the routing strategy before delegating. This step is used to check configuration and provider capability fixtures before runtime.
dsh-legion doctor examples/legion.config.yml --providers examples/providers.fixture.yml
After the steps above, the coordinating agent will eventually see a legion tool whose specialist value is the semantic delegation choice.
Typical Usage¶
dsh-legion is suitable for the following purposes:
- Routing by task type;
- Running independent reviews;
- Building multi-agent workflows;
- Constraining workload and risk;
- Standardizing delegation;
- Verifying strategies before runtime;
- Customizing via Catalog Layers.
For example, quick can be used for tasks that finish quickly, deep for tasks requiring deeper reasoning, and review for independent reviews. Actual routing, backends, tools, depth, and result contracts still depend on deployment-side configuration.
Suitable Scenarios and Notes¶
Suitable for:
- Already running DSH;
- Want multi-agent delegation to be auditable and reusable;
- Don’t want to introduce another independent scheduler, session store, or agent runtime;
- Need to verify delegation strategies before runtime.
Precautions:
- If you are not running DSH, dsh-legion is not the right tool; an independent framework would be more suitable;
- The plugin runs with the current dsh process permissions; you should check the source code and license before installing;
- The license is MIT;
- Environment notes indicate Node.js requirements of
^22.19.0or>=24.0.0, and TypeScript is set to strict; - The DSH plugin directory is an independent site, not an official app store, and has no official affiliation with DeepSeek / Hypothesis;
- The verified information for this release does not provide a confirmable directory page URL, so it is not listed here.
Conclusion¶
The value of dsh-legion lies in: adding a layer of auditable multi-agent delegation strategies on top of DSH’s existing runtime, rather than replacing DSH or introducing a second runtime. It combines semantic Specialists, precise model routing, backend selection, tool strategies, structured results, and hard limits, suitable for teams already working on DSH who want to configure delegation strategies.
GitHub:
https://github.com/wxxb789/dsh-legion