dsh-agent-customizer:在 Web GUI 裏爲每個 Agent 寫 Instructions 與默認模型

前言

DeepSeek Harness(DSH)可以在同一會話裏切換不同的 agent 來應答。每個 agent 的行爲往往還取決於 system prompt 和部署側的默認模型;若把這些寫在 profile 的 YAML 裏改,排查路徑長,升級 profile 時也可能和手寫補丁纏在一起。

dsh-agent-customizer 是 borncode-app 維護的客戶端類插件:在 Web GUI 的 Settings → Agent customization 頁面,爲當前選中的 agent 編輯一段 Instructions(寫入該 agent 的 system prompt),並設置 deployment default model。內容由插件旁的 state.json 持久化,不嵌進 bundle,profile 升級或拉取插件更新時一般不會被清空。

資料說明:原獨立倉庫 borncode-app/dsh-agent-customizer 已遷入 monorepo borncode-app/dsh-borncode(包路徑 packages/dsh-agent-customizer)。新用戶宜安裝統一 bundle dsh-borncode,而非逐個安裝舊倉庫;舊鏈接仍可用。下文能力描述以 README 與 package.json 爲準。

這是什麼

  • 名稱:dsh-agent-customizer(插件列表中常顯示爲 agent-customizer)
  • 維護者:BornCode / borncode-app
  • 分類:客戶端(Web GUI 注入設置頁)
  • 許可證:MIT(© 2026 BornCode)
  • 版本(package.json):1.0.0

一句話:讓你在 Web 界面按 agent 粒度定製 Instructions 與部署默認模型,並在每輪對話把對應 Instructions 貢獻進該 agent 的 system prompt。

核心功能

以下爲 README 中已列出的能力:

  1. Per-agent instructions:每個 agent 獨立編輯器;只有當前 agent 使用自己的文本塊。
  2. Deployment default model:與 Instructions 同一頁讀寫,不必在 YAML 裏找 fallback 模型。
  3. Survives upgrades:文本存在插件目錄的 state.json,不在 profile patch 裏,減少升級覆蓋風險。
  4. Bounded input:通過 maxLength 在寫入 system prompt 前拒絕過長粘貼。
  5. Localized UI:locale/ 提供英文、泰文、中文界面串。
  6. 無額外運行時負擔:README 寫明無網絡調用、無憑據、無後臺定時器。

環境與要求

項 說明
DeepSeek Harness 0.2.x(帶 Web GUI)
Runtime Node 24,由 Harness 運行時提供
平臺 Windows、macOS、Linux

安裝與啓用

README 給出的安裝方式是:將 bundle 放到本機穩定目錄後,在 DSH 中安裝該目錄。因任務要求不採用 git clone,可按你已有的獲取方式(例如 release 包、monorepo dsh-borncode 中的 packages/dsh-agent-customizer 路徑)準備好目錄,再執行下列之一。

在 DSH 打開 Plugins,從該目錄安裝 bundle;或讓 agent 執行:

plugin_manager install_bundle target=C:\path\to\dsh-agent-customizer

(將路徑換成本機實際目錄;Linux/macOS 使用對應絕對路徑。)

安裝後重啓一次。列表中會出現 agent-customizer 行;profile 通過 link: 引用目錄,後續在目錄內更新插件即可原地生效。

若你安裝的是合併後的 dsh-borncode bundle,則按該倉庫說明安裝一次即可包含本插件,無需再單獨裝舊獨立倉庫。

配置

通過 profile 的 cordis.patch.yml 覆蓋 bundle 默認項(cordis.patch.yml 會插入 host row):

字段 默認值 含義
endpoint /plugins/agent-customizer Web GUI 讀寫定製內容的 HTTP 路徑
maxLength 20000 Instructions 允許的最大字符數

示例:

- id: agent-customizer
  config:
    maxLength: 40000

典型用法

  1. 完成安裝並重啓 DSH。
  2. 在 Web GUI 進入 Settings → Agent customization。
  3. 選擇要配置的 agent,在 Instructions 編輯器中寫入希望進入該 agent system prompt 的說明,保存。
  4. 在同一頁設置 deployment default model(部署默認模型)。
  5. 切換會話中的 agent 驗證:每個 agent 只應看到自己對應的 Instructions 塊。

工作原理(簡)

  1. Host row 在 Web GUI 源站註冊小型 HTTP endpoint,並加載 state.json。
  2. 客戶端 client.js 渲染當前 agent 的編輯器,並通過 PUT 寫回文本。
  3. 每一輪對話,host row 把已存文本貢獻給該 agent 的 system prompt,不做其它改寫。

主要文件:index.js(endpoint、持久化、system-prompt 貢獻)、client.js(設置頁 UI)、cordis.patch.yml(插入 host row)、locale/{en,th,zh}.json。

適用場景與注意

適合:需要在 GUI 里長期維護「多 agent、每人設不同 Instructions / 默認模型」的 DSH 用戶;希望 Instructions 與 profile patch 解耦、減少升級丟配置的情況。

注意:

  • 插件隨當前 DSH 進程權限運行;安裝前請自行查看源碼與 MIT 許可證,確認符合你的環境策略。
  • 社區目錄 skillhub.cn 爲獨立站點,與 DeepSeek / 幻方無官方從屬關係;插件星標(目錄線索)爲 0,選用時以功能與源碼爲準。
  • 遷入 monorepo 後,長期維護以 dsh-borncode 爲準;舊倉庫 README 僅作跳轉與兼容鏈接。

結尾

dsh-agent-customizer 把「按 agent 的 Instructions + 部署默認模型」收到 Web 設置頁,並用 state.json 持久化,適合在 DSH 0.2.x 上做多 agent 人設與模型 fallback 的日常維護。

  • 目錄頁:https://www.skillhub.cn/plugins/borncode-app/dsh-agent-customizer
  • GitHub(兼容):https://github.com/borncode-app/dsh-agent-customizer
  • 新歸屬 monorepo:https://github.com/borncode-app/dsh-borncode
羽毛球分组比赛记分
小程序二维码

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

小夜