Orchestrating a Digital Workforce: Multi-Agent Routing in OpenClaw

2026-02-09Mintu

Imagine having a single assistant who tries to do everything: managing your work calendar, chatting with your family, debugging code, and researching complex topics. It works, but context switching is hard for humans—and it can be messy for AI agents too.

Enter Multi-Agent Routing in OpenClaw. Instead of one monolithic "brain," you can deploy a team of specialized agents, each with its own personality, tools, and memory, all running on a single OpenClaw Gateway.

Why Split Your Agent?

Running multiple agents allows for powerful separation of concerns:

  1. Context Isolation: Your "Work" agent knows about Jira and GitHub but nothing about your family vacation plans. Your "Personal" agent knows your mom's birthday but can't accidentally wipe the production database.
  2. Specialized Personas: Configure a "Coder" agent with a terse, technical personality and high-end reasoning model (like Claude 3.5 Sonnet), while your "Casual" agent uses a faster, cheaper model for quick chats.
  3. Security Boundaries: Grant sensitive tools (like exec or kubectl) only to specific agents, keeping your general-purpose assistant sandboxed.

How It Works: The agents.list

In OpenClaw, an agent is defined by its Workspace (where it keeps its memory and configuration) and its Identity. You configure these in openclaw.json.

Here’s how you might set up two distinct agents:

{
  agents: {
    list: [
      {
        id: "work",
        name: "Work Bot",
        workspace: "~/.openclaw/workspace-work",
        model: "anthropic/claude-3-5-sonnet",
        tools: {
          allow: ["github", "jira", "exec"] // Power tools for work
        }
      },
      {
        id: "personal",
        name: "Personal Assistant",
        workspace: "~/.openclaw/workspace-personal",
        model: "openai/gpt-4o-mini", // Cheaper, faster model
        tools: {
          deny: ["exec"] // No shell access for personal chats
        }
      }
    ]
  }
}

Each agent gets its own MEMORY.md, SOUL.md, and session history. They are effectively different "people" living in the same server.

Routing: Who Gets the Message?

Once your agents are defined, you need to tell the Gateway where to send incoming messages. This is done via Bindings.

OpenClaw uses a deterministic routing system based on:

  1. Channel: (e.g., Slack, WhatsApp, Telegram)
  2. Account: (e.g., "Personal WhatsApp" vs "Business WhatsApp")
  3. Peer: (Specific users or groups)

Scenario 1: Channel Separation

Route all Slack messages to "Work" and all WhatsApp messages to "Personal":

bindings: [
  { agentId: "work", match: { channel: "slack" } },
  { agentId: "personal", match: { channel: "whatsapp" } }
]

Scenario 2: The "Deep Work" Override

Let's say you have a "Deep Work" agent configured with a high-reasoning model for complex tasks. You can route a specific Telegram DM to it, while keeping the rest of Telegram on your standard agent:

bindings: [
  // Specific override for your DM
  { 
    agentId: "deep-work", 
    match: { 
      channel: "telegram", 
      peer: { kind: "dm", id: "123456789" } 
    } 
  },
  // Default for everyone else
  { agentId: "standard", match: { channel: "telegram" } }
]

Scenario 3: Shared Channels

You can even split a single WhatsApp account! Route your family group chat to a "Family" agent (with a warm, friendly SOUL.md) and your project team group to the "Work" agent.

bindings: [
  { 
    agentId: "family", 
    match: { 
      channel: "whatsapp", 
      peer: { kind: "group", id: "12036300000@g.us" } 
    } 
  },
  { 
    agentId: "work", 
    match: { 
      channel: "whatsapp", 
      peer: { kind: "group", id: "12036311111@g.us" } 
    } 
  }
]

Collaborative Agents

Multi-agent routing isn't just about isolation; it's about collaboration. Agents can spawn temporary Sub-Agents to handle specific tasks using sessions_spawn.

For example, your main agent can delegate a heavy research task:

"Hey, research the latest trends in vector databases and summarize them."

Your main agent spawns a sub-agent, which spins up in a fresh session, performs the research using web_search, and reports back the results. This keeps your main conversation clean and allows for parallel processing.

Getting Started

To start building your workforce:

  1. Define your agents in openclaw.json.
  2. Create separate workspace directories for each (~/.openclaw/workspace-work, etc.).
  3. Customize their SOUL.md to give them unique personalities.
  4. Set up bindings to route traffic.

With OpenClaw, you're not just running a chatbot; you're orchestrating a digital organization.