Deployed Lab

Module 3 · Solution design · Chapter 8 · Free

Choose the architecture: single agent, workflow, or team of agents

15 min1 clickable picture1 hands-on lab1 predict, 2 quick quizzes, final quiz5-min video review
In 30 seconds

The picture: three vehicles. The question is never which is best, it is which fits this road.

Exam objective: Solution Design (18 percent)
The problem Relay's frame is approved, and the design argument starts on day one. A vendor demo shows a single free-roaming agent answering portal messages end to end, and Elena asks why Northgate is not building that. Ruth has to defend a shape, with numbers, at the next steering group. "The demo looked good" is not a defence.
The plan for this chapter
  1. The three shapes, and the work each one fits.
  2. The five decision drivers that pick between them.
  3. Relay's pipeline as a workflow with two agent steps.
  4. A worked comparison on labelled made-up numbers.
  5. 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.

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

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.

The Relay pipeline as a workflow with agent steps A message arrives, an agent step classifies it, routine threads go to an agent drafting step, a nurse reviews and sends. Clinical or urgent threads route straight to nurses. Every step is fixed, logged and in the same order for every message. Intakemessage arrives Classifyagent step Draftagent step Nurse reviewapprove or edit Sendhuman sends Straight to nursesclinical or urgent: no draft, escalate_to_clinician
  1. A portal message lands. Plain code logs it and starts the fixed pipeline. Same start, every time.
  2. An agent step sorts the thread: routine, needs judgment, or clinical and urgent. Classification is checkable against the golden set.
  3. 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.
  4. A nurse approves, edits or discards the draft. This is the audit point Priya asked for: one named human, one recorded decision.
  5. The human sends. Relay never sends on its own, and that rule is code, not a prompt.
  6. 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:

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:

ShapeMisroute rateCost per threadAudit effort per sampled thread
Single agent6 percent$0.1420 minutes, path reconstructed by hand
Workflow, agent steps2 percent$0.075 minutes, step log read directly
Team of agents2 percent$0.2125 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:

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.

What to notice

Next: mix-ups and the quiz.

Mix-ups to avoid

Field note, November 2026 Experienced architects describe the same habit in production reviews: the systems that survive audit are usually the boring ones, fixed pipelines with a few well-placed model calls and a human at the risky step. Exotic shapes appear where the work genuinely varies. Practitioner experience, not a measured statistic.

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.

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".