Introduction¶
In the DeepSeek Harness (DSH) ecosystem, managing subagents typically requires writing additional configuration or scripts. This plugin solves that problem: it allows you to define agents directly using local Markdown files and register them as official DSH subagents. This provides a lightweight way to extend DSH’s capabilities, supporting background task dispatch and bidirectional follow-up.
Core Features¶
-
Markdown File as Agent Definition
Create a.mdfile in the~/.dsh/agents/directory, where the filename is the Agent name. Frontmatter defines metadata (such as model and thinking intensity), while the body serves as the system prompt. Changes take effect immediately. -
Breakpoint Resumption
If a long-running task is interrupted during execution (for example, due to errors, cancellation, rate limits, or crashes), subsequent calls automatically resume from the saved progress instead of starting over from the beginning. -
Background Dispatch and Bidirectional Follow-up
Supports placing agents in the background while the main conversation continues. Theask_agentinterface can send follow-up messages to a background agent and wait for a reply. -
Ready-to-use Preset Agents
The plugin includes three preset Agents:workhorse,oldfox, andrubber-duck. They are seeded only on first startup when the directory is empty, and subsequent changes will not overwrite them. -
Based on the Official Spawn Provider
All custom Agents are started through DSH’s officialspawnprovider, making them genuine dsh subagents that inherit official native capabilities for sessions, persistence, and bidirectional communication. -
Concurrency and Depth Control
Supports limiting concurrent behavior through configuration options such asmaxActiveSubagents(maximum number of simultaneously active sub-agents, default8) andmaxDepth(maximum delegation nesting depth, default1).
Installation and Enablement¶
This plugin requires DSH version >= 0.1.7-rc.1 (RC/stable line; the Alpha line is no longer supported).
- Local Installation
Clone the repository locally and mount it in the Profile:
dsh plugin --profile tui add ~/github/dsh-subagent-registry
Restart DSH to activate the plugin.
- NPM Installation
npm i @aiwayds/dsh-subagent-registry
Load it in the Profile configuration using the stable ID `dsh-subagent-registry`, or mount it using a bundle patch.
Typical Usage¶
- Direct Invocation from the Main Conversation
Use the Agent name directly in the conversation:
用 workhorse 把今天的发布清单整理成表格
The underlying call is `use_agent(agent: "workhorse", prompt: "…")`.
- Asking a Background Agent
Useask_agentto send a message to a background agent and wait for a reply:
ask_agent(agent: "worker", message: "…")
- Defining a Custom Agent
Create a file in~/.dsh/agents/and configure the frontmatter:
---
name: my-agent
description: "一行简介"
model: opencode-go/deepseek-flash
thinking: high
---
You are my-agent. 这段正文作为 system prompt。
- Configuring the Concurrency Limit
Write the configuration in the profile patch:
subagent: {
maxActiveSubagents: N,
maxDepth: M
}
Applicable Scenarios and Notes¶
- Target Users: Developers who need to manage multiple role-based divisions of work (such as development, review, and testing), or users who want to manage AI behavior logic using plain text.
- Uninstall Method:
dsh plugin --profile <name> remove @aiwayds/dsh-subagent-registry. After uninstallation, the Agent files are retained, but theuse_agent/ask_agenttools are removed. - Fallback Handling: Without this plugin, dsh-tui-pi degrades gracefully, only losing the ability to dispatch custom Agents.
- Dependency Check: Before use, ensure that the current DSH version satisfies
>= 0.1.7-rc.1.
Conclusion¶
By introducing a local Markdown file mechanism, this plugin lowers the barrier to using DSH subagents while maintaining compatibility with official mechanisms. For more configuration details, refer to the documentation.