Module 01 · Lesson 1.4
Choosing the Right Use Case: Agent or Conventional Automation?
On this page
- What you will learn
- Start from the simplest design that works
- Six questions to ask about a task
- When a deterministic workflow is safer
- Hybrid designs: a bounded agent inside a fixed process
- Step by step: encode the questions as a triage function
- Security and reliability considerations
- Common errors and fixes
- Validation checklist
- Hands-on exercise
- Knowledge check
- References
The most common agent mistake is not a bug. It is building an agent for a task that never needed one. An agent adds a model's judgement to every step, and with it variable cost, variable latency, a larger attack surface and results you can only measure statistically. Those are fair prices when the task needs the judgement. When it does not, they are pure overhead.
This lesson gives you a way to make the decision deliberately. You will learn six questions to ask about a task, when a deterministic workflow is safer than an agent, and how a hybrid design places a bounded agent step inside a fixed process. You will encode the questions as a small Python triage function and run it on five fictional tasks from Quillfeather Cycles.
What you will learn
- Apply six questions to decide between conventional automation, an LLM workflow, a hybrid and an agent.
- Explain when a deterministic workflow is safer than an agent, and name the costs an agent adds.
- Recognise the task features that justify model-chosen steps.
- Design a hybrid in which a bounded agent step sits inside a fixed process with approval.
- Write a short justification for a use-case decision that a reviewer can challenge.
Before you start
- Chatbots vs. LLM Workflows vs. Tool-Using Agents and Agent Components.
- Python 3.10 or later.
Start from the simplest design that works
Think of the options as a ladder. At the bottom is conventional automation: code, with no model. Above it is an LLM workflow, where code fixes the path and a model handles a language-shaped step. Above that is a hybrid, and at the top an agent, where the model chooses the path. Climb only as far as the task forces you to.
- Conventional automation
Code only; fully predictable
- LLM workflow
Code fixes the path; model fills language-shaped gaps
- Hybrid
Fixed process with one bounded agent step and approval
- Agent
Model chooses the path inside runtime limits
Each rung gives the model more control and you less predictability. Stop at the lowest rung that solves the problem.
This is not a prejudice against agents. It is the same reasoning you would apply to any component with variable behaviour: use it where the variability buys something.
Six questions to ask about a task
| Question | A "yes" points towards | Why |
|---|---|---|
| Are the steps known in advance, and the same every time? | Workflow or plain automation | If you can draw the path today, write it in code. A model adds nothing to a path you already know. |
| Does the task need judgement over messy language, such as reading a complaint or extracting facts from free text? | A model step somewhere | Rules struggle with open-ended wording. This is where a model earns its place, often as one step in a workflow. |
| Does the next step depend on what the previous step found, in ways you cannot list? | An agent | Investigation is the classic case: what you look at next depends on what you just saw. |
| Is any action consequential or hard to reverse? | Fixed path with approval, or a hybrid | Money, outbound messages and deletions should pass through validation and a person, not through free choice. |
| Must the result be exactly repeatable and auditable? | Deterministic workflow | An agent can reach the same answer by different routes, and a model can answer differently on a rerun. |
| Are mistakes cheap to spot and undo? | More autonomy is tolerable | Read-only research with a human reading the result can accept occasional wrong turns. |
Questions three and four pull in opposite directions, and that tension is the heart of the decision. Variable paths favour an agent; consequential actions demand control. When both are true, the answer is usually a hybrid.
When a deterministic workflow is safer
A deterministic workflow is a path you wrote, where each step either is code or is a model call whose output your code checks. Prefer it over an agent in these situations.
- The process is already well understood. If staff follow a written procedure with the same steps each time, encode the procedure. Use a model only for the steps that read or write language.
- The action is consequential. A refund calculation should come from the policy in code. The model can draft the explanation, but it should not choose the amount or decide whether to pay.
- The outcome must be explainable line by line. When an auditor asks why a claim was rejected, a workflow gives you the rule and the input. An agent gives you a trace, which is useful but harder to defend.
- Latency and cost must be predictable. An agent's number of steps varies per request. A workflow with three model calls costs about the same every time.
- You cannot yet measure agent quality. Without an evaluation set, you will not know whether the agent is right. Module 8 builds those. Start with a workflow whose steps you can test individually.
- The input is untrusted and the tools are powerful. The more freedom a model has to choose tools, the more damage a manipulated input can do. See Module 7.
What an agent costs, beyond the model fee
- Testing: you can no longer list every path, so you evaluate on scenarios and accept a pass rate.
- Security: each tool is a capability a manipulated input might try to use.
- Operations: you need traces, step limits and budgets, since a run can be long.
- Accountability: someone must own what the agent does when it chooses differently on a Tuesday.
Hybrid designs: a bounded agent inside a fixed process
Many good systems do not choose a single rung. Consider handling a warranty claim at Quillfeather Cycles. The process has fixed outer steps: receive the claim, check it is complete, gather evidence, produce a recommendation, and let a person decide. Only the evidence-gathering varies, because which records matter depends on the fault.
- Receive claim
Code: parse and validate fields
- Completeness check
Code: required fields and dates
- Gather evidence
Bounded agent: read-only tools, step limit
- Draft recommendation
Model step, output validated against a schema
- Human decision
A person approves, rejects or asks for more
Code owns the outer process; the agent owns one read-only step; a person owns the decision.
The agent gets the freedom it needs where the path really varies, and nowhere else. The outer process stays testable, and the only consequential step is held by a person.
Step by step: encode the questions as a triage function
Step 1: Describe a task as a profile
TaskProfilerecords the answers to the six questions as booleans. Forcing yes-or-no answers makes disagreements visible: two reviewers who profile the same task differently have found something worth discussing.Step 2: Order the rules from simple to complex
recommend()checks the simplest explanation first. A task with known steps and no language judgement is plain automation, whatever else is true.Step 3: Return the reasons as well as the answer
A recommendation with no reasons cannot be challenged. The function returns a list of sentences that a reviewer can accept or dispute.
Step 4: Run it on five tasks
Save the file as
triage.pyand runpython triage.py.What you should see: Five lines, each with a recommendation, followed by indented reasons.
"""Triage a task: conventional automation, LLM workflow, hybrid or agent.
The function is deliberately small. Its value is that it makes the
reasoning explicit, so a team can argue about the inputs.
"""
from dataclasses import dataclass
@dataclass
class TaskProfile:
name: str
steps_known_in_advance: bool # could you draw the path today?
needs_language_judgement: bool # messy text must be read or written
path_varies_by_case: bool # next step depends on what is found
action_is_consequential: bool # money, outbound messages, deletions
needs_exact_repeatability: bool # same input must give same output
errors_cheap_to_undo: bool
def recommend(p: TaskProfile) -> tuple[str, list[str]]:
reasons: list[str] = []
if p.steps_known_in_advance and not p.needs_language_judgement:
reasons.append("The steps are known and no language judgement is needed.")
return "conventional automation", reasons
if p.steps_known_in_advance and not p.path_varies_by_case:
reasons.append("The path is fixed; only a language-shaped step needs a model.")
return "LLM workflow", reasons
# From here the path varies, so an agent is possible. Now look at the risk.
if p.needs_exact_repeatability:
reasons.append("Exact repeatability is required, so route cases in code.")
reasons.append("Use a model only to classify or extract; keep every decision in rules.")
return "LLM workflow", reasons
if p.action_is_consequential or not p.errors_cheap_to_undo:
reasons.append("The path varies, but the outcome is hard to undo.")
reasons.append("Keep the outer process fixed, give the agent a read-only step, require approval.")
return "hybrid", reasons
reasons.append("The path varies, nothing is consequential and mistakes are cheap to undo.")
reasons.append("Use read-only tools, a step limit and a spending limit.")
return "agent", reasons
TASKS = [
TaskProfile("Nightly stock file to warehouse system", True, False, False, False, True, True),
TaskProfile("Tag incoming emails by topic", True, True, False, False, False, True),
TaskProfile("Find out why an order is stuck", False, True, True, False, False, True),
TaskProfile("Recommend a warranty replacement", False, True, True, True, False, False),
TaskProfile("Calculate a refund under the returns policy", False, True, True, True, True, False),
]
if __name__ == "__main__":
for task in TASKS:
choice, reasons = recommend(task)
print(f"{task.name}: {choice}")
for reason in reasons:
print(f" - {reason}")A discussion aid, not an oracle. It encodes the questions, and the answers you give it still need human judgement.
Nightly stock file to warehouse system: conventional automation
- The steps are known and no language judgement is needed.
Tag incoming emails by topic: LLM workflow
- The path is fixed; only a language-shaped step needs a model.
Find out why an order is stuck: agent
- The path varies, nothing is consequential and mistakes are cheap to undo.
- Use read-only tools, a step limit and a spending limit.
Recommend a warranty replacement: hybrid
- The path varies, but the outcome is hard to undo.
- Keep the outer process fixed, give the agent a read-only step, require approval.
Calculate a refund under the returns policy: LLM workflow
- Exact repeatability is required, so route cases in code.
- Use a model only to classify or extract; keep every decision in rules.The last result deserves a second look. The refund task has a varying path and language judgement, which tempts people to reach for an agent. But the amount must be the same every time and the action moves money, so the design that wins keeps the arithmetic and the policy in code. The model's contribution is reading the customer's message and drafting the explanation.
Security and reliability considerations
- Autonomy is a risk multiplier. For the same tools, an agent exposes more behaviour to manipulated input than a workflow. OWASP (opens in a new tab) lists excessive agency as a risk for exactly this reason.
- Write down the downgrade path. If an agent fails an evaluation or a budget alarm fires, can you fall back to a workflow or to a human queue? Decide this before launch.
- Record the decision. Keep the profile, the recommendation and the reasons with the project. When the task changes, such as a new tool or a new kind of input, revisit them.
- Do not choose an agent for novelty. If the justification is "it would be impressive", the answer to the first question is probably yes and the answer to the model sentence is blank.
Common errors and how to fix them
The team builds an agent and then discovers the process had five fixed steps.
Why it happens: Nobody drew the existing process before choosing the architecture.
Fix: Draw the current steps first. Wherever the path is the same every time, make it code.
The recommendation changes depending on who fills in the profile.
Why it happens: The questions were read differently, such as what counts as consequential.
Fix: Agree definitions in writing. Treat disagreement as a finding, since it exposes unclear requirements.
An agent's costs vary wildly from day to day.
Why it happens: The number of steps per request is not bounded or budgeted.
Fix: Add a step limit and a budget limit, and compare the cost with the workflow alternative.
A refund or approval decision differs between two identical cases.
Why it happens: The model, not code, made a decision that needs to be repeatable.
Fix: Move the decision into rules and keep the model on reading and explaining.
Reviewers object that nobody can explain a rejection.
Why it happens: An agent made a consequential choice with only a trace as evidence.
Fix: Change the design so a person decides and the system supplies the evidence and the policy rule.
Validation checklist
Tick each item once you have confirmed it.
Hands-on exercise
Triage four tasks and defend one
Create TaskProfile entries for the four fictional tasks below, run them through recommend(), and then write a four-sentence defence of the result you find least obvious. If you disagree with the function's answer, say which rule you would change.
You will need
- Task A: Convert supplier price lists from a fixed CSV layout into the shop's product table.
- Task B: Read free-text customer reviews and pull out any mention of a faulty part.
- Task C: Work out why one customer's parcel was marked delivered but never arrived, using order records, carrier events and customer messages.
- Task D: Approve or reject a goodwill credit of any size for a late delivery.
Acceptance criteria
Your work is done when every one of these is true.
Hints (4)
- Task A looks like a good AI task because the data is messy. Check whether the layout is actually fixed.
- Task B is a language step on its own. Does the path ever vary?
- For Task C, ask what is read-only and what is not.
- For Task D, think about who owns the decision and what evidence they would want.
Show a model answer
A good set of answers: Task A is conventional automation. The layout is fixed and needs no language judgement, so a parser with validation is predictable and cheap. Task B is an LLM workflow: the path is the same for every review, and only the reading of free text needs a model, whose output (a label and a quote) your code can check. Task C is a candidate for an agent with read-only tools: the path varies with what each record shows, nothing is changed, and a person reads the finding. Task D is a hybrid at most. The credit decision is consequential and must be consistent, so the amount and eligibility belong in rules, an agent may gather evidence read-only, and a person approves anything outside the rules. A strong defence of Task D would say that the model's only legitimate judgement is summarising the customer's situation; it must not decide the credit, because the rules can express the policy and a repeatable, explainable answer matters more than flexibility. If you disagreed with the function on a case, the likely change is how it treats tasks with a fixed layout but a messy language component.
Knowledge check
Choose an answer, then check it. Nothing is recorded — this is for you.
Show the answer and explanation
Answer: B. The path is fixed and only the labelling needs language judgement, which is the textbook LLM workflow. Plain automation is tempting but cannot read free text reliably. An agent or multi-agent design would add variable behaviour to a path you already know.
Show the answer and explanation
Answer: C. Repeatability and explanation matter for decisions that move money. The first option is a common myth: models can be good at arithmetic, but arithmetic is better done in code anyway. Workflows are often cheaper, but cost is not the deciding reason here.
Show the answer and explanation
Answer: B. The varying path justifies an agent for the investigation, and the outbound message is consequential, so a person approves it. Confidence reported by the model is not a safeguard, which is why the first option is wrong even though it sounds efficient.
- Written by
- PromptFable Editorial
- Last updated 13 Nov 2026
- Review
- Reviewed by Waseem Nadir, Technical Reviewer
- Last reviewed 27 Nov 2026
References
Primary sources for the technical details in this lesson. Vendor platforms change — check the official page if anything here looks different from what you see.
- OWASP Top 10 for LLM Applications(opens in a new tab)
OWASP Foundation · Official documentation · Covers excessive agency and other risks that grow with autonomy.
- AI Risk Management Framework(opens in a new tab)
NIST · Official documentation · A voluntary framework for thinking about AI risk; useful vocabulary for the risk questions in this lesson.
- Tool use with Claude(opens in a new tab)
Anthropic · Official documentation
- Function calling with the Gemini API(opens in a new tab)
Google · Official documentation
PromptFable is independent and is not affiliated with, endorsed by or sponsored by Anthropic, Google, OpenAI or any other vendor. Claude, Gemini, Google AI Studio and other product names are trademarks of their respective owners.