Can I run multiple bots/agents?
Yes. OpenClaw is built with Multi-Agent Routing at its core, allowing a single gateway to host multiple isolated personas.
You do not need separate servers for separate bots. A typical best-practice setup involves one always-on Gateway host (like a VPS or Mac mini) running multiple isolated agents.
Each agent (defined by an agentId) is a fully isolated "brain" with its own:
- Workspace: Separate files, `AGENTS.md`, and memory scripts.
- Auth Profiles: Distinct API keys and model preferences.
- Session Store: Completely separate chat history and state.
How Routing Works
Inbound messages are routed to agents using bindings. You can direct traffic based on:
- Channel: Route all Telegram messages to Agent A and WhatsApp to Agent B.
- Account: If you have multiple WhatsApp accounts connected, route "Personal" to Agent A and "Business" to Agent B.
- Peer (Sender): Route a specific VIP user or group chat to a dedicated "High Priority" agent.
Example Configuration
// ~/.openclaw/openclaw.json
{
agents: {
list: [
{ id: "chat", workspace: "~/.openclaw/workspace-chat" },
{ id: "coder", workspace: "~/.openclaw/workspace-coder" }
]
},
bindings: [
// Route WhatsApp to the casual chat agent
{ agentId: "chat", match: { channel: "whatsapp" } },
// Route Telegram to the specialized coding agent
{ agentId: "coder", match: { channel: "telegram" } }
]
}Sub-Agents & Teams
Beyond routing, you can orchestrate teams of agents. A main "Coordinator" agent can spawn sub-agents to handle specific tasks in parallel (e.g., "Research this topic" or "Write code for this module").
This allows for complex workflows where specialized agents (using different models like Claude Opus for coding vs. Haiku for speed) collaborate on a single objective tailored to their strengths.