DSH Multi-model Orchestrator
在 DeepSeek Harness 中配置并运行由不同模型驱动的专业 Agent 团队。
中文 | English
中文
项目介绍
DSH Multi-model Orchestrator 为 DeepSeek Harness Web 设置页增加了 Agent 编排功能。你可以配置任意数量的可复用专业 Agent,为每个 Agent 选择 DSH 中已有的模型,并设置清晰的职责。这些 Agent 是可复用的 specialist 工具;child 任务的数量由有效工作和 runtime 容量决定,而不是由 Agent 列表数量决定。
Session 使用 Multi-model orchestrator 预设后,每个已启用的 Agent 都会成为独立的子 Agent 工具,供主 Agent 按任务需要进行委派。禁用 Agent 会保留其模型和提示词配置,但不参与新会话的委派。
主 Agent 的定位是产品负责人和工程项目经理,而不是默认开发者。面对非简单工作,它先明确目标与验收标准,拆分互不重叠的范围,并在实施开始前委派开发、调查、测试和审查。每个 child 在返回前独占一个内聚任务和验收目标;主 Agent 只协调不重叠工作、等待依赖、集成返回结果并执行最终验收。真正的一步小改仍可直接完成。
功能特性
- 配置任意数量的可复用的专业 Agent;每个工具可以服务多个 child 任务。
- 直接选择 DSH 中已有的模型。
- 为每个 Agent 设置固定 ID 和开发职责。
- 从对应模型实际提供的等级中选择可选推理等级。
- 为每个 Agent 设置可选的最大输出 Token。
- 由主 Agent 负责需求、计划、分配、集成和最终验收。
- 每个 child 独占一个内聚任务和验收目标,避免主 Agent 重复实现。
- 按复杂度将非简单工作拆分为任意数量有意义、互不重叠且可独立验收的任务,避免人为制造或过度微拆。
- 每个独立任务创建新的 child,即使多个任务匹配同一 specialist;独立任务可在 runtime 容量内并发,文件、所有权或依赖交叉的任务串行。
- 运行中的 Session 保持启动时的 Agent 配置。
- 每个 Agent 可独立启用或禁用,旧配置默认启用。
- 配置条目可展开或收起;收起时仍可查看模型、切换启用状态和删除,多条目列表可滚动。
- 保留标准模式的项目指令、Skills、时间上下文、计划审批和结果展示;定时任务在 Runtime 提供对应插件时可用。
环境要求
- DeepSeek Harness 0.2.0-rc.1 或兼容的新版本
- Node.js 22.19 或更高版本
- DSH 设置 > 模型 中至少有一个可用模型
安装
将插件安装到 DSH Web profile:
dsh plugin --profile web add -w github:ToxicantX/dsh-multi-model-orchestrator
安装完成后重启 DSH Web,并刷新浏览器。Host 启动时,插件会注册 Agent 预设,同时创建旧版 orchestrator 兼容 ID,使使用该 ID 的已有 Session 可以恢复,并从 Web 选择列表中隐藏使用官方显示名的兼容项和 Desktop 自动生成的升级、卸载备份。备份文件与历史 ID 保留。内容完全匹配官方旧版的无 marker preset 会被安全收编;经过自定义的用户 preset 不会被覆盖,改用不同名称时仍保持可见。
升级时,已有配置会被完整保留,包括此前超过 3 个 Agent 的名册;未设置启用状态的旧 Agent 默认启用,设置页可继续增删、启用或禁用。
如果通过 DSH 源码仓库运行,请将命令中的 dsh 替换为 pnpm dsh。
如果启动时提示受管预设已被修改或与现有预设冲突,并且你确认要丢弃这些本地改动,请显式修复:
dsh plugin --profile web exec dsh-orchestrator-install --force
使用方法
- 打开 DSH Web。
- 进入 设置 > Agent 编排。
- 点击 添加 Agent。
- 填写 Agent ID、开发职责和子 Agent 提示词。
- 从 DSH 可用模型中选择一个模型。
- 根据需要选择该模型支持的推理等级并设置最大输出 Token。
- 保存配置。
- 使用 Multi-model orchestrator 预设创建 Session。
修改 Agent 列表或模型分配后,请创建新的 Session。已经运行的 Session 会继续使用启动时的 Agent 配置。
在非简单 Session 中,主 Agent 会先确定验收标准并分配开发任务,再进入实施。它把已配置的 Agent 视为可复用的 specialist 工具,按复杂度将工作拆分为任意数量有意义、互不重叠且可独立验收的任务,并避免人为制造或过度微拆。每个任务都创建新的 child,即使它匹配已经用于其他任务的 specialist。独立任务可在 runtime 容量内并发;文件、所有权或依赖交叉的任务必须串行。存在合适 specialist 时,主 Agent 不自行承担开发,但不会为了占满 Agent 人为制造任务。每个 child 在返回前独占一个内聚任务和一个验收目标;主 Agent 可以协调其他明确不重叠的任务,但必须等待而不能并行实现相同目标。同一任务需要修正时,复用原 continuable child。specialist 返回后,主 Agent 负责检查集成边界并执行最终验收。
可靠性行为:没有独立工作剩余时,主 Agent 使用前台子调用,不反复轮询 list_agents 来消磨时间。rc.2 的 list_agents 只报告 running 或 inactive:running 表示当前轮次正在执行,inactive 只表示没有轮次正在执行,两者都不表示任务是否完成或成功。后台 child 只有在收到运行时 settlement notice 后才算返回;启动回执、send_message 投递回执和 inactive 状态都不是任务结果。只有 child 明确报告阻塞/死锁、依赖不可用、同一工具或执行错误连续两次,或两次状态检查都没有进展且存在未解决阻塞时,才可判定卡死。耗时、静默、不变状态、其他 child 已完成或主 Agent 准备结束,都不能单独构成卡死证据。只有用户明确取消、明确期限已经到达、有具体证据支持的真实死锁,或验证过的重复工具或执行失败才允许中断;中断前必须说明证据,并对准确的 child ID 只调用一次 interrupt_agent。该调用只确认已接受中断请求,目标可能短暂保持 running;后续 inactive 只证明轮次已停止,不证明任务已完成。主 Agent 不得在必需 child 仍运行、缺少前台结果或缺少后台 settlement notice 时结束;被中断或失败的 child 对应任务仍未完成,必须报告阻塞或重新规划。send_message 对运行中的 child 在下一个 step boundary 生效,对 inactive child 启动或恢复轮次,并且只返回投递确认,不返回 child 回复。specialist 连续两次遇到相同工具或执行协议错误后,改用最简单的有效替代工具调用或报告阻塞,并避免继续发起失败或没有有效输出的重复调用。
Agent 配置项
| 配置项 | 必填 | 说明 |
|---|
| Agent ID | 是 | 用于子 Agent 工具名称和逐 Agent 运行配置的稳定身份,例如 architect 或 reviewer。 |
| 启用状态 | 否 | 默认启用。禁用后保留配置,新会话不注册该 Agent 的委派工具;保存后创建新 Session 生效。 |
| 模型 | 是 | 从 DSH 模型目录中选择的 Provider 和 Model。 |
| 开发职责 | 否 | 展示给主 Agent 的简短路由摘要,用于选择 specialist;该字段不用于确定身份。 |
| 子 Agent 提示词 | 否 | 发送给对应子 Agent 的独立 persona 提示词。旧配置未填写该字段时,会回退使用开发职责。 |
| 推理等级 | 否 | 所选模型实际提供的推理等级之一;省略时使用模型默认值。 |
| 最大输出 Token | 否 | 限制 Agent 输出长度的正整数。 |
本地开发
git clone https://github.com/ToxicantX/dsh-multi-model-orchestrator.git
cd dsh-multi-model-orchestrator
pnpm install
pnpm bundle
pnpm typecheck
pnpm test
发布管理遵循语义化版本(SemVer)。请在 CHANGELOG.md 记录面向用户的变更,使用 vX.Y.Z 格式创建 tag,并运行本地预检:
pnpm release:check v0.7.0
推送匹配的 vX.Y.Z tag 会触发验证并创建带自动生成说明的 GitHub Release。npm 发布不会自动执行。
将本地仓库安装到 DSH 源码 profile:
pnpm dsh plugin --profile web add -w D:/path/to/dsh-multi-model-orchestrator
English
Overview
DSH Multi-model Orchestrator adds an Agent orchestration page to the DSH Web settings. You can configure any number of reusable specialist Agents, assign an existing DSH model to each one, and give each Agent a clear responsibility. These configured Agents are reusable specialist tools; the number of child tasks is determined by meaningful work and runtime capacity, not by the roster size.
When a session uses the Multi-model orchestrator preset, every enabled Agent becomes an independent subagent tool that the primary Agent can delegate work to. Disabled Agents keep their model and prompt settings but do not receive delegations in new sessions.
The primary Agent acts as the product owner and engineering manager rather than the default developer. For non-trivial work, it defines the outcome and acceptance criteria, decomposes non-overlapping scopes, and delegates development, investigation, testing, and review before implementation begins. Each child exclusively owns one cohesive task and acceptance target until it settles; the primary coordinates only non-overlapping work, waits on dependencies, integrates returned work, and performs final acceptance. Truly small one-step changes can stay local.
Features
- Configure any number of reusable specialist Agents; reuse each tool across multiple child tasks.
- Select models already available in DSH.
- Give each Agent a stable ID, development scope, and child-Agent prompt.
- Select an optional reasoning effort from the exact levels advertised by the Agent's model.
- Set an optional maximum output-token limit per Agent.
- Make the primary Agent responsible for requirements, planning, assignment, integration, and final acceptance.
- Give each child exclusive ownership of one cohesive task and acceptance target so the primary cannot duplicate its work.
- Split non-trivial work by complexity into any number of meaningful, non-overlapping tasks with independent acceptance targets, while avoiding artificial or overly granular splits.
- Create a new child for each independent task, including when multiple tasks use the same specialist; run independent tasks concurrently within runtime capacity and serialize file, ownership, or dependency overlaps.
- Keep each running session on the Agent configuration it started with.
- Enable or disable each Agent independently; existing configurations default to enabled.
- Expand or collapse each configuration. Collapsed rows retain the model summary, enable switch, and delete action; long lists scroll.
- Retain standard project instructions, Skills, time context, plan approval, and result presentation; reminders are available when the Runtime provides the corresponding plugin.
Requirements
- DeepSeek Harness 0.2.0-rc.1 or a compatible newer release
- Node.js 22.19 or newer
- At least one model available in DSH Settings > Models
Installation
Install the plugin in the DSH Web profile:
dsh plugin --profile web add -w github:ToxicantX/dsh-multi-model-orchestrator
Restart DSH Web after installation and refresh the browser. The plugin registers its Agent preset automatically when the Host starts. It also registers the legacy orchestrator preset ID so existing sessions created with that ID can resume while hiding official-name compatibility entries and generated Desktop upgrade or uninstall backups from Web selection lists. Backup files and historical identities are retained. Exact official pre-marker copies are adopted safely; customized user-managed presets are never overwritten and remain visible when given a distinct name.
Existing settings are preserved during an upgrade, including rosters that previously exceeded 3 Agents. Agents without an explicit enabled state default to enabled. The settings page keeps the complete roster available for editing and toggling.
When running DSH from a source checkout, use pnpm dsh instead of dsh in the command.
If startup reports that the managed preset was edited or conflicts with an existing preset, and you intend to discard those local changes, repair it explicitly:
dsh plugin --profile web exec dsh-orchestrator-install --force
Usage
- Open DSH Web.
- Go to Settings > Agent orchestration.
- Select Add Agent.
- Enter an Agent ID, development scope, and child-Agent prompt.
- Select one of the models available in DSH.
- Optionally select a reasoning effort supported by that model and set the maximum output-token limit.
- Save the configuration.
- Create a session with the Multi-model orchestrator preset.
Create a new session after changing the Agent roster or model assignments. Sessions that are already running keep their original Agent configuration.
During a non-trivial session, the primary Agent establishes acceptance criteria and assigns development tasks before editing. It treats the configured Agents as reusable specialist tools, decomposes work by complexity into any number of meaningful, non-overlapping tasks with independent acceptance targets, and avoids artificial or overly granular splits. Each task gets a new child, even when it matches a specialist already used for another task. Independent tasks run concurrently within runtime capacity; tasks that overlap files, ownership, or dependencies run serially. A suitable specialist is not kept idle while the primary performs development, but the primary does not invent work merely to use every Agent. Each child owns one cohesive task and one acceptance target until it returns; the primary may coordinate other clearly disjoint tasks but waits instead of implementing the same outcome. For corrections to the same task, it reuses the continuable child. After specialists return, the primary reviews integration boundaries and runs the final acceptance checks.
Reliability behavior: when no independent work remains, the primary uses foreground child calls and does not repeatedly poll list_agents just to pass time. In rc.2, list_agents reports only running or inactive: running means a turn is executing, while inactive means no turn is executing; neither status describes task completion or outcome. A background child has returned only when the runtime delivers its settlement notice. A start acknowledgement, send_message delivery confirmation, or inactive status is not a task result. A child is stuck only when it reports a blocker or deadlock, a required dependency is unavailable, the same tool or execution failure occurs twice, or two status checks show no progress together with an unresolved blocker. Elapsed time, silence, unchanged status, another child finishing, or the primary being ready to finish never qualifies by itself. Interrupts are limited to direct user cancellation, an explicit deadline that has arrived, a deadlock supported by concrete evidence, or verified repeated tool or execution failure. Before interrupting, the primary states the evidence and calls interrupt_agent once for the exact child ID. The call confirms acceptance before the target is quiet, so it may remain running briefly; a later inactive status proves only that the turn stopped, not that the task completed. The primary never finalizes while a required child is running, lacks a foreground result, or lacks its background settlement notice, and treats an interrupted or failed child as incomplete work requiring a blocker report or re-planned attempt. send_message steers a running child at its next step boundary or starts or resumes an inactive child; it returns delivery confirmation rather than the child's reply. After two occurrences of the same tool or execution-protocol error, a specialist switches to the simplest valid alternative tool call or reports the blocker and avoids repeated calls that fail or produce no useful output.
Agent fields
| Field | Required | Description |
|---|
| Agent ID | Yes | Stable identity used for the subagent tool name and per-Agent runtime settings, such as architect or reviewer. |
| Enabled | No | Defaults to enabled. Disabling retains the configuration and omits the Agent's delegation tool from new sessions. Save and create a new session to apply. |
| Model | Yes | Provider and model selected from the DSH model catalog. |
| Development scope | No | Short routing summary shown to the primary Agent when it chooses a specialist. It does not determine Agent identity. |
| Child Agent prompt | No | Dedicated persona prompt sent to the selected child Agent. Legacy configurations without this field fall back to the development scope. |
| Reasoning effort | No | One of the exact effort levels advertised by the selected model; omission uses the model default. |
| Maximum output tokens | No | Positive integer limiting the Agent's generated output. |
Local development
git clone https://github.com/ToxicantX/dsh-multi-model-orchestrator.git
cd dsh-multi-model-orchestrator
pnpm install
pnpm bundle
pnpm typecheck
pnpm test
Release management follows Semantic Versioning (SemVer). Record user-facing changes in CHANGELOG.md, create tags as vX.Y.Z, and run the local preflight:
pnpm release:check v0.7.0
Pushing a matching vX.Y.Z tag triggers verification and a GitHub Release with generated notes. npm publishing is not automatic.
Install a local checkout into a DSH source profile:
pnpm dsh plugin --profile web add -w D:/path/to/dsh-multi-model-orchestrator
License
MIT