Preface¶
In DeepSeek Harness, the main agent can delegate tasks to subagents. If different tasks are suited to different LLM providers or models, manually specifying them each time can be repetitive. On the other hand, only inheriting the main agent’s settings lacks a means to plan and divide roles by functions such as “translation” or “code review.”
SeverusZh/dsh-plugin-subagent-director is used to specify LLM providers and models for DSH subagents and to plan the division of labor between the main agent and subagents using “role templates.” Below, we introduce its positioning, installation, configuration, and common invocation methods.
What Is This¶
This is a DeepSeek Harness plugin maintained by SeverusZh, licensed under MIT. The version displayed in package.json is 0.2.1.
The core goals of the plugin are twofold:
- Allow different subagents to use different LLM providers (routes) and models.
- Use role templates to describe subagents’ responsibilities and personas, with optional model binding, making it easier for the main agent to decide who to delegate tasks to.
Core Features¶
- Provider and Model Selection: Configure default LLM providers (routes) and models for subagents; a single delegation can also explicitly specify a model.
- Default Model Fallback: After configuring
defaultProvider/defaultModel, subagents without an explicitly specified model will use this default model;applyDefaultRouteis enabled by default, and when no default model is configured, it operates as a zero-intrusion no-op. - Hot Configuration Update: Changes in
settings.yamlor the settings panel take effect immediately without requiring a restart. - Role Templates: Define roles, including
displayName, responsibility descriptions, personas, and optional model bindings. - Role Referencing by Display Name: When the
roleparameter does not match an ID, it performs an exact match bydisplayName; if multiple roles have the same name, the first defined one is used with a prompt. - Four-Level Fallback Chain: Single-call parameters > Role binding > Plugin default > Inherited from main agent; zero-intrusion when unconfigured.
- Main Agent Guidance: The system prompt automatically injects a role list, allowing the main agent to see available delegation roles.
- Settings Interface: Default models can be configured within the DSH settings panel, and role cards can be added, removed, or modified.
- Continuable Background: Returns a continuable subagent ID, which can be used with
send_messagefor ongoing delegation. - Observability: When a subagent session is opened, the composer displays the actual provider/model running underneath; the documentation notes that this feature is currently unavailable and under development.
Installation and Enabling¶
Installation¶
Install using the plugin command:
dsh plugin --profile <name> add dsh-plugin-subagent-director
For local development, you can also mount a local checkout:
dsh plugin --profile <name> add link:<absolute path>
Note: Do not manually add subagent-director / subagent-director-bridge entries using - insert:, as this may cause a duplicate loader entry id error at startup.
Optional Configuration¶
To override the plugin’s default configuration, you can override the config of subagent-director by ID in cordis.patch.yml. Example:
- id: subagent-director
name: dsh-plugin-subagent-director
config:
subagentProvider: spawn
toolName: subagent_role
enableRunInBackground: true
backgroundMode: one-shot
maxDepth: 3
applyDefaultRoute: true
This mainly involves three types of configurations:
subagentProvider: Transport-related configuration.provider: LLM route-related configuration.toolName: The tool name visible to the model, e.g.,subagent_role.
subagentProvider (transport) and provider (LLM route) are two separate namespaces; do not confuse them during configuration.
Local Development Considerations¶
Before mounting locally with link:, you need to install dependencies and build:
npm install
npm run build
The local checkout should be located under $DSH_HOME/profiles/, or the repository should include node_modules. Otherwise, peer dependencies like @deepseek-ai/* may report ERR_MODULE_NOT_FOUND.
The settings page subscribes to provider and setting change events. After adding a new provider or API key on the Models page, the relevant dropdown lists will automatically refresh without requiring a restart.
Typical Usage¶
Configuring Role Templates¶
Role templates are configured under the subagent-director namespace in settings.yaml. Example:
subagent-director:
defaultProvider: opencode-go
defaultModel: minimax-m2.7
defaultReasoningEffort: low
roles:
translator:
displayName: Translator
description: Translate technical documents, code comments, and communication content between Chinese and English, ensuring terminological accuracy and tone.
persona: You are a professional translator. Maintain terminology consistency, use natural sentence structures, preserve the original intent; keep proper nouns and technical abbreviations in their original form, and mark any uncertain terms.
Roles can be bound to a provider/model or inherit the global default model; they can also have models bound individually per role.
Delegation Calls¶
In conversations or model tool calls, you can use subagent_role to delegate tasks:
subagent_role({ role: "translator", prompt: "Translate README.md into English" })
subagent_role({ role: "code-reviewer", model: "deepseek-chat", prompt: "..." })
In the second example, the model field is used to temporarily override the model for the current call.
The role parameter supports using a role ID or displayName. When the ID does not match, it performs an exact match by displayName; if multiple roles have the same name, the first defined one is used with a prompt. It is recommended to always use the ID.
Use Cases and Notes¶
- Suitable for DSH users who need different subagents to use different LLM providers or models.
- Suitable for those who wish to break down responsibilities such as “translation,” “code review,” and “architecture design” into role templates, allowing the main agent to delegate tasks by role.
- When no roles are configured and no default model is set, the behavior is consistent with not having this plugin installed.
- When
defaultProvider/defaultModelis configured andapplyDefaultRouteis not disabled, all subagents without an explicitly specified model (including those initiated by built-in tools) will use this default model. subagentProviderandproviderbelong to different namespaces and need to be distinguished during configuration.- The observability-related display capabilities are currently noted as unavailable and under development in the documentation.
- The plugin runs with the current DSH process permissions. Before installation, check the source code and license.
Summary¶
SeverusZh/dsh-plugin-subagent-director organizes “which subagent uses which model” and “which role category the main agent delegates tasks to” into configurable items: default models, role templates, the settings panel, and the subagent_role call all revolve around this chain.
Repository: https://github.com/SeverusZh/dsh-plugin-subagent-director