Multi-Agent Routing
Multi-Agent Routing lets one gateway host more than one Agent while keeping workspaces, auth profiles, sessions, model defaults, and policies separate. Bindings route inbound messages to Agents. After routing, Sessions and Tasks own the work context. For the broader ownership model, see Agents, Sessions, And Tasks.What one Agent owns
An Agent is a scoped worker identity with its own:- workspace files
agentDir- auth profiles
- session store
- model choices
- skill and tool policy
- wallet policy
- route/task permissions
| Item | Default |
|---|---|
| Config | ~/.fased/fased.json |
| State dir | ~/.fased |
| Main workspace | ~/.fased/workspace |
| Agent dir | ~/.fased/agents/<agentId>/agent |
| Sessions | ~/.fased/agents/<agentId>/sessions |
agentDir across Agents. It causes auth and session state to
collide.
Quick start
Create Agents interactively:Routing rules
Bindings are deterministic. More specific matches win:- exact peer
- parent peer or thread inheritance
- Discord role/guild match
- team/workspace match
- account-scoped channel binding
- all-account channel binding (
accountId: "*") - default Agent
- omitting
accountIdmatches only the channel’s default account accountId: "*"matches all accounts for that channel- explicit account bindings are clearer for multi-account setups
Common patterns
One account per Agent
Use this when each Agent has a separate bot, phone number, or workspace account.One channel, specific peer to another Agent
Use a peer binding above the channel fallback.Group Agent with stricter policy
Bind a group to a dedicated Agent and narrow tools for that Agent.Multi-account channels
Channels that support multiple accounts useaccountId.
Example:
accountId to the intended Agent.
Auth and skills
Auth profiles are per-Agent. Main Agent credentials are not shared automatically. If you intentionally want another Agent to use the same provider auth, copy or configure the profile for that Agent. Skills can be per-Agent through the workspaceskills/ directory, or shared
from ~/.fased/skills when the Agent’s skill policy allows them.
Models and sessions
Each Agent can override the default model and fallback list. If an Agent does not set a model, it inheritsagents.defaults.model.
Session keys include the Agent id, for example agent:coding:main or
agent:coding:discord:channel:123. That keeps transcripts and run history tied
to the routed Agent instead of the delivery channel alone.
Sandboxing and tools
Per-Agent sandbox and tool restrictions can narrow what an Agent can do. Important boundaries:- workspace is the default cwd, not a hard sandbox by itself
- absolute paths can still reach host locations unless sandboxing/policy blocks them
tools.elevatedis global and sender-based- use
agents.list[].toolsfor per-Agent tool allow/deny
Guardrails
- Keep Agent ids stable.
- Keep one
agentDirper Agent. - Route channels/accounts explicitly.
- Avoid hidden fan-out to all Agents.
- Keep group Agents narrower than private Agents.
- Do not assume a Channel owns the work; it only routes and delivers.