When should you not use an agent?
You'll be able to decide when a plain model call or a fixed workflow beats an agent.
In plain English
An agent is a model that picks its own next steps, calls tools, and loops until it reaches a goal. That freedom costs time, money, and predictability. Many tasks do not need it, and a simpler design works better.
Why it matters
Agents add latency, cost, and failure modes. Each loop turn is another model call, and each tool call is another place for something to go wrong. Builders who reach for an agent by default often ship slower, pay more, and get harder-to-debug results than they would with a single prompt or a scripted pipeline.
How it works
Start by asking whether the steps are known in advance. If you can write the sequence on a whiteboard, you can usually code it as a workflow: fixed steps, with a model call at each step where judgment is needed. Classify, extract, summarize, and translate are examples. The code controls the order, and the model fills in content.
The case for an agent is open-ended work where the number and order of steps depend on what the model discovers along the way. Debugging a codebase, researching a question across unknown sources, and handling a support ticket that may need several systems are examples. Here the model decides which tool to call next based on the last result.
A useful test is to ask what goes wrong if the model takes a wrong step. If a mistake is cheap and easy to undo, an agent is reasonable. If a mistake sends money, deletes data, or emails a customer, a fixed workflow with human approval at key points is safer.
Also consider cost and speed. A loop may make ten model calls where a workflow makes two. If users wait on the result, that delay matters. If the task runs in the background, it may not.
A concrete example
A fixed workflow for ticket triage. The code sets the order, and the model only classifies. No loop, no tool choice.
def triage_ticket(text, call_model):
# Step 1: model classifies the ticket
category = call_model(
"Classify this ticket as billing, bug, or other. "
"Reply with one word.\n\n" + text
).strip().lower()
# Step 2: code decides routing, not the model
routes = {"billing": "finance-queue", "bug": "eng-queue"}
queue = routes.get(category, "general-queue")
return {"category": category, "queue": queue}A short sketch to show the idea. Check the official docs of the tool you use.
What goes wrong
- Using an agent for a known sequence Write the steps down first. If the order never changes, code it as a workflow and call the model only where judgment is needed.
- Giving an agent write access too early Start with read-only tools. Add actions that change data only after you have tested the agent and added approval steps.
- Ignoring cost and latency per loop Measure how many model calls a typical run makes. Multiply by per-call cost and expected wait time before you commit to the design.
- Skipping a non-agent baseline Build the simplest version first, a single call or a short pipeline. Compare its results with the agent before adding complexity.
Going deeper
Study workflow patterns such as prompt chaining, routing, and parallelization. Then learn how to evaluate agent runs so you can tell whether the extra loop actually improves results on your tasks.
FAQ
Is an agent always more capable than a workflow?
No. An agent can handle more varied inputs, but it is less predictable. A workflow is often more reliable for a narrow, repeated task.
How do I know if my task is open-ended?
If you cannot list the steps in advance, or the right next step depends on what earlier steps return, the task is open-ended.
Can I combine a workflow and an agent?
Yes. A common design uses fixed steps for most of the process and lets one step run a small agent for the part that needs exploration.
What should I measure before choosing?
Measure accuracy on real examples, cost per task, latency, and how often a wrong step causes real harm. Compare the simple and agent versions on the same set.
Written with AI by CapyLaunch. Spotted a mistake? Email hello@capylaunch.com.