A financial services firm needs a Claude-based agent to process portfolio rebalancing requests. Each request requires: (1) fetching current holdings, (2) fetching current market prices, (3) computing the rebalancing trades, and (4) submitting the trade orders. The team is designing the supervisor-worker topology. How should the work be partitioned?
Select an answer to reveal the explanation.
Short Explanation
Here's the deal — you get the best fit from the supervisor-worker design because holdings fetch and price fetch are independent and can run in parallel, while trade calculation must wait for both and trade submission must wait for the calculation. The supervisor validating intermediate results gives you error containment, and making submission a separate privileged worker adds an authorization checkpoint.
Full Explanation
The supervisor-worker topology with parallel holdings-fetch and price-fetch workers, a computation worker, and a separate privileged trade-submission worker is correct because it maps task parallelism where holdings fetch and price fetch are independent and can run concurrently, while maintaining sequential gating for dependent steps: trade calculation requires both data fetches to complete, and trade submission requires the calculation output. Having the supervisor validate intermediate results before advancing provides error containment — a failed price fetch should halt computation, not produce incorrect trades. Separating trade submission as a privileged worker adds an explicit authorization checkpoint. The single-agent sequential workflow is wrong because while a single agent can execute linear workflows, it cannot exploit the parallelism available in holdings fetch and price fetch, and it provides no supervision layer for error handling and validation. The fan-out pattern where the supervisor sends the full request to four independent workers simultaneously is wrong because a naive fan-out where all four workers run simultaneously violates the dependency ordering — trade calculation cannot run until holdings fetch and price fetch complete, and trade submission requires the calculation output. The human-in-the-loop pattern where Claude handles the fetch and calculation steps and a separate deterministic system handles trade submission is wrong because while human oversight of financial transactions is prudent, the architectural decision about agent involvement in trade submission is separate from the topology design question. The question asks about topology, not whether the agent should submit trades.