A supervisor is a deterministic routing function that picks the next agent based on state keys (“plan?”, “draft?”). Free-form peer chat (peer-to-peer) is great for debate but burns tokens re-asking the same questions. Supervisor gives you testable, type-safe control flow for sequential pipelines.
router reads state keys: missing “plan” -> planner; missing “draft” -> writer; missing “qa_pass” -> reviewer; else END.
Supervisor is a function, not an LLM call, so its routing is deterministic and unit-testable.
Peer-to-peer (GroupChat) is reserved for the rare cases where you need open-ended debate.
orchestrator -> planner -> writer -> reviewer -> END
(state keys drive each arrow)
Default to supervisor for sequential pipelines. Reach for peer chat only when open-ended debate is the goal.