How multiple AI agents
to collaborate
in production
Multi-agent orchestration on the OpenClaw Gateway: coordinator and worker agents, queues, retries, state passing — with approvals and audit per agent, not a single autonomous operator.
direct answer
What is multi-agent
orchestration?
Short answer: Coordinating multiple specialized AI agents on a single OpenClaw Gateway — a coordinator routes tasks to workers via queues, with state passing, retries, approvals and RBAC per agent.
Nuance: Orchestration is not an autonomous company — it is job routing with governance. The Gateway remains a single control plane; workers are tool-scoped executors.
workflows · Monitoring · Hub
Consideration
Why use multiple agents
Not because “more agents = smarter” — but for scope, parallelism, and governance per task type.
Division of tasks
Mail triage ≠ browser CRM ≠ monitoring — a single agent with all the tools is difficult to govern; specialized workers with narrow scopes.
Browser workers
Long-term DOM steps separate from fast coordinator plans — see Browser automation.
Monitoring agents
Read-only health/log agents without mutating tools — lower approval noise.
Mailbox agents
Separate channel + credentials; coordinator delegates only classified tasks.
Retrieval / search
Retrieve context before decision — worker with read-only retrieval, coordinator chooses next step.
Latency & scaling
Parallel workers with queue — but only useful with observability; otherwise, debugging hell.
Patterns
Coordinator vs. worker agents
Practical production model — not an academic agent theory.
Coordinator agent
Schedules, routes, and aggregates — calls few mutating tools itself. Maintains state of workflow step and waits for worker results.
Worker agents
Execute one task type (browser, shell, mail send) with a limited tool allowlist. No “second coordinator” without explicit policy.
queues
Jobs between coordinator and workers: depth, age, dead-letter. Pending queue ≠ approval queue — both monitor via logs.
Retries
Exponential backoff + max attempts; no unlimited retry on mutating browser/shell.
Escalation
After N failures → human or senior ops; no automatic escalation to an agent with more tools.
State / context passing
Minimal payloads between agents — no full mailbox dump in every worker context (VRAM/latency). Version state IDs.
queues
Queues, retries & failures
Stuck queues
Worker crashed, job remains pending — coordinator waits forever. Timeout + death letter required.
Retry storms
Same mutating job 50× — duplicate emails, duplicate CRM writes. Rate limit per job-id.
Runaway orchestration
Agents trigger each other without terminal state — max hops per workflow run.
Duplicate actions
Two workers same submit — idempotency keys on mutating steps.
Failed browser workers
Stale session; coordinator keeps retry — isolate browser worker pool.
Orphaned jobs
Coordinator restart, in-memory state gone — persistent queue store needed.
governance
Orchestration &
approvals
Short answer: Each worker retains their own tool policies — coordinator approval does not cover worker mutating actions.
- → Approvals per agent: Worker with mail-send tool has its own approval scope — not “coordinator approved so worker free”.
- → RBAC per roll: The coordinator may not spawn all workers; operators only see their own queue.
- → Audit trails: Correlation ID over coordinator → worker → tool; essential in case of an incident.
- → Escalation chains: L1 support worker → ops worker → human; documented chain, no cyclic escalation.
- → Isolated workers: Separate container/user per worker type where possible — docker compose networks.
- → Browser isolation: No shared admin profile between browser workers.
In case of failure: mens or read-only diagnose-worker — not automatically worker with shell + browser + mail.
Incidents
When orchestration goes wrong
Agents trigger each other endlessly
Scenario: Coordinator sends to worker A; A's output triggers coordinator again without terminal guard.
Mitigation: max orchestration depth; dupe on job fingerprint.
Browser worker freezes
Scenario: DOM timeout; coordinator retry storm on same URL.
Mitigation: circuit breaker; handoff to human.
Duplicate workflows
Scenario: Two coordinators on the same ticket — duplicate customer reply.
Mitigation: idempotency key on ticket id; single active run lock.
Escalation loop
Scenario: Worker fails → escalate to worker B → B triggers A again.
Mitigation: acyclic escalation graph.
Context mismatch / stale state
Scenario: Worker reads old CRM snapshot; coordinator thinks step-by-step.
Mitigation: state version + TTL; refresh before mutating step.
Approval deadlock
Scenario: Worker awaits approval; coordinator awaits worker — queue appears frozen.
Mitigation: timeouts on approval; metrics on queue age — <a href="https://ploko.nl/en/ai-oplossingen/ai-agents/openclaw/approvals/">approvals</a>.
Production
Orchestration
checklist
Workflow hardening: workflows define before you scale up to multi-agent.
Scope
When multi-agent is overkill
Short answer: Start with one well-governed agent; orchestration is operational debt you earn.
Simple workflows
One read-only email triage agent + one approval on send suffices — no coordinator/worker split.
Small team
No 24/7 operations to monitor queues — multi-agent increases operational overhead.
Limited infrastructure
One VPS, one Gateway — parallel workers fight for GPU/CPU; see Local Models limits.
Debug complexity
Incident without correlation ID across 4 agents is a nightmare — start simple, only split when pain is measurable.
Short answer: Multiple specialized AI agents on a single OpenClaw Gateway whose tasks are routed via a coordinator, with queues, state passing, and shared governance — not a single “super-agent”.
Nuance: orchestration layer = routing + retrievals + observability; agents = tool-bound workers.
Follow-up: workflows
Short answer: Narrower blast radius, better RBAC per task type, parallel latency — counter price: complexity and queue failure modes.
Cause of choice: One agent with all the tools does not scale governance.
Follow-up: Agent Tools
Short answer: Agent that plans, delegates, and aggregates — minimal mutating tools, waits for worker results.
Nuance: coordinator ≠ human operator; the human is involved in approvals/escalation.
Advice: max hops, logging per delegation.
Short answer: Decouple coordinator and workers in time — buffer during load, retry, and failures.
Cause without queue: Synchronous blocking → timeouts look like “AI broken”.
Follow-up: Monitoring
Short answer: max orchestration depth, retry caps, idempotency keys, circuit breakers on browser workers, anti-loop between agents.
Cause: mutual trigger without terminal state.
Follow-up: problems
Short answer: Small team, single workflow, no queue observability — start with one agent + clear workflow.
Signal: Incidents unsolvable without “who did what” in logs.
Advice: Split only at measured bottleneck.
Orchestration
Orchestration audits &
workflow hardening
We review coordinator/worker splits, queue policies, retry limits, correlation logging, and per-agent approvals — deployment architecture for teams that market multi-agent not as an autonomous business, but as managed infrastructure.