Agentic AI and traditional automation: choosing the right tool

Rules engines, RPA, workflow engines and LLM agents solve different problems. A decision table for choosing between them, and for deciding where determinism has to stay.

Most automation questions that arrive labelled "should we use an AI agent?" are really two questions. Which steps in this process need judgement over messy, unstructured input? And which steps must give the same answer every time, for the same input, so that someone can audit them later? The first group is where large language models earn their cost. In the second group, their variability becomes a liability.

The useful design work is drawing the line between the two, step by step, and then choosing a tool for each side.

Four kinds of automation, described by what they guarantee

It helps to describe each option by the property it gives you, since the product names overlap.

Rules engines and decision tables

A rules engine evaluates explicit conditions and returns a decision. The OMG's Decision Model and Notation (DMN) standard gives this a shared form: a graphical notation and an expression language that includes decision tables, intended to be readable by business stakeholders and precise enough to execute [4]. The guarantee is that the same facts produce the same decision, and you can point to the row that fired.

The weakness is scale and interaction. Martin Fowler warns that chained rules can be "very hard to reason about and debug", and that a small change in one rule can cause unintended consequences elsewhere [5]. Rules stay manageable when they sit inside a narrow context.

Robotic process automation (RPA)

RPA operates existing applications the way a person would. Microsoft's documentation for Power Automate desktop flows says they are designed for people who perform "simple or complex rule-based tasks", that they can automate legacy applications such as terminal emulators, and that they interact with the machine through "application UI elements, images, or coordinates" [6]. The guarantee is reach: you can automate a system that has no API. The cost is dependence on screens that were never designed as interfaces, so a layout change can break the automation.

Workflow engines and durable execution

A workflow engine owns the sequence: which step runs next, what happens on failure, how long to wait, when to retry. Temporal's documentation states the property plainly: workflow code must be deterministic to support replay, and non-deterministic work, including API calls and LLM invocations, belongs in Activities, which run outside the replay path and are retried automatically [3]. The guarantee is that a long-running process survives crashes and restarts and can be reconstructed from its event history.

LLM agents

Anthropic's engineering guidance draws a distinction worth adopting as vocabulary. Workflows are "systems where LLMs and tools are orchestrated through predefined code paths"; agents are systems where LLMs "dynamically direct their own processes and tool usage" [1]. The ReAct paper describes the pattern underneath many agents: the model interleaves reasoning traces with actions, using the reasoning to plan and update its next steps and the actions to fetch information from outside sources [2].

The guarantee an agent gives is flexibility. It can read a free-text email, decide that it needs the purchase order, look the purchase order up and summarise the mismatch, without anyone writing a branch for that case. What it does not give you is repeatability. Even at temperature zero, LLM APIs are "still not deterministic in practice", and research from Thinking Machines Lab traces most of this to inference kernels that are not batch-invariant, combined with server load that changes the batch size: the output for one request can depend on how many other requests share its batch [7].

The decision table

The table below is our design judgement, built from the properties above. Read each row as a property of a single step, not of the whole process.

Property of the stepRules / DMNRPAWorkflow engineLLM agent
Input is structured and the logic can be written downBest fitPossibleOrchestrates itAvoid
Input is free text, documents or imagesPoorPoorOrchestrates itGood fit
The same input must always give the same outputYesYes, until the UI changesYes (for orchestration)No
A regulator or auditor must see why a decision was madeRow that firedScript and logsEvent historyReasoning text, which is not proof
Target system has no APIn/aBest fitNeeds an adapterPossible via tools, with care
Number of paths is small and knownBest fitFineBest fitOverkill
Number of paths is large or unknown in advanceBreaks downBreaks downBreaks downGood fit
Step moves money, changes records or contacts customersFineFineFineOnly behind an approval gate
Process runs for days and must survive restartsn/aWeakBest fitNeeds an external state store

Two rows deserve comment.

"Reasoning text, which is not proof": an agent can explain itself fluently, and the explanation can be wrong. If a decision has to be defended later, store the inputs, the rule or threshold that was applied and the outcome. A model's narrative is useful context for a reviewer; it is not the decision record.

"Only behind an approval gate": OWASP's Top 10 for LLM applications includes excessive agency, and among its mitigations recommends that a human approve high-impact actions before they are taken [8]. How to design that gate is the subject of a separate article, designing human approval into enterprise AI agents.

Where determinism must stay

A practical rule follows from the table. Keep these three things deterministic even in a system that uses agents heavily:

  1. The control flow that decides which step runs next, how many times a step may retry and when the process must stop. Anthropic's guidance notes that agents bring "the potential for compounding errors" and recommends stopping conditions such as a maximum number of iterations [1]. Those limits should live in ordinary code, outside the model.
  2. Calculations and thresholds that carry money or compliance meaning: tax, discounts, credit limits, eligibility. If a model extracts the inputs, ordinary code applies the rule.
  3. The write to the system of record. An agent can propose the change; a deterministic step validates it against a schema and business rules before it is committed.

This is the same split Temporal enforces mechanically: the orchestration replays deterministically, and the non-deterministic call is an isolated activity whose result is recorded [3]. You do not need Temporal to apply the idea. You need a clear boundary in the code between "the model suggested this" and "the system did this".

A worked example: supplier invoice exceptions

Consider an illustrative accounts-payable process. Invoices arrive by email as PDFs. Most match a purchase order and a goods receipt. Some do not, and today a clerk reads each exception, works out why, and either fixes the data or writes to the supplier.

Broken into steps, with a tool chosen per step:

StepWhat happensToolReason
1Receive email, store attachment, start a process instanceWorkflow engineDurable, retryable, auditable
2Extract supplier, invoice number, lines and totals from the PDFLLM call (structured output)Layouts vary; rules cannot keep up
3Validate extracted fields against a schemaCodeRejects malformed extraction before it spreads
4Three-way match against PO and receipt within toleranceRules / decision tableSame input, same answer; the row that fired is the audit trail
5If matched, post for paymentWorkflow + ERP APIDeterministic write
6If not matched, investigate: read the PO history, prior emails, receiptsLLM agent with read-only toolsOpen-ended; the paths are not known in advance
7Draft a classification and a supplier messageLLM agentLanguage task
8Clerk approves, edits or rejectsHuman approval stepThe action contacts an external party or changes records
9Send message or apply correctionWorkflow + APIDeterministic write, logged

Notice what the agent does not do. It never decides whether an invoice matches, never posts a payment and never sends an email unaided. It works where a clerk previously spent time reading and searching, which is the part of the job a rules engine could not express.

If the ERP had no API, step 5 would be the place for RPA, and the rest of the design would not change.

A sketch of the orchestration, illustrative rather than tied to any framework:

on invoice_received(email):
    doc      = store(email.attachment)                 # deterministic
    fields   = activity(llm_extract, doc)              # non-deterministic, recorded
    if not schema_valid(fields): route_to_queue("extraction_failed"); return
    result   = match_rules(fields, po, receipt)        # decision table
    if result.matched:
        activity(erp_post, fields); return
    case     = activity(agent_investigate, fields,
                        tools=[read_po, read_receipts, read_mail],
                        max_steps=12, timeout=10m)     # bounded agent
    decision = wait_for_human(case, timeout=2d)        # approval gate
    if decision.approved: activity(apply, decision.final_action)

The limits in that sketch (12 steps, 10 minutes, 2 days) are placeholders. The point is that they exist and that the workflow, not the agent, enforces them. The broader question of how to model agent loops as explicit states and transitions is covered in multi-agent systems as state machines.

Questions to ask before choosing an agent

A short checklist, with the reason for each question:

  • Can we write the logic down? If yes, write it down. A decision table is cheaper to run, test and explain than a model.
  • What happens if the step gives a different answer tomorrow for the same input? If that is unacceptable, the step needs code or rules, or a model whose output is checked by code.
  • Is the cost of the agent justified? Anthropic notes that agentic systems "often trade latency and cost for better task performance" and that optimising a single LLM call with retrieval and examples is often enough [1].
  • What is the most damaging action the step can take? Remove that capability from the agent, or put an approval step in front of it [8].
  • Where is the state kept? If the process is long-running, the workflow engine or a database should hold it. The model's context window is not a store.
  • How will we test it? Rules and workflows have unit tests. Agents need task suites and regression sets run repeatedly, because a single passing run says little about a non-deterministic component.

Combining them

In our view, the sensible architecture for most enterprise processes is a deterministic backbone, with model calls and agents placed where language or open-ended investigation is the bottleneck. Workflow engines give the backbone, rules give the decisions, RPA reaches the systems that lack APIs, and agents handle the reading, searching and drafting that none of the others can.

Drawing that map for a real process is mostly analysis work: list the steps, mark each one against the table above, and only then pick products. If you are starting that exercise, our AI and agentic transformation and AI-as-a-service and ML automation pages describe how we approach it.

Prepared with AI-assisted research and drafting.

Sources

[1] Anthropic (byline: Erik S. and Barry Zhang), "Building effective agents", Anthropic Engineering, 19 December 2024. https://www.anthropic.com/engineering/building-effective-agents

[2] S. Yao, J. Zhao, D. Yu, N. Du, I. Shafran, K. Narasimhan and Y. Cao, "ReAct: Synergizing Reasoning and Acting in Language Models", arXiv:2210.03629, 2022. https://arxiv.org/abs/2210.03629

[3] Temporal Technologies, "Workflow Definition", Temporal documentation, accessed 2026. https://docs.temporal.io/workflow-definition

[4] Object Management Group, "Decision Model and Notation (DMN)", OMG specification page, accessed 2026. https://www.omg.org/spec/DMN/

[5] M. Fowler, "Rules Engine", martinfowler.com, 7 January 2009. https://martinfowler.com/bliki/RulesEngine.html

[6] Microsoft, "Introduction to desktop flows", Microsoft Learn (Power Automate), 2026. https://learn.microsoft.com/en-us/power-automate/desktop-flows/introduction

[7] H. He, in collaboration with others at Thinking Machines Lab, "Defeating Nondeterminism in LLM Inference", Thinking Machines Lab: Connectionism, 10 September 2025. https://thinkingmachines.ai/blog/defeating-nondeterminism-in-llm-inference/

[8] OWASP GenAI Security Project, "LLM06:2025 Excessive Agency", OWASP Top 10 for LLM Applications, 2025. https://genai.owasp.org/llmrisk/llm062025-excessive-agency/