One agent, a workflow, or a team? Price all three before you argue

Relay's frame was approved, and the design argument started on day one. A vendor demo showed a single free-roaming agent answering portal messages end to end, and Elena, the sponsor, asked the obvious question: why is Northgate not building that?

The demo agent looked brilliant on the routine threads. But nobody could say what it did on the two clinical threads, or reconstruct the path it took. Priya, the security lead, asked the audit question: for any reply, can you show exactly which steps ran, on what data, in what order? The demo could not. Ruth had to defend a shape, with numbers, at the next steering group. "The demo looked good" is not a defence.

This is what most AI architecture debates actually are: not which shape is best, but which shape fits this work, on numbers you can show. Three shapes, five drivers, one page that settles it.

Three shapes, three kinds of work

A single agent with tools is one loop, one context, and a few tools. It wins when the work varies a lot and each run is short and low risk. A deterministic workflow with agent steps is fixed steps in a fixed order, some plain code, some agent calls. It wins when the work follows a known path and each step's output can be checked. A team of agents with a coordinator splits work across specialist subagents and merges the results. It wins when the work is broad, parallel, and too varied for one context.

Five drivers make the call

Pick by five drivers, not by fashion. Variability: does every case follow the same path, or does each run invent its own? High variability pushes toward agents, low toward workflows. Auditability: must you replay exactly what happened? Fixed steps log cleanly; a free-roaming agent's path must be reconstructed. Latency: each agent step costs time, and a coordinator plus subagents is the slowest. Cost: more agents and loops mean more tokens per task. Blast radius: 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.

Relay, drawn as a workflow

Relay lands as a workflow with agent steps, because triage is checkable work and a human sends. Plain code logs each message and starts the fixed pipeline. An agent step sorts the thread: routine, needs judgment, or clinical and urgent. For routine threads only, a second agent step drafts a reply. A nurse approves, edits, or discards it, 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 and route straight to nurses.

The two agent steps are still probabilistic, so their outputs get checked, by the labelled set before go-live and by nurses after. A workflow cannot improvise for a weird thread; weird threads escalate to humans. That is the design working, not failing.

The three shapes, priced

Here is the comparison Ruth took to the steering group: three shapes for Relay triage at pilot scale, 18,000 messages a month, all figures made-up estimates.

The single agent: 6 percent misroute rate, $0.14 per thread, 20 minutes of audit effort per sampled thread, its path reconstructed by hand. The workflow with agent steps: 2 percent, $0.07, 5 minutes, the step log read directly. The team: 2 percent, $0.21, 25 minutes, several agent traces merged.

The target was at most $0.09 per drafted message, and that number votes. At 18,000 messages a month, the single agent costs $2,520, the workflow $1,260, the team $3,780. Only the workflow is under target. The team matches the workflow on misroutes, so its extra $2,520 a month buys nothing. The single agent is dearer and wrong three times as often. On audit, the workflow costs a quarter of the single agent's 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 argument, in one table.

The case that breaks the pattern

The lesson is not "workflows win". The drivers, applied honestly, give different answers for different work. Northgate's second build, Chartwise, drafts visit-note summaries from long transcripts for clinician editing. The inputs are long and messy, the work splits naturally into pulling problems, pulling medications, drafting the note, and checking consistency, and each section can be checked on its own. That profile, varied parallel work with separately checkable parts, is where a coordinator with subagents earns its cost. Ruth still starts Chartwise smaller, but the drivers point the other way.

Write the record while the losers are still in the room

The lab is ADR-1, Relay's architecture decision record: context, decision, alternatives, consequences. The alternatives section is the defence: anyone can state a decision, the record shows what it beat and why. Made-up estimates are labelled inside it, so a later reader knows which numbers to re-measure.

The 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 record while the losing options are still in the room. The systems that survive audit are usually the boring ones: fixed pipelines, a few well-placed model calls, a human at the risky step. Exotic shapes appear where the work genuinely varies.

So the next time someone shows you a demo and asks why you are not building that, do not argue about the demo. Price all three shapes on the same work and let the table answer.

The full interactive chapter is free at https://deployedlab.dev/lessons/ccap-08-choose-the-architecture, with the hands-on lab where you write ADR-1 for Relay. There are 79 chapters free with no signup across the bundle, and the full bundle is $5 a month or $39 a year at https://deployedlab.dev.