Agents are powerful, but not always needed
Agents impress, and there is a temptation to make "an agent" for everything. But an agent is more complex, costlier, less predictable and riskier than an ordinary LLM call. Often a task is solved more simply ā with one call or a fixed chain of steps. Understanding when an agent is justified and when overkill is an important engineering decision.
When an agent is overkill
- A simple one-off task: one LLM call solves it ā no agent needed.
- A predictable fixed flow: if the steps are known in advance and always the same, it is simpler to spell them out explicitly (ordinary code + LLM calls) than to let an agent "decide".
- Where full predictability matters: an agent is by nature less predictable.
When an agent is justified
- A multi-step task: solving it needs a sequence of actions.
- The path is unknown in advance: which steps are needed depends on intermediate results.
- Tools and decisions needed: get data, perform actions, adapt.
- Dynamism: the task requires reacting to what is discovered along the way.
Start simple
A key principle: start with the simplest solution that works. Does one call handle it ā use it. Are the steps fixed ā spell out the chain explicitly (it is more predictable and reliable). Build an agent only when the task genuinely requires a dynamic multi-step solution with tools. "An agent for the agents sake" is trendy but often overkill, costlier and riskier than needed. Do not overcomplicate unnecessarily.
The cost of autonomy
Remember the cost of being an agent: complexity (harder to build and debug), unpredictability (the agent decides the steps), cost (many LLM calls in the cycle), risk (autonomous actions with tools). These downsides are justified when the task genuinely benefits from autonomy, and unjustified when it does not. A conscious choice of "agent or simpler" saves a mass of problems.
Rule: an agent is justified for multi-step dynamic tasks with tools where the path is unknown in advance. For the simple and predictable ā use one call or an explicit chain. Start simple.
š§ When is it better NOT to make an agent?