AI Agents
Before you build an AI agent, try a workflow
· 3 min read · Excodia Labs
Most jobs pitched as agents run better as a fixed sequence of steps, with a model in one or two of them. Here is how we decide what a product actually needs.
"We want an agent" has become a common way to open an AI conversation. What the founder usually wants is an outcome: the invoice gets processed, the lead gets a reply, the weekly report gets written. An agent is one way to get there. It is rarely the cheapest or the most reliable one.
In June 2025, Gartner predicted that over 40% of agentic AI projects will be canceled by the end of 2027, pointing to rising costs, unclear business value and weak risk controls. The same release said many use cases sold as agentic do not need an agent at all. Most of these projects go wrong the same way: a model gets too much freedom for a job that has a known shape.
Workflow or agent?
A workflow is a sequence you define. Read the email, pull out the order number, look it up, draft a reply, send it to a person to approve. The model handles one or two steps and your code handles the rest. An agent picks its own steps and tools, loops, and stops when it decides it is done.
The distinction comes from Anthropic's guide to building effective agents, and it is the most useful line we know for scoping AI work.
Use a workflow when
- You can draw the steps on a whiteboard.
- The same input should always lead to the same kind of output.
- A mistake costs money or trust: payments, legal text, medical or financial guidance.
- You need to explain afterwards why something happened.
Consider an agent when
- The path really does change from case to case, as in research across many sources or debugging.
- A person reviews the result before it has any effect.
- A slow or wrong run is cheap to retry.
- You already built the workflow and keep adding branches to it.
Cost and reliability are design work
Agents loop, and loops are hard to budget. The same task can take three tool calls one day and thirty the next. Before an agent goes live we set hard limits: a maximum number of steps, a token budget per run, a timeout, and a clean handover to a person when any limit is hit. Every step is logged, so when something goes wrong we can replay it instead of guessing.
A fair test for an agent in production: it handles the routine cases alone, hands the strange ones to a person cleanly, and costs less to run than the work it replaces.
A simple order of work
- Build the workflow first, with the model in the one step that needs judgment.
- Write evals for that step.
- Watch where the workflow breaks. If the breaks come from steps you could not predict, give the model more room there, and only there.
That is how most useful agents start: as a workflow that earned a little more freedom, one step at a time.