Support custom channel assistant IDs via lead_agent (#1500)

* Support custom channel assistant IDs via lead agent

* Normalize custom channel agent names
This commit is contained in:
DanielWalnut
2026-03-28 19:07:38 +08:00
committed by GitHub
parent 520c0352b5
commit 18e3487888
5 changed files with 99 additions and 12 deletions

View File

@@ -304,7 +304,7 @@ channels:
# Optional: global session defaults for all mobile channels
session:
assistant_id: lead_agent
assistant_id: lead_agent # or a custom agent name; custom agents are routed via lead_agent + agent_name
config:
recursion_limit: 100
context:
@@ -330,12 +330,12 @@ channels:
# Optional: per-channel / per-user session settings
session:
assistant_id: mobile_agent
assistant_id: mobile-agent # custom agent names are also supported here
context:
thinking_enabled: false
users:
"123456789":
assistant_id: vip_agent
assistant_id: vip-agent
config:
recursion_limit: 150
context:
@@ -343,6 +343,10 @@ channels:
subagent_enabled: true
```
Notes:
- `assistant_id: lead_agent` calls the default LangGraph assistant directly.
- If `assistant_id` is set to a custom agent name, DeerFlow still routes through `lead_agent` and injects that value as `agent_name`, so the custom agent's SOUL/config takes effect for IM channels.
Set the corresponding API keys in your `.env` file:
```bash