dsh-team-runner:DeepSeek Harness 多智能體編排插件

前言

在 DeepSeek Harness (DSH) 的開發場景中,智能體邏輯通常涉及多個子智能體的協作。直接在代碼中調用 ctx.subagents 容易產生重複邏輯,且難以統一管理策略。dsh-team-runner 旨在解決這一問題,它將 subagents 的連接點封裝爲可複用的、受策略控制的智能體團隊。

是什麼

dsh-team-runner 是一個 DeepSeek Harness 插件,由用戶 tkr520521 維護,許可證爲 MIT。

其核心價值在於將分散的 subagents 調用轉化爲標準的“團隊”定義。用戶可以預先定義包含規劃、撰寫、審閱等角色的團隊,通過統一的工具接口調用,從而簡化多智能體編排流程。

核心功能

該插件提供以下核心能力:

  1. team_run:將團隊定義作爲單個工具運行,支持提示注入。
  2. team_list:列出當前可用的團隊定義。
  3. team_delegate:委託給團隊內的特定子智能體,允許動態替換。
  4. 策略門控:通過 maxConcurrentDelegations 限制併發委託數量,防止資源耗盡。
  5. 團隊編排:通過 ctx.subagents 協調規劃器、編寫者、審閱者等角色的執行順序。

安裝與啓用

安裝該插件需要指定一個 profile。

dsh plugin --profile <name> add dsh-team-runner

前置依賴:
插件運行需要特定的子智能體提供者,通常包括 spawn 或 fork。

配置文件要求:
需要在 profile 的配置中添加 cordis.patch.yml,以啓用插件提供的工具。

典型用法

在 cordis.patch.yml 中配置團隊定義。以下示例定義了一個名爲 writing 的團隊,包含規劃、撰寫和審閱三個角色:

- insert:
    - id: dsh-team-runner
      name: dsh-team-runner
      config:
        provider: spawn
        maxConcurrentDelegations: 3
        teams:
          - name: writing
            agents:
              - role: planner
                prompt: 'Plan the task: outline goals, steps, and acceptance criteria.'
              - role: writer
                prompt: 'Write the full deliverable following the plan.'
              - role: reviewer
                prompt: 'Review the deliverable for correctness and quality; report issues.'

配置完成後,可以通過以下命令調用團隊:

Use team_run with team "writing" on: ...

注意事項與適用場景

適用場景:
適合需要固定工作流(如規劃 -> 撰寫 -> 審閱)的場景,或者需要將多個子智能體組合成標準化組件的項目。

注意事項:
1. 配置依賴:必須確保 profile 中正確配置了 cordis.patch.yml。
2. 子智能體提供者:必須安裝並配置支持 spawn 或 fork 的子智能體提供者。
3. 運行權限:插件以當前 DSH 進程的權限運行,需注意安全沙箱策略。

結語

dsh-team-runner 爲 DeepSeek Harness 提供了標準化的團隊編排能力。通過將 subagents 的連接點轉化爲可複用的團隊定義,它降低了多智能體協作的複雜度。更多信息可參考插件目錄或GitHub 倉庫。

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

小夜