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.
It helps to describe each option by the property it gives you, since the product names overlap.
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.
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.
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.
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 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 step | Rules / DMN | RPA | Workflow engine | LLM agent |
|---|---|---|---|---|
| Input is structured and the logic can be written down | Best fit | Possible | Orchestrates it | Avoid |
| Input is free text, documents or images | Poor | Poor | Orchestrates it | Good fit |
| The same input must always give the same output | Yes | Yes, until the UI changes | Yes (for orchestration) | No |
| A regulator or auditor must see why a decision was made | Row that fired | Script and logs | Event history | Reasoning text, which is not proof |
| Target system has no API | n/a | Best fit | Needs an adapter | Possible via tools, with care |
| Number of paths is small and known | Best fit | Fine | Best fit | Overkill |
| Number of paths is large or unknown in advance | Breaks down | Breaks down | Breaks down | Good fit |
| Step moves money, changes records or contacts customers | Fine | Fine | Fine | Only behind an approval gate |
| Process runs for days and must survive restarts | n/a | Weak | Best fit | Needs 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.
A practical rule follows from the table. Keep these three things deterministic even in a system that uses agents heavily:
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".
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:
| Step | What happens | Tool | Reason |
|---|---|---|---|
| 1 | Receive email, store attachment, start a process instance | Workflow engine | Durable, retryable, auditable |
| 2 | Extract supplier, invoice number, lines and totals from the PDF | LLM call (structured output) | Layouts vary; rules cannot keep up |
| 3 | Validate extracted fields against a schema | Code | Rejects malformed extraction before it spreads |
| 4 | Three-way match against PO and receipt within tolerance | Rules / decision table | Same input, same answer; the row that fired is the audit trail |
| 5 | If matched, post for payment | Workflow + ERP API | Deterministic write |
| 6 | If not matched, investigate: read the PO history, prior emails, receipts | LLM agent with read-only tools | Open-ended; the paths are not known in advance |
| 7 | Draft a classification and a supplier message | LLM agent | Language task |
| 8 | Clerk approves, edits or rejects | Human approval step | The action contacts an external party or changes records |
| 9 | Send message or apply correction | Workflow + API | Deterministic 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.
A short checklist, with the reason for each question:
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.
[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/