Keep a Known Order in Ordinary Code
If the steps and transitions are known in advance, a pipeline gives more predictable cost, latency, and behavior than a free conversation of agents. The sequence "extract data, check the schema, build a draft, run the test, publish after approval" is a workflow: each substantive step can use the model, but the transitions, retries, and side effects stay in code.
- Normalize: schema and policy
- Generate: one bounded output
- Verify: code-based grader
- Approve: human or policy
- Commit: idempotent effect
Anthropic describes prompt chaining as decomposition into sequential calls with programmatic gates between them; OpenAI also recommends code orchestration when you need predictable speed, cost, and quality. In these cases adding a manager agent usually hurts explainability.
What should live outside the model is a short but fundamental list: validation of required fields and enums, rights checks and server-side authorization, retry policy, timeout, and idempotency key, budget calculation and rate limit, the decision on an irreversible side effect.
A practical criterion. If the next step is set by a status code, a boolean, or a finite enum, write a switch. The model is needed where the transition depends on the meaning of unstructured material, not on a reluctance to write a condition.
A known order stays in code. Where the input must be meaningfully classified, a router helps - but a narrow one.