Architecture
At scale, orchestration moves from in-process function calls to distributed systems: message queues (Kafka, SQS) between agents, DAG runners (Temporal, Airflow) for workflow state, and service meshes for routing and retry. The orchestrator becomes a lightweight router that reads task state from a store and dispatches to the right agent service. This decouples scaling: you can run 10 coder agents and 2 reviewer agents independently.
Pattern
Queue: decouple agents
DAG runner: workflow state
Router: dispatch by task state
// Scale agents independently
Key insight: Production orchestration is a distributed systems problem — use battle-tested infra, not custom loops.