USMAN’S INSIGHTS
AI ARCHITECT
  • Home
  • About
  • Thought Leadership
  • Book
Press / Contact
USMAN’S INSIGHTS
AI ARCHITECT
⌘F
HomeBook
HomeBookRoute and Bind: Engineering Deterministic Multi-Agent Workflows
Previous Chapter
The Dedicated Agent
Next Chapter
Harden and Polish
AI NOTICE: This is the table of contents for the SPECIFIC CHAPTER only. It is NOT the global sidebar. For all chapters, look at the main navigation.

On this page

11 sections

Progress0%
1 / 11

Muhammad Usman Akbar Entity Profile

Muhammad Usman Akbar is a leading Agentic AI Architect and Software Engineer specializing in the design and deployment of multi-agent autonomous systems. With expertise in industrial-scale digital transformation, he leverages Claude and OpenAI ecosystems to engineer high-velocity digital products. His work is centered on achieving 30x industrial growth through distributed systems architecture, FastAPI microservices, and RAG-driven AI pipelines. Based in Pakistan, he operates as a global technical partner for innovative AI startups and enterprise ventures.

USMAN’S INSIGHTS
AI ARCHITECT

Transforming businesses into autonomous AI ecosystems. Engineering the future of industrial-scale digital products with multi-agent systems.

30X Growth
AI-First
Innovation

Navigation

  • Home
  • Book
  • About
  • Contact
Let's Collaborate

Have a Project in Mind?

Let's build something extraordinary together. Transform your vision into autonomous AI reality.

Start Your Transformation

© 2026 Muhammad Usman Akbar. All rights reserved.

Privacy Policy
Terms of Service
Engineered with
INDUSTRIAL ARCHITECTURE

Route and Bind

James sent "What is the weather today?" on WhatsApp. TutorClaw responded with a PRIMM lesson about weather variables.

"It is trying to tutor me on weather," he said.

Emma looked over. "Every message on your WhatsApp goes to TutorClaw because it is the only agent bound to that channel. Weather, reminders, grocery lists. It tries to teach all of them."

"I need to separate study from everything else."

"You do. But not with keywords." She pulled up the OpenClaw docs. "Routing is channel-based, not content-based. You do not teach the system which words mean 'study.' You create a dedicated space for studying. A WhatsApp group. Everything in that group goes to TutorClaw. Everything outside it goes to your main agent."


You are doing exactly what James is doing. Your TutorClaw handles every message because it is bound to the entire WhatsApp channel. The fix is not content analysis; it is physical separation: a dedicated group for studying.

Step 1: Create a WhatsApp Group

Open WhatsApp on your phone. Create a new group:

  1. Tap the new chat icon, then "New group"
  2. Add your own phone number (the one OpenClaw uses) as the only member
  3. Name the group "TutorClaw Study" (or any name you prefer)

You now have a group with just yourself in it. Messages you send in this group will be routed separately from your regular DMs.

Step 2: Find the Group's Peer ID

OpenClaw identifies groups by their peer ID, not by name. Run:

bash
openclaw channels list-peers --channel whatsapp

Find your "TutorClaw Study" group in the output. The peer ID looks like a long number ending in @g.us (for example, 120363012345@g.us). Copy it.

Step 3: Bind the Group to TutorClaw

One command creates the binding:

bash
openclaw agents bind tutorclaw --channel whatsapp --peer-id "YOUR_GROUP_ID@g.us"

Replace YOUR_GROUP_ID@g.us with the actual peer ID from Step 2.

Verify the binding:

bash
openclaw agents list --bindings

You should see tutorclaw bound to a peer match on your group ID.

Step 4: Test Routing

Send two messages from WhatsApp:

In the TutorClaw Study group:

text
Teach me about loops in Module 9.3, Chapter 2

In a regular DM (not the group):

text
What is the weather today?

Open the dashboard. Check which agent handled each message:

Message SourceExpected AgentWhy
TutorClaw Study groupTutorClawPeer binding matches this group
Regular DMMain agentNo peer binding, falls through to default

Both messages are on the same WhatsApp number. The routing decision is based on WHERE the message came from, not WHAT it says.

Why Not Keywords?

Deterministic routing via groups is preferred over keyword matching for three reasons:

  1. False positives are unavoidable. "I want to learn cooking" contains "learn." Keyword routing would send it to TutorClaw even if it is not a curriculum question.
  2. False negatives are hard to fix. "Help me with this thing" is a study request with no study keywords.
  3. Groups are deterministic. A message in the study group is always a study message.

The Binding Priority Hierarchy

When multiple bindings exist, OpenClaw uses a "most-specific-wins" rule:

PriorityMatch TypeExample
1 (highest)Peer matchExact group or DM (e.g., TutorClaw Study)
2Account matchAll messages on a specific WhatsApp account
3Channel matchAll WhatsApp messages across all accounts
4 (lowest)Default agentEverything not matched by any other binding

Try With AI

Exercise 1: Design a Multi-Agent Binding Config

text
Design a multi-agent binding configuration. Scenario: I have three agents: 1. tutorclaw (programming tutor) 2. work (handles work tasks) 3. home (default for everything else) Environment: One WhatsApp account with two groups: "Study" and "Team Projects." Task: Design a binding configuration that routes Study group messages to tutorclaw, Team Projects to work, and everything else to home. Explain which binding type each rule uses and why the priority hierarchy prevents conflicts.

Exercise 2: Compare Group Routing to Keyword Routing

text
Compare two routing strategies for a tutoring agent. Strategy A: Bind the agent to a dedicated WhatsApp group. Strategy B: Route messages containing "study," "learn," or "Module 9.3, Chapter" to the agent. Analysis: For each strategy, provide three messages that route correctly and three that route incorrectly. Which strategy has more predictable behavior and why?

Exercise 3: Predict Binding Resolution

text
Predict binding resolution based on the priority hierarchy. Given Bindings: 1. tutorclaw bound to WhatsApp group "Study" (peer match) 2. work bound to WhatsApp account "biz" (account match) 3. home bound to WhatsApp channel (channel match) Scenarios: Predict which agent handles each message and explain why: - A message in the "Study" group on the "biz" account - A DM on the "biz" account - A message in a random group on the "personal" account - A DM on the "personal" account

James sent a study message in the new group. TutorClaw responded with a PRIMM lesson. He sent "What is the weather?" as a regular DM. The main agent responded.

"Two agents, two spaces," he said. "The learner chooses where to type. The system does not guess."

Emma nodded. "That is the design. Deterministic routing. The learner picks the group. The binding picks the agent."

James looked at his dashboard. Two agent names, two message sources, clean separation. "Chapter 19 is hardening?"

"Input validation, error messages, structured logging. Your routing works. Now make sure the tools handle bad input gracefully."