CONCEPT The three tiers
Before you design how an agent works, decide whether you need one. There are three tiers of increasing power, cost, and unpredictability. The architect's job is to pick the lowest tier that solves the problem — the exam consistently rewards this restraint.
| Tier | What it is | Who controls the flow | Use when |
|---|---|---|---|
| Single LLM call | One request → one response | N/A — no loop | Classification, summarization, extraction, Q&A |
| Workflow | Multiple steps wired together in your code, LLM calls at fixed points | You (deterministic code) | Multi-step but the steps are known in advance |
| Agent | A loop where the model decides the next action (which tool, when to stop) | The model (dynamic) | Open-ended, hard-to-pre-script tasks needing tools |
DIAGRAM Choosing the tier
enough? (classify, summarize, extract)"} Q1 -->|Yes| T1["🟢 Single LLM call
cheapest · most predictable"] Q1 -->|No| Q2{"Are the steps
known in advance?"} Q2 -->|Yes| T2["🔵 Workflow
you orchestrate in code"] Q2 -->|No| Q3{"Does it need tools &
model-driven decisions?"} Q3 -->|Yes| T3["🟣 Agent
model drives the loop"] Q3 -->|No| T2 classDef a fill:#d4edda,stroke:#28a745,color:#155724; classDef b fill:#d1ecf1,stroke:#17a2b8,color:#0c5460; classDef c fill:#e2d4f0,stroke:#764ba2,color:#3d1a5b; class T1 a; class T2 b; class T3 c;
CONCEPT The 4-question agent gate
Anthropic's guidance: only reach for the agent tier when all four hold. Any "no" → drop to a workflow or a single call.
| Check | Question | If "no"… |
|---|---|---|
| Complexity | Is the task multi-step and hard to fully specify up front? | A workflow or single call is simpler and cheaper. |
| Value | Does the outcome justify higher cost & latency? | Not worth an agent's overhead. |
| Viability | Is Claude actually capable at this task type? | No amount of looping fixes a capability gap. |
| Cost of error | Can mistakes be caught & recovered (tests, review, rollback)? | Too risky to let a model drive autonomously. |
CODE The same task at each tier
"Extract the invoice total from this text" — as a single call, then "answer a support question that may need a lookup" as a workflow vs. an agent.
Tier 1 — single call (no loop)
# One request, one response. No tools, no loop. Cheapest & most predictable. resp = client.messages.create( model="claude-opus-4-8", max_tokens=256, messages=[{"role": "user", "content": f"Extract the invoice total as JSON: {text}"}], )
Tier 2 — workflow (your code decides the steps)
# YOU control the order. The LLM is called at fixed points you chose. docs = retrieve(query) # step 1: your code ranked = rerank(docs, query) # step 2: your code answer = client.messages.create( # step 3: one LLM call with context model="claude-opus-4-8", max_tokens=1024, messages=[{"role":"user","content": prompt(query, ranked)}], )
Tier 3 — agent (the model decides the next action)
# The MODEL drives: it decides whether to look something up, then answers. messages = [{"role":"user","content": question}] while True: resp = client.messages.create(model="claude-opus-4-8", max_tokens=4096, tools=TOOLS, messages=messages) if resp.stop_reason == "end_turn": break # model decided it's done messages.append({"role":"assistant","content": resp.content}) # ...run the tool the MODEL chose, append tool_result, loop (see 1.3)
TRADE-OFFS Why not always use an agent?
✅ Agent gains
- Handles open-ended tasks you can't fully script
- Adapts step-by-step to what it finds
- Composes tools dynamically
⚠️ Agent costs
- More tokens & latency (multiple round-trips)
- Less predictable — harder to test & guarantee
- Bigger blast radius on error; needs guardrails
EXAM TRAPS
PRACTICE
Q1 · A client needs to classify 100k support emails/day into 5 categories, cheaply. Which tier?
Single LLM call (batch it, likely on Haiku). It's one-step and high-volume — an agent would add cost and latency for zero benefit. Reserve agents for tasks that can't be pre-scripted.
Q2 · "Turn a design doc into a working PR" — agent or workflow, and why?
Agent. The steps (which files to read, what to edit, how to fix test failures) can't be fully specified in advance and require tool use + model-driven decisions — it passes all four gate checks (complex, valuable, viable, recoverable via tests/review).
Q3 · Your "agent" always runs retrieve → rerank → answer in that fixed order. Is it an agent?
No — that's a workflow. Your code fixes the control flow. It only becomes an agent if the model itself decides whether/when to retrieve. Naming it "agent" doesn't change the architecture.