Supervisor-Worker Architecture
In this article
- Explain how a supervisor differs from one agent that splits its own work, and what the supervisor owns.
- Set a fan-out cap, a deadline and one retry for delegated tasks, and show a missing result as missing.
- Merge worker results with provenance and settle two conflicting claims with a fixed rule.
- Say who may perform the one write after the merge, and why workers only read.
- Terms defined here: supervisor-worker, delegated task, result aggregation.
Overview
Some questions split cleanly into parts that do not depend on each other. You could ask three helpers at once and get the answer sooner. Then two of them disagree, one never answers, and somebody still has to decide what to tell the customer and whether to move money.
Here the setting is Brightline, a made-up home-internet provider whose website support assistant can look up orders, refund at most $50 and pass a case to a person. A customer writes that the router stopped working and that this month's $35 plan fee was charged twice. You will design the agent that splits this case into small tasks with clear limits, gives them a budget, merges what comes back with its sources, settles a disagreement by a fixed rule and then makes the one refund decision itself.
Sign in to keep reading
The rest of this article opens with an account. An account also keeps your progress and quiz results on every device, and lets you follow news for up to five topics.
Still to read in this article
- Separate agents, one owner
- Three tasks, one budget
- The merged record
- Settling the conflict
- Why workers only read
- The supervisor at work
- Common mistakes
- In production
- Sources
- Check yourself, 13 questions