leonardoxr/dsh-routed-subagent0

dsh-routed-subagent

为 DeepSeek Harness 提供基于复杂度的子 Agent 路由分发:模型可根据任务挑选配置的运行层级。

AI 分析

核心用途是让主模型根据任务难度自动分流给不同配置(模型、Token上限、推理深度)的子 Agent。适合构建复杂多步骤工作流、需要精细控制 API 成本与效果的用户。

包名
dsh-routed-subagent
版本
0.1.0
许可证
MIT
最近更新
2026年8月22日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:leonardoxr/dsh-routed-subagent

dsh-routed-subagent

Complexity-routed subagent delegation for DeepSeek Harness. The calling model judges each delegated task and picks the runtime tier — provider, model, token cap, reasoning effort — it deserves. Spawn chains bound what deeper delegation may exist at all.

Built only on public Harness seams (ctx.subagents.start() per-start agentOptions, the agent-scoped agent/request waterfall). No upstream source changes; works on CLI, plain dsh web, and community desktop distributions.

Install

dsh plugin --profile  add dsh-routed-subagent   # once published
# or straight from a git checkout / packed tarball:
dsh plugin --profile  add C:/path/to/dsh-routed-subagent

Configure

The tool refuses to load without tiers — set them in your profile's patch layer (~/.dsh/profiles/ /cordis.patch.yml) by targeting row id routed-subagent. A tier is one runtime; spawnable chains what its children may hire:

# Sol's main agent gets the full menu; GPT children stay inside the codex pool.
- id: routed-subagent
  config:
    toolName: subagent            # optional: replaces the stock name
    maxDepth: 'provider-managed'
    tiers:
      gpt-fast:
        provider: openai-codex        # your codex subscription route
        model: gpt-5-mini
        maxTokens: 16384
        guidance: 'Lookups, mechanical edits, single-file changes, summarization.'
      gpt-deep:
        provider: openai-codex
        model: gpt-5.2
        maxTokens: 65536
        reasoningEffort: high         # applied via the agent/request waterfall
        guidance: 'Multi-step reasoning, architecture, hard debugging.'
        spawnable: [gpt-fast]         # deep children may hire fast helpers only
      local-cheap:
        provider: deepseek
        model: deepseek-chat
        maxTokens: 8192

Per-agent menus come from composition: mount this row (with different toolName + tiers) inside an agent preset to give that preset its own delegation menu. An agent whose preset lacks the row cannot delegate at all.

Config reference

KeyDefaultMeaning
toolNamerouted_subagentRegistered tool name; keep distinct from the stock subagent tool
providerNamespawnSubagent transport on ctx.subagents
enableRunInBackgroundtrueExpose run_in_background (jobs runtime required)
maxDepth'provider-managed'Numeric cap requires the provider's depthLimit capability
rootTiersall tiersTiers top-level agents may use
tiers.*.provider, .modelrequiredChild request routing (AgentOptions)
tiers.*.maxTokensOutput-token cap for the child
tiers.*.reasoningEffortEffort forced onto every child request
tiers.*.personaPer-child persona override (needs persona capability)
tiers.*.guidanceOne-line tradeoff shown to the calling model
tiers.*.spawnable[]Tier names children of this tier may delegate to

How the choice works

The tool description carries each tier's guidance; the model judges the delegated work per call and picks tier. Deeper in a chain, the exposed menu narrows to the caller tier's spawnable list — violating calls fail with a message naming what is valid, so the model self-corrects.

Security note

Harness's /api trust fence is DNS-rebinding defense, not authentication. Whatever a delegated child can do, anyone who can reach the server can set in motion. Keep expensive tiers behind routes whose accounts you accept spending.

License

MIT