Module 3 · Solution design · Chapter 8 · Free
Choose the architecture: single agent, workflow, or team of agents
- Three shapes: a single agent with tools, a deterministic workflow with agent steps, a team of agents with a coordinator.
- Pick by variability, auditability, latency, cost and blast radius, not by fashion.
- Relay lands as a workflow with agent steps, because triage is checkable work and a human sends.
The picture: three vehicles. The question is never which is best, it is which fits this road.
- Compare single agent, workflow and multi-agent shapes for a given problem.
- Justify the choice with decision drivers: variability, auditability, latency, cost, blast radius.
- Record the decision and the rejected alternatives in an architecture decision record.
- Reuse Foundations patterns for loops, coordinators and decomposition instead of reinventing them.
- The demo agent looks brilliant on routine threads. Nobody in the room can say what it did on the two clinical threads in the sample, or reconstruct the path it took.
- Priya asks the audit question: for any reply, can you show exactly which steps ran, on what data, in what order? The demo cannot.
- The three shapes, and the work each one fits.
- The five decision drivers that pick between them.
- Relay's pipeline as a workflow with two agent steps.
- A worked comparison on labelled made-up numbers.
- The lab: write ADR-1, Relay's architecture decision record.
Next: meet the three shapes.
Step 1: Three shapes, three kinds of work
Think of a kitchen. One cook doing everything is flexible but hard to supervise. An assembly line is boring and completely inspectable. A team of chefs with a head chef handles a banquet, at banquet prices.
- Single agent with tools. One loop, one context, tools like
get_patient_summaryanddraft_reply. Wins when the work varies a lot and each run is short and low risk. - Deterministic workflow with agent steps. Fixed steps in a fixed order. Some steps are plain code, some are agent calls. Wins when the work follows a known path and each step's output can be checked.
- Team of agents with a coordinator. A coordinator splits work across specialist subagents and merges results. Wins when the work is broad, parallel and too varied for one context.
The underlying patterns come from Foundations: coordinator and subagents and task decomposition. This chapter is about choosing between them at engagement level, not relearning how they work.
Next: the drivers that make the call.
Step 2: Five decision drivers
- Variability of the work. Does every case follow the same path, or does each run invent its own? High variability pushes toward agents, low variability toward workflows.
- Auditability. Must you replay exactly what happened? Fixed workflow steps log cleanly. A free-roaming agent's path must be reconstructed after the fact.
- Latency. Each agent step costs time. A coordinator plus subagents is the slowest shape, a single short loop the fastest.
- Cost. More agents and more loops mean more tokens per task. Relay's target is at most $0.09 per drafted message, and that number votes.
- Blast radius when wrong. What breaks if one run goes bad? Contained steps with a human gate keep it small. An autonomous agent with send rights makes it large.
No shape wins all five. The exam, like the steering group, wants the tradeoff named, not a winner declared in the abstract.
Next: Relay's pipeline, drawn.
Step 3: Relay as a workflow with agent steps
Press Next to walk the Relay pipeline. Two steps are agent steps, highlighted as AI. The rest is plain, inspectable code.
- A portal message lands. Plain code logs it and starts the fixed pipeline. Same start, every time.
- An agent step sorts the thread: routine, needs judgment, or clinical and urgent. Classification is checkable against the golden set.
- For routine threads only, a second agent step drafts a reply using Relay's MCP tools. Its output is text a nurse can read and judge.
- A nurse approves, edits or discards the draft. This is the audit point Priya asked for: one named human, one recorded decision.
- The human sends. Relay never sends on its own, and that rule is code, not a prompt.
- Clinical or urgent threads skip drafting entirely and route straight to nurses via escalate_to_clinician. The workflow shape makes the lane structural, not a hope.
Where the picture breaks down:
- The pipeline is fixed, but the two agent steps are still probabilistic. That is why their outputs get checked, by the golden set before go-live and by nurses after.
- A workflow cannot improvise a new path for a weird thread. Weird threads escalate to humans, which is the design working, not failing.
Next: the three shapes, priced.
Step 4: The worked comparison
Only the workflow, at a made-up $0.07 per thread. The single agent estimates $0.14 and the team $0.21, both over target before accuracy or audit effort is even considered.
Worked example. Three shapes for Relay triage at pilot scale (18,000 messages a month). All figures in this table are made up for the course, labelled as estimates:
| Shape | Misroute rate | Cost per thread | Audit effort per sampled thread |
|---|---|---|---|
| Single agent | 6 percent | $0.14 | 20 minutes, path reconstructed by hand |
| Workflow, agent steps | 2 percent | $0.07 | 5 minutes, step log read directly |
| Team of agents | 2 percent | $0.21 | 25 minutes, several agent traces to merge |
Cost check against the $0.09 target: single agent, 18,000 x $0.14 = $2,520 a month. Workflow, 18,000 x $0.07 = $1,260. Team, 18,000 x $0.21 = $3,780. Only the workflow is under $0.09 per thread.
Accuracy check: the team matches the workflow on misroutes, so its extra $2,520 a month buys nothing here. The single agent is both dearer and wrong three times as often.
Audit check: Priya's team samples threads monthly. At 5 minutes a thread the workflow costs a quarter of the single agent's audit effort, and the log is the pipeline itself.
The middle shape wins on cost, audit and blast radius, and ties on accuracy. That is the ADR-1 argument.
Next: the contrasting case.
Step 5: Chartwise, the case that breaks the pattern
Chartwise, Northgate's second build, drafts visit-note summaries from long transcripts for clinician editing. Same client, different shape pressure:
- Inputs are long and messy, and the useful work splits naturally: pull problems, pull medications, draft the note, check consistency.
- There is no fixed message pipeline to copy, and each section can be checked on its own before merging.
That profile, varied parallel work with separately checkable parts, is where a coordinator with subagents earns its cost, per the Foundations pattern in Chapter 4 of Foundations. Ruth still starts Chartwise smaller, but the drivers point the other way, and the ADR for Chartwise will say so.
The lesson is not "workflows win". It is that the drivers, applied honestly, give different answers for different work, and the record shows which driver decided it.
Next: the lab. You record the decision.
Hands-on lab: ADR-1, the architecture decision record
Part A: build it locally
Lab: Relay's frame is approved, and Elena is asking why Northgate is not building the vendor's single free-roaming agent. This lab runs in your browser and needs JavaScript enabled.
- The alternatives section is the defence. Anyone can state a decision; the ADR shows what it beat and why.
- Made-up estimates are labelled inside the record itself, so a later reader knows which numbers to re-measure.
Next: mix-ups and the quiz.
Mix-ups to avoid
- "More agents means more capable." More agents means more cost, more latency and more traces to audit. Capability you cannot check is a liability.
- "A workflow cannot use AI." Relay's workflow has two agent steps. Deterministic refers to the path, not the steps.
- "Pick the shape once, for the whole client." Relay and Chartwise sit in the same engagement and point different ways. Shape follows the work.
- "The ADR is paperwork after the decision." The ADR is the decision, written while the alternatives and numbers are still fresh.
- "Lowest cost wins." Cost is one of five drivers. The single agent was not the cheapest here, but even a cheaper shape loses if its blast radius is wrong.
Chapter quiz
Five questions in the exam's style. Score 70% or more to finish.
Review this chapter in 5 minutes
Watch the whole chapter recapped: single agent vs workflow vs agent team, the five decision drivers, Relay's priced comparison, and ADR-1.
- Three shapes: single agent, workflow with agent steps, team with a coordinator.
- Five drivers: variability, auditability, latency, cost, blast radius.
- Relay: workflow with classify and draft agent steps. Human reviews, human sends.
- Numbers (made up): $0.07 vs $0.14 vs $0.21 per thread against a $0.09 target. Only the workflow fits.
- Chartwise: long, varied, parallel work points toward a coordinator and subagents.
- Artifact: ADR-1 records the decision, the alternatives and the revisit trigger.
Decision rule: run the five drivers on the actual work, pick the cheapest shape that keeps the blast radius acceptable and the audit trail readable, and write the ADR while the losing options are still in the room.
Independent exam preparation. Not affiliated with or endorsed by Anthropic.
Review
Glossary
- Single agent
- One loop with tools deciding its own path. Example: a short research helper.
- Workflow with agent steps
- A fixed pipeline where some steps are agent calls. Example: Relay's classify then draft.
- Team of agents
- A coordinator splitting work across subagents and merging results. Example: Chartwise section drafters.
- Blast radius
- How much damage one bad run can do. Example: drafts a nurse must approve keep it small.
- Auditability
- How exactly you can replay what a system did. Example: Relay's step log per thread.
- ADR
- Architecture decision record: context, decision, alternatives, consequences. Example: ADR-1 in the lab.
Next: "Design for cost and latency: set the budgets before the features".