AI Agent, Workflow or Script? Choosing the Right Automation
The word agent now covers everything from a cron job to an autonomous system. Naming what you actually need saves money and avoids fragile software.
Ask five vendors what an AI agent is and you will get five answers. The term is now applied to chatbots, scheduled scripts, workflow tools with a language model in one step, and genuinely autonomous systems that plan and act on their own. For a business deciding what to build, that vagueness is expensive. It leads to complex, unpredictable software where a simple, reliable one would have done.
This post offers a plain way to separate the options, and a rule we use with clients: choose the least autonomous design that solves the problem.
Most real systems mix all three. A customer onboarding process might use plain integration code to create accounts, a model to read uploaded documents, and nothing agent-like at all. Naming each part correctly is what lets you test and price it correctly.
Three levels of automation
- Scripts and rules. Deterministic code: if this, then that. Every step is written by an engineer. Cheap, fast, testable and completely predictable.
- Workflows with AI steps. A fixed sequence defined in code, where one or more steps call a model, for example to classify an email, extract fields from a PDF or draft a reply. The path is fixed; only the content of certain steps is generated.
- Agents. A model decides which steps to take, in which order, using tools you give it, and loops until it judges the goal is met. The path itself is generated at run time.
Each level adds flexibility and removes predictability. The right choice depends on how much variation the task really has.
The distinction is not academic. It decides how you test the system, how you explain its decisions to customers or auditors, how much each run costs and what happens when something goes wrong. A workflow fails at a known step; an agent can fail in ways nobody anticipated, because it chose a path nobody designed.
When a script is enough
If the inputs are structured and the rules can be written down, write them down. Moving data between systems, sending reminders, generating documents from templates and syncing records do not need a model at all. Adding one makes the system slower, more expensive and harder to test without making it better. Much of what is marketed as AI automation is, underneath, this kind of integration work.
When a workflow with AI steps fits
This is where most of the value sits for most businesses. The process is known, but some steps involve unstructured input that rules cannot handle well: free-text emails, scanned documents, CVs, support tickets. A model handles those steps; ordinary code handles everything else.
On Digital Arrow, an HR and recruiting platform we built, the hiring lifecycle is a defined process (post a role, collect candidates, interview, contract, timesheets, invoices) and AI is used for specific steps such as scoring asynchronous video interviews. The structure stays predictable; the model does the part that needs judgement on unstructured input.
Making AI steps reliable
A model inside a workflow should be treated like any other component with an error rate. Constrain its output to a schema, validate the result in code, and route low-confidence or invalid outputs to a person instead of passing them on. Measure accuracy per step against real examples. When a step is reliable enough, reduce human review for it; when it is not, the rest of the process keeps working while the uncertain cases wait for a person.
When an agent is justified
Agents make sense when the path genuinely varies from case to case and enumerating it in advance would be impractical: open-ended research tasks, investigating an incident across several systems, or helping a user complete a goal that could take many different routes. Even then, we constrain them heavily. Our post on LLM agents in production covers the guardrails in detail.
A useful middle ground is the constrained agent: the model chooses among a small set of tools, within a limited number of steps, inside a workflow that fixes the start and end points and requires approval before anything irreversible happens. This captures much of the flexibility of an agent while keeping the system testable.
Questions to ask before you build
- Can a domain expert write the steps down? If yes, start with a workflow.
- Which steps involve unstructured input? Those are candidates for a model.
- What happens if a step is wrong? The higher the cost of a mistake, the less autonomy you want.
- Does a human need to approve the outcome? Design that checkpoint in from the start.
- How will you test it? If you cannot describe a test, you are not ready to automate it.
- What is the volume? A process run ten times a month may not justify automation at all.
Cost deserves a line of its own. A workflow step that calls a model once has a predictable price per run. An agent that loops until it is satisfied can call a model dozens of times for one task, and the number varies. Set budgets and step limits, and track the cost per completed task, not just per call.
A practical migration path
We usually recommend starting at the simplest level and promoting steps only when there is evidence they need it. Map the current process with the people who run it. Automate the deterministic parts first, which often delivers most of the time saving. Add model-powered steps where unstructured input is the bottleneck, with evaluation sets to measure accuracy. Consider an agent only for the parts that remain genuinely open-ended, and keep a human in the loop until the data shows it is safe to step back.
This approach also produces a system your team can understand and maintain, which matters more over the years than how impressive the first demo looked.
Signs you chose too much autonomy
- Runs of the same task take very different paths and costs.
- Nobody can explain why a particular outcome happened.
- Testing relies on watching it work rather than on repeatable cases.
- Most of the agent's runs follow the same few steps anyway, which means a workflow would do.
Automating a process?
We build automation at every level, from integrations to AI workflows and constrained agents. Explore our custom AI development service, or talk to us about the process you want to automate.