DeepSeek Harness 插件:AgentRouter

前言

DeepSeek Harness(DSH)采用“一切皆插件”的理念,让开发者通过插件扩展模型推理能力。在构建需要调用外部工具的智能体时,开发者常常面临两个问题:第一,如何从众多工具中找到合适的 provider;第二,如何在不失控的情况下预览价格并控制预算。AgentRouter for DeepSeek Harness 插件直接在 DSH 中打开 AgentRouter 工具目录,提供价格预览与带预算限制的研究执行能力。

插件简介

AgentRouter for DeepSeek Harness(agentrouter-dsh)是 PageOneLab 维护的 DSH 插件,归类于“模型推理”。它帮助 DSH 用户在本地发现 AgentRouter 提供的工具,查看当前价格与计费规则,并从本地钱包支出预算内执行研究任务。插件加载后可直接使用两个目录工具,无需额外配置。

核心功能

  • 工具目录与价格预览
  • 使用 agentrouter_find 查找可用的 provider 工具。
  • 使用 agentrouter_describe 查看工具的输入 schema、当前价格与计费规则。
  • 两个目录工具(如 Google 有机搜索、Reddit 搜索)在插件加载后即可免费使用。
  • 研究执行与预算控制
  • 使用 agentrouter_invoke 发起研究请求,并指定 USD 预算上限。
  • 每次调用会展示选定的 provider 工具、输入与预算决策(明确上限或实际用量)。
  • 请求通过 AgentRouter HTTPS API 发送,由 AgentRouter 执行额度与账户预算校验。
  • 使用 agentrouter_get_run 配合返回的 run ID 查询状态、费用与结果;重试需保留幂等性键与参数。
  • 技能(Skills)
  • 内置若干预定义技能,包括 competitor-brief、job-shortlist、growth-teardown、ugc-teardown,可用于快速获取竞品对比、职位筛选、增长拆解与 UGC 内容创作等场景。

安装与启用

使用 DeepSeek Harness 0.2.2-rc.5、Node.js 24.9 或更高版本以及 pnpm。添加插件到本地 Web profile 并启动 DSH:

dsh plugin --profile web add -w github:pageonelab/agentrouter-dsh
dsh --profile web

若使用本地 checkout,将 GitHub spec 替换为绝对目录。移除插件可运行:

dsh plugin --profile web remove -w agentrouter-dsh

典型用法

1. 价格预览与工具查找

# 查找工具
agentrouter_find

# 查看某个工具的 schema 与价格
agentrouter_describe

2. 执行带预算的研究请求

  1. 在 AgentRouter 账户设置中创建 API key,授予 read 与 invoke 权限。
  2. 在 DSH 本地凭证或启动环境中设置环境变量 AGENTROUTER_API_KEY,并将 key 放入个人 DSH profile(避免在共享 profile 或仓库中暴露)。
  3. 在调用时指定 USD 预算(可选),例如:
agentrouter_invoke --budget 5.0
  1. 使用 agentrouter_get_run 读取状态、费用与结果,重试时保留幂等性键与参数。

3. 使用内置技能

在 DSH 中以自然语言或技能名称提问,插件会根据描述选择对应指令。例如:

  • “Which alternatives do buyers mention on Reddit, and what made them switch?”
  • “Find three Toronto sales roles I can apply for today. Link the employer forms.”
  • “How does this product turn free users into referrals? Show where that happens.”
  • “Use my clip notes to write a 12-second Reel for this product, with two opening lines.”

适用场景与注意

  • 适用对象:需要通过 AgentRouter 调用外部数据与研究工具的 DSH 用户,尤其是关注成本控制与价格透明度的开发者。
  • 权限与安全:插件以当前 DSH 进程的权限运行,请确保环境与配置安全;API key 仅授予必要权限,并置于个人 profile 中。
  • 依赖版本:需要 Node.js >= 24.9.0 与 DSH 0.2.2-rc.5;插件与 @deepseek-ai/dsh-tools 0.2.2-rc.5 互为 peerDependencies。
  • 许可证:遵循 MIT 许可证,使用前请查看源码与许可证声明。

短结尾

AgentRouter for DeepSeek Harness 在 DSH 中打通了工具目录与成本控制的闭环,帮助开发者在调用外部工具时做到“看得见、控得住”。更多细节可在插件目录页与 GitHub 仓库查看。

  • 插件目录页:https://www.skillhub.cn/plugins/pageonelab/agentrouter-dsh
  • GitHub:https://github.com/pageonelab/agentrouter-dsh
  • AgentRouter 工具目录:https://www.agentrouter.to/tools?utm_source=dsh&utm_medium=plugin
  • AgentRouter 示例与文档:https://docs.agentrouter.to/examples?utm_source=dsh&utm_medium=plugin
  • DeepSeek Harness bundle 规范:https://github.com/deepseek-ai/deepseek-harness/blob/dsh-v0.2.2-rc.5/docs/user/develop/basic/publish.md
羽毛球分组比赛记分
小程序二维码

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

小夜