When should you not use an agent?
Answer
Do not use an agent when:
The task is deterministic. If the steps are known in advance and do not depend on intermediate results, write the code. A script is cheaper, faster, and correct every time. Wrapping a fixed sequence in an agent adds cost and nondeterminism for nothing.
One model call is enough. Classification, extraction, summarisation of provided text. No loop needed, so no agent needed.
Errors are costly and hard to verify. Agents fail in ways that look like success. If a wrong result is expensive and you cannot cheaply check correctness, the risk is poor. Financial transactions and irreversible operations are the obvious cases.
Latency matters. Every loop iteration is a model round trip. A task needing eight iterations takes many seconds at best. That is unacceptable in an interactive path.
The context does not fit and cannot be decomposed. If a task genuinely requires holding more information than the window allows, and there is no clean way to split it, an agent will thrash.
The useful framing is that an agent buys you adaptability at the price of predictability, cost, and latency. If you do not need the adaptability, do not pay for it.
Common wrong answer
"Never use an agent for anything important." Too broad. Agents are used in production for real work. The point is matching the tool to the task and building verification around it, not avoiding them.
The opposite error is equally common in interviews: proposing an agent for something a for loop and a regex would solve.
Likely follow-ups
- How would you decide between a workflow and an agent?
- What makes a task well suited to an agent?