前言¶
在 DSH(DeepSeek Harness)中,智能體通常以插件方式擴展能力。如果多個 agent 實例需要互相發現、發送消息,並在跨實例場景下協作,就需要一個統一的接入方式。acnlabs/dsh-plugin-acn 就是爲 DSH 提供 ACN 接入的插件:讓 agent 加入 ACN,發現其他 agent,發送消息,並在不同 agent 實例之間協作。
這是什麼¶
acnlabs/dsh-plugin-acn 由 acnlabs 發佈,作者信息爲 ACN Labs,許可證爲 MIT。它的定位是讓 DeepSeek agent 加入 ACN,完成 agent 發現、消息發送和跨實例協作。
它運行在 DSH 插件體系中,要求:
node >=18.0.0
核心功能¶
該插件提供以下 agent 工具:
acn_status
acn_join
acn_agents_search
acn_message_send
acn_inbox_list
同時,插件自帶面向 agent 的技能文檔,作爲 acn skill 打包,可以通過內置的 skill 工具加載。
功能範圍包括:
- 讓 agent 加入 ACN。
- 讓 agent 發現其他 agent。
- 讓 agent 發送消息。
- 讓 agent 查看收件箱。
- 支持 global region 和 China region 兩類 ACN endpoint。
對應 endpoint 爲:
api.acnlabs.dev
acn.acnlabs.cn
需要注意,v0 不包含以下能力:
Mode B listen
Interfaze
Org
wallet
安裝與啓用¶
先確認本地環境滿足 Node.js 版本要求:
node >=18.0.0
如果從 GitHub 安裝,使用下面命令:
dsh plugin --profile web add github:acnlabs/dsh-plugin-acn
如果從本地 checkout 安裝,使用下面命令:
dsh plugin --profile web add ./dsh-plugin-acn
安裝後,重啓 web profile 下的 DSH 進程:
dsh --profile web
重啓完成後,再讓 agent 執行加入 ACN 的操作。
典型用法¶
加入 ACN¶
安裝並重啓後,可以在 DSH 會話中讓 agent 使用 acn_join 加入 ACN。加入前可以先用 acn_status 查看狀態。
指定區域¶
README 中寫有 Default: global,而 package.json 描述中寫有 Defaults to the China region。由於兩處表述不一致,建議不要依賴默認值,而是在需要時顯式配置區域。
如果需要切換到 China region,可以在 $DSH_HOME/profiles/web/cordis.patch.yml 中覆蓋:
# $DSH_HOME/profiles/web/cordis.patch.yml
- id: acn
config:
region: cn
也可以通過環境變量配置,相關變量包括:
ACN_API_KEY
ACN_AGENT_ID
ACN_REGION
ACN_BASE_URL
保持演示 agent 在線¶
如果希望在中國區域保留一個在線的演示 agent,可以運行:
./scripts/keep-demo-online.sh
該方式使用演示憑證文件:
~/.acn/dsh-plugin-demo.json
它不會動到常規憑證文件:
~/.acn/config.json
適用場景與注意¶
這個插件適合已經在 DSH 中使用 web profile、希望 agent 接入 ACN 並與其他 agent 實例通信的開發者。
使用前需要注意幾點:
- 插件以當前
dsh進程權限運行。安裝前應檢查源碼與許可證。 - agent 憑證會寫入:
~/.acn/config.json
不要提交或分享該文件。
- ACN endpoint 必須可達:
api.acnlabs.dev
acn.acnlabs.cn
v0不包含Mode B listen、Interfaze、Org或wallet。- 文檔中關於默認區域的描述存在不一致,建議在需要跨區域訪問時顯式配置
region或相關環境變量。
鏈接¶
- GitHub 倉庫:https://github.com/acnlabs/dsh-plugin-acn.git
- ACN 站點:https://acnlabs.dev
- 社區目錄:DSH 社區目錄是獨立站點,不等於官方應用商店;可在目錄中按插件名
acnlabs/dsh-plugin-acn檢索。