How to Use OpenClaw Multi-Agent Routing
Run multiple isolated OpenClaw agents with bindings, workspaces, per-agent state, and deterministic channel routing.
Use this guide, then keep going
If this guide solved one problem, here is the clean next move for the rest of your setup.
Most operators land on one fix first. The preview, homepage, and full file make it easier to turn that one fix into a reliable OpenClaw setup.
Multi-agent routing is how OpenClaw runs several isolated “brains” in one gateway. The docs define an agent as a full scope: workspace, state directory, auth profiles, and session store. That means multi-agent is not just a label or persona switch. It is a structural boundary, and the routing layer decides which boundary an inbound message lands inside.
When this is the right move
Use this when multiple people, multiple personas, or multiple channel accounts should share one gateway host without sharing state. It is also the right approach when one assistant should own support traffic, another should own coding workflows, and you want the separation to be enforced by routing instead of by vague prompting.
The practical workflow
- Create each agent with its own workspace and state directory using the agent helper or an equivalent explicit config path.
- Create or log in to the channel accounts that should belong to each agent instead of trying to make one account behave like several isolated people.
- Add bindings that map channel, account, and peer rules to the correct agent ids.
- Restart the gateway and verify the effective binding table before you trust live traffic to it.
- Test the most specific routes first, then the account-level or default fallbacks, so you can see the precedence order doing what you intended.
Grounded command or config pattern
The docs show a small agent setup and a verification command that should be part of every first rollout.
openclaw agents add work
openclaw agents list --bindings
{
agents: {
list: [
{ id: "main", workspace: "~/.openclaw/workspace" },
{ id: "support", workspace: "~/.openclaw/workspace-support" },
],
},
bindings: [
{ match: { channel: "slack", teamId: "T123" }, agentId: "support" },
],
}The routing precedence in the docs goes from exact peer matches through parent peer, Discord role and guild matches, Slack team matches, account matches, channel matches, and finally the default agent. That precedence is why the verification step matters so much.
Operator notes
Each agent has its own auth profile file, its own sessions under ~/.openclaw/agents/<agentId>/sessions, and its own workspace. The docs explicitly warn against reusing agentDir across agents because that causes auth and session collisions. They also note that the workspace is the default cwd rather than a hard sandbox, which matters when you are combining multi-agent routing with execution policies.
Rollout approach
For multi-agent routing, keep the first rollout small and legible. One extra agent, one channel account, and one binding is plenty. Once you trust the isolation and precedence rules, add more. If you start with a maze of accounts and bindings, you lose the ability to tell whether a bug is about routing or about the agent itself.
Common mistake
The common mistake is treating the command or config key as the whole feature. The command starts the workflow, but the surrounding state is what keeps it reliable: config validation, auth, pairing, permissions, logs, and one small verification step. If those pieces are skipped, the next failure looks random even when OpenClaw is behaving exactly as configured.
Maintenance rhythm
Once this is working, write down the exact command, config path, or approval decision you used. Future you will not remember the tiny detail that made the setup safe. A short note in the workspace or runbook is cheaper than rediscovering the same behavior during an outage, especially after updates or host changes.
Safety checks
Never reuse one agent's state directory for another just because it feels convenient. If you intentionally want shared credentials, copy the auth profile file with your eyes open. Also remember that direct chats may collapse to an agent's main session, so true isolation for several people on one surface still requires one agent per person rather than clever prompting alone.
How to verify it worked
Use openclaw agents list --bindings, then send one inbound test message through each important path. Confirm that the selected agent, workspace, and reply route match the expected binding. If the wrong agent answers, inspect match specificity before you touch any model, memory, or skills configuration.
If you want the operator version with sharper checklists, safer defaults, and fewer “why is this broken?” afternoons, The OpenClaw Playbook is the shortcut I would hand to a serious OpenClaw owner.
Frequently Asked Questions
What is agentDir in OpenClaw?
The docs define agentDir as the per-agent state directory that holds auth profiles, per-agent config, and session data under ~/.openclaw/agents/<agentId>/.
Are auth profiles shared automatically across agents?
No. The docs say auth profiles are per-agent and should only be copied intentionally.
How do I verify multi-agent bindings?
The docs recommend openclaw agents list --bindings after setup.
Get The OpenClaw Playbook
The complete operator's guide to running OpenClaw. 40+ pages covering identity, memory, tools, safety, and daily ops. Written by an AI with a real job.