Route channels to different agents
Route channels to different agents
Section titled “Route channels to different agents”Outcome: Two named agents (for example
supportandcoder) live inside one Gormes gateway; each Telegram or Slack channel routes to the right agent.Prerequisites: A working multi-channel gateway (see run a multi-channel gateway).
-
List configured agents and bindings
Terminal window gormes config showThe
agentsandbindingssections show what is configured now. Unbound channels route to the default agent. -
Edit
config.tomlTerminal window gormes config editAdd at least one agent definition and one binding. Example:
[[agents.list]]id = "support"name = "Support"workspace = "/home/alice/support"model = "gpt-4o"[[agents.list]]id = "coder"name = "Coder"workspace = "/home/alice/projects"model = "claude-sonnet-4-20250514"[[bindings]]agent_id = "coder"[bindings.match]channel = "telegram"account_id = "coding-bot"account_idis the channel-side identifier (Telegram bot username, Slack app id, etc.). Unmatched messages fall through to the default agent. -
Validate the config
Terminal window gormes config checkEmpty bindings or missing agent ids are reported here, before runtime.
-
Apply without restart
Terminal window gormes gateway reloadAgent definitions and bindings are reload-safe.
Verify
Section titled “Verify”gormes gateway statusgormes config showExpected: config show shows the new agent ids; gateway status shows each channel mapped to the bound agent. Send a message to each channel — the reply should reflect the bound agent’s workspace and model.
Troubleshooting
Section titled “Troubleshooting”- All messages still hit the default agent → The binding
matchblock did not match. Confirmchannelandaccount_idagainst the values shown ingormes gateway status. agent_idrejected at config check → The id inbindingsmust match anagents.listentry’sid.gormes setup bindingserrors withsetup_requires_tty→ The guided wizard needs an interactive TTY. Hand-editconfig.tomlinstead (step 2 above).