fix: align deerflow runner with deerflow 2.0 (#7500)

* fix: align deerflow runner with deerflow 2.0

* fix: address deerflow review feedback
This commit is contained in:
エイカク
2026-04-13 12:47:27 +09:00
committed by GitHub
parent 35ce281cbe
commit 533a0bde6a
10 changed files with 464 additions and 33 deletions
+8 -4
View File
@@ -2,6 +2,8 @@
在 v4.19.2 及之后,AstrBot 支持接入 [DeerFlow](https://github.com/bytedance/deer-flow) Agent Runner。
当前适配面向 DeerFlow **2.0 `main` 分支**。DeerFlow 官方已将原始 Deep Research 框架迁移到 `main-1.x` 分支持续维护,因此如果你使用的是 2.0,请以 `main` 分支文档和后端 API 为准。
## 预备工作:部署 DeerFlow
如果你还没有部署 DeerFlow,请先参考 DeerFlow 官方文档完成安装和启动:
@@ -25,12 +27,12 @@
- `API Base URL`:DeerFlow API 网关地址,默认为 `http://127.0.0.1:2026`
- `DeerFlow API Key`:可选。若你的 DeerFlow 网关使用 Bearer 鉴权,可在此填写
- `Authorization Header`:可选。自定义 Authorization 请求头,优先级高于 `DeerFlow API Key`
- `Assistant ID`:对应 LangGraph 的 `assistant_id`,默认为 `lead_agent`
- `Assistant ID`:对应 DeerFlow 2.0 LangGraph 的 `assistant_id`,默认为 `lead_agent`
- `模型名称覆盖`:可选。覆盖 DeerFlow 默认模型
- `启用思考模式`:是否启用 DeerFlow 的思考模式
- `启用计划模式`:对应 DeerFlow 的 `is_plan_mode`
- `启用子智能体`:对应 DeerFlow 的 `subagent_enabled`
- `子智能体最大并发数`:对应 `max_concurrent_subagents`,仅在启用子智能体时生效,默认 `3`
- `启用计划模式`:对应 DeerFlow 2.0 运行时 `config.configurable.is_plan_mode`
- `启用子智能体`:对应 DeerFlow 2.0 运行时 `config.configurable.subagent_enabled`
- `子智能体最大并发数`:对应 DeerFlow 2.0 运行时 `config.configurable.max_concurrent_subagents`,仅在启用子智能体时生效,默认 `3`
- `递归深度上限`:对应 LangGraph 的 `recursion_limit`,默认 `1000`
填写完成后点击「保存」。
@@ -38,6 +40,7 @@
> [!TIP]
> - 如果 DeerFlow 侧已经配置了默认模型,可以将 `模型名称覆盖` 留空。
> - 只有在 DeerFlow 侧已经启用了相应能力时,才建议开启 `计划模式` 或 `子智能体` 相关选项。
> - AstrBot 会同时发送 DeerFlow 2.0 推荐的 `config.configurable` 运行时参数,并保留兼容字段,便于对接上游近期版本。
## 选择 Agent 执行器
@@ -51,3 +54,4 @@
- `API Base URL` 是否能从 AstrBot 所在环境访问
- 鉴权配置是否填写正确
- `Assistant ID` 是否与 DeerFlow 中实际可用的 assistant 一致
- 如果通过 `/reset`、`/new`、`/del` 重置 DeerFlow 会话,AstrBot 会尝试同步清理 DeerFlow 远端 thread;若 DeerFlow 网关不可达,则只会清理 AstrBot 本地会话标识