docs/concepts/parallel-specialist-lanes.md
Parallel specialist lanes let one Gateway route different chats or rooms to different agents, while keeping the user experience fast. The trick is to treat parallelism as a scarce-resource design problem, not just as "more agents".
A specialist lane only improves throughput when it reduces contention for the real bottlenecks:
OpenClaw already serializes runs per session and caps global parallelism through the command queue. Specialist lanes add policy on top: which agent owns which work, what stays in chat, and what becomes background work.
Give every lane a written contract in its workspace and system prompt:
This is the cheapest phase and fixes most clogging: one coding job no longer turns the research lane into molasses, and each chat keeps its own context clean.
Tune queue and model capacity around the business value of each lane:
{
agents: {
defaults: {
maxConcurrent: 4,
subagents: { maxConcurrent: 8 },
},
},
messages: {
queue: {
mode: "collect",
debounceMs: 1000,
cap: 20,
drop: "summarize",
},
},
}
Use direct/personal chats and production-ops agents for high-priority work. Let research, drafting, and batch coding move to background tasks when the system is busy.
Add a small coordinator pattern once multiple lanes are active:
Do not start here. A coordinator without lane contracts just coordinates chaos.
# Lane contract
## Owns
- <job this lane is responsible for>
## Does not own
- <work to hand off>
## Chat budget
- Answer quick questions directly.
- For multi-step, slow, or tool-heavy work: acknowledge briefly, spawn/background
the work, then return the result when complete.
## Handoff
If another lane owns the request, reply with:
- target lane
- objective
- relevant context
- exact next action
## Tool posture
Use the smallest tool surface that can complete the task. Avoid broad shell or
network work unless this lane explicitly owns it.