# AI agent or rule-based automation?

URL: https://ergostrat.com/en/automations/ai-agent-vs-automation.html
Language: [Български](https://ergostrat.com/automations/ai-agent-vs-automation.html) · [English](https://ergostrat.com/en/automations/ai-agent-vs-automation.html) · [Français](https://ergostrat.com/fr/automations/ai-agent-vs-automation.html) · [Deutsch](https://ergostrat.com/de/automations/ai-agent-vs-automation.html)

If an email must reach a particular department based on its sender, ordinary rules may be enough. If the system must choose its next action from what it has found so far, you are considering a different form of control. Start with the task: what is known in advance, what must be decided along the way and how will you check the result? The agent label alone is not a reason to choose it.

## Who chooses the next step?

Anthropic's engineering guidance distinguishes workflows, where code defines paths between language models and tools, from agents, where the model directs the process and tool use. This is a useful architectural distinction, rather than the only universally accepted definition of an agent.

Not every automation uses a language model. Moving data between clearly defined fields can follow rules alone. Conversely, a predefined workflow can include a model for classification or summarisation. A fixed sequence does not make the model's answer automatically correct; it still needs acceptance criteria and checks.

## Five useful workflow patterns

Anthropic describes these patterns, which can be combined for the task:

- Prompt chaining: one subtask's result feeds the next. An intermediate check can stop the workflow if a result is unacceptable.
- Routing: input is classified and sent along a suitable path, such as a pricing question or a technical support enquiry.
- Parallelisation: separate parts run at the same time and their results are combined. This depends on whether the parts can actually be handled independently.
- Orchestrator and workers: a lead model defines subtasks, delegates them and combines results. The breakdown can be dynamic without giving the system unrestricted permissions.
- Evaluator and optimiser: a result is checked against a clear criterion and may be revised. Set a limit and decide what happens if it fails; the loop does not guarantee an acceptable answer eventually.

This is not a compulsory ladder every company must climb. Anthropic recommends looking for a simple solution and adding complexity when it improves the required result. Sometimes one model call is enough; sometimes no model is needed.

## When is model-directed work useful?

Where later actions depend on discoveries during execution, more flexible control may help. Research into an agreed market, for example, may require different sources and follow-up questions. This is an illustration, rather than a promise to find every competitor or produce exhaustive research.

Asking whether you can describe the steps in advance is a useful starting point, but not an absolute test. Compare permitted actions, quality, response time, cost and intervention. An orchestrator is not a compulsory intermediate stage, nor is an agent an inevitable next stage.

A flexible path may involve more model calls and less predictable spending. That does not prove every agent costs more than every workflow. Check actual inputs, task size, limits and error handling instead of promising savings from the architecture's name.

## What should you check about outside text and permissions?

OWASP documents prompt injection as LLM01:2025. It can originate in a direct request or content an application reads.

If a model reads outside text, establish which actions that text could trigger. Limit access to the necessary tools and data, check outputs and define actions requiring a human decision. A predefined workflow can process untrusted content too; rules do not automatically make it protected.

## Apply the choice to one task

For routing by an exact sender or keyword, first check whether an ordinary rule solves the case. If free text needs interpretation, you can add a bounded model step with a clear exit for unknown cases. For a monthly report from structured spreadsheets, first define calculations and checks; not every data collection task needs AI.

Before implementation, use representative examples, including ambiguous input and tool failure. Check whether the result is useful, who sees an error and when work passes to a person.

## Questions

### Does an agent always cost more?

The label alone cannot establish that. Freedom to take more steps can increase spending and checking time. Measure the actual configuration and set limits instead of assuming a universal price difference.

### Can we start with rules and add a model or agent later?

Yes. Keep the checkable parts and add flexibility where examples show a need. Assess the change by its results and cost. You need not replace the whole workflow because one stage requires a model.

### What does OWASP say about this risk?

The page concerns LLM01:2025, prompt injection. It covers language-model applications, including systems with predefined workflows. Check your application’s permissions and actions.

## Sources

- [Anthropic: building effective agents](https://www.anthropic.com/engineering/building-effective-agents)
- [OWASP: LLM01:2025 prompt injection](https://genai.owasp.org/llmrisk/llm01-prompt-injection/)

## Related reading

- [How do you choose an automation partner?](https://ergostrat.com/en/automations/choose-automation-partner.html)
- [What do AI readiness frameworks measure?](https://ergostrat.com/en/ai-readiness-assessment/readiness-frameworks.html)

## Choose the approach for the task.

Many processes run on clear rules and no agent at all. Write to us about the process you want to automate, and we will tell you which of the two fits it.

[Book a call about one process](mailto:contact@ergostrat.com?subject=Question%20after%20the%20AI%20Agent%20or%20Automation%20article)
