
When an AI Agent Is the Wrong Answer

AI agents are powerful, but they're also over-prescribed. Before you add one to your system, it's worth asking whether the problem actually needs one.
The Default Has Shifted Toward Agents
Somewhere in the last eighteen months, "add an agent" became the default response to any automation problem. Product teams reach for LangChain or AutoGen before they've written a single decision tree. The assumption is that if a task involves language or reasoning, it needs an agent.
That assumption is wrong often enough to be worth examining seriously.
An AI agent, in the architectural sense, is a system that perceives some input, reasons about it, selects from a set of tools or actions, and acts. The key property is that the action sequence is not predetermined. The agent decides at runtime what to do next. That's genuinely useful in some contexts. It's expensive, fragile, and unnecessary in many others.
What Does "Expensive and Fragile" Actually Mean Here?
The cost is not just API spend, though that adds up. GPT-4o-class inference on a multi-step agentic loop costs roughly 10 to 50 times more per task than a single-call pipeline doing the same job deterministically. For high-volume workflows, that's a real budget line.
The fragility is the harder problem. Agents fail in ways that are difficult to predict and test. A traditional system throws an exception you can catch. An agent confidently takes the wrong branch, calls the wrong tool, or gets stuck in a loop, and none of that is visible until something downstream breaks. Evals help, but agentic evals are significantly harder to write than unit tests. You're testing behaviour across a state space that's much larger than any fixed pipeline.
There's also latency. A five-step agentic loop with one LLM call per step adds three to eight seconds to a user-facing interaction, depending on model and infrastructure. That's often unacceptable.
When the reasoning overhead is unnecessary
If your task has a known decision structure, you don't need an agent to figure it out at runtime. A document classifier that routes invoices to one of four processing queues doesn't benefit from a reasoning loop. A fine-tuned BERT-class model or a zero-shot classification call to an LLM with a fixed prompt does the job at a fraction of the cost and with deterministic output you can actually test.
The same applies to extraction tasks. If you're pulling structured fields from a consistent document format, a well-engineered prompt with output validation (using Pydantic or JSON Schema enforcement) is more reliable than an agent with tool access. You know what you want. Just ask for it directly.
Is Your Problem Actually Underspecified?
This is the real test. Agents are the right tool when the task is genuinely underspecified at design time. That means you cannot enumerate the valid action sequences in advance, because they depend on information you only have at runtime.
Examples where this is true:
- A research assistant that needs to decide which databases to query based on the content of a question it hasn't seen yet
- A code debugging agent that needs to read a stack trace, inspect relevant files, run a test, read the output, and iterate
- A customer support agent handling edge cases that don't fit any predefined category, with access to CRM data, order history, and a knowledge base
Examples where it sounds true but isn't:
- A lead qualification flow that asks five questions in sequence (use a state machine)
- A data pipeline that transforms JSON from one schema to another (use a function)
- A chatbot that answers questions from a fixed document corpus (use retrieval-augmented generation with a single LLM call, not an agent loop)
The distinction matters because teams regularly build agents for the second category and then spend months debugging reliability issues that wouldn't exist in a simpler architecture.
/// Not sure where to start?
Get the architecture before you commit
Tell us what you're building and we'll map the technical approach, stack, and rough timeline. No cost, no obligation, no sales call required.
What Should You Build Instead?
The alternatives are not glamorous, but they work.
| Problem type | Better approach |
|---|---|
| Fixed decision logic | Rule engine or decision tree (Drools, custom) |
| Document classification | Fine-tuned classifier or zero-shot LLM call |
| Structured extraction | Prompted LLM with schema enforcement (Instructor, Outlines) |
| Multi-step workflow with known steps | Directed acyclic graph pipeline (Prefect, Airflow, custom) |
| Q&A over a document corpus | RAG with a single LLM call per query |
| Conditional branching based on user input | Finite state machine with LLM at classification nodes only |
The pattern in the right column is: use LLMs for what they're good at (language understanding, generation, classification) and use deterministic code for everything else. Keep the non-deterministic surface area as small as possible.
This is not an argument against ever using agents. It's an argument for being precise about where the boundary is.
When an Agent Actually Earns Its Complexity
There are genuine use cases. An agent is worth the overhead when all of the following are true:
- The action space cannot be enumerated at design time
- Errors are recoverable and the agent can self-correct
- Latency requirements allow for multiple round-trips
- You have the eval infrastructure to catch regressions
That last point is non-negotiable. Running agents in production without systematic evals is how you get silent failures at scale. Frameworks like RAGAS, LangSmith, and custom eval harnesses are not optional extras; they're part of the architecture.
If you're building an agent for internal use where a human reviews every output before it acts, the bar is lower. If the agent is taking actions autonomously, in production, at volume, the engineering investment required is substantially higher than most teams anticipate.
The orchestration layer matters more than the model
One underappreciated factor: the reliability of an agentic system depends more on how you design the orchestration and tool interfaces than on which model you use. A well-structured tool schema, explicit error handling per tool call, and a clear prompt structure for action selection will outperform a more capable model in a poorly designed loop. GPT-4o in a badly designed agent loses to GPT-4o-mini in a well-designed one.
Conclusion
Before you add an agent, write out the decision sequence for the task. If you can write it out, you probably don't need an agent. Build the simpler thing first. If you hit a genuine wall where the sequence can't be determined without runtime reasoning, then add the agent, with evals in place from day one.
If you're at the point of making that call and want a second opinion on the architecture, that's a conversation worth having.
FAQ
Is an LLM-powered chatbot the same as an AI agent? Not necessarily. A chatbot that retrieves documents and generates a single response is not an agent in the architectural sense. An agent decides what actions to take at runtime, potentially across multiple steps and tools. Many chatbots don't need agent architecture and are more reliable without it.
What's the cheapest way to add AI to an existing workflow without building an agent? Identify the single decision or generation step that would add the most value, then call an LLM for that step only. A single, well-prompted API call with schema-validated output is faster to build, cheaper to run, and easier to test than any agentic loop.
When does agentic architecture genuinely make sense? When the task requires the system to decide which tools to use based on information it only has at runtime, and when the step sequence cannot be determined in advance. Research tasks, open-ended debugging, and complex multi-system orchestration are the clearest examples.
How do you test an AI agent reliably? You need a dataset of representative inputs with expected outcomes, plus automated checks on tool call sequences and final outputs. Frameworks like RAGAS and LangSmith help. Expect to invest significantly more time in evals than in the initial build.
Does using a more capable model make an agent more reliable? Partially. A stronger model makes better decisions within a step, but reliability depends heavily on the overall architecture: tool schema quality, error handling, prompt structure, and how the agent recovers from failed tool calls. Model choice is one lever, not the only one.
Have a project in mind? Contact Sodio Technologies to discuss your requirements and explore the right technology solution for your business.
/// Work with us
Talk to the engineers who'd build it
You'll get a technical scope, timeline and cost estimate from the people doing the work, not an account manager. In-house team, no subcontracting, since 2016.
