Workflow guide

Rules-based automation vs AI: when to use each.

Every process has steps that should come out the same way every time and steps that need someone to think. Automation projects tend to fail at one end or the other: rules stretched over work that needs judgment, or an AI asked to decide what a lookup could answer. The work is in sorting one from the other, step by step.

cvlSoft10 min read

Two kinds of step.

Break almost any process into its steps and they fall into two groups.

  • Steps with one right answer. Is this order inside the return window? Is the policy active on the date of the loss? Has every required field been filled in? Which account does this email address belong to? Given the same facts, the answer should never change, and nobody should have to think about it.
  • Steps that need judgment. What is this customer actually asking for? Is this document the one we asked for, or something close to it? Should this case wait, or go to a manager now? Two careful people might need a moment, and the facts alone do not settle it.

Rules-based automation handles the first group well and cannot touch the second. AI handles the second group well and is the wrong tool for the first. An AI can answer “is this order inside the return window?” and will usually get it right, but usually is a poor standard for a question with one correct answer.

AIOS is built on this split: rules where rules work, and reasoning where judgment is needed. Looking up a record, checking a policy flag, validating a required field or calling a system should give the same answer every time, so AIOS does those in plain code. It reasons only where reasoning is the work. The principle is the right amount of intelligence for each step, not AI for everything.

How to sort the steps of a process.

Write the process out as the people who do it would describe it, one step per line. Then put each step through these questions, in order. The first one that answers yes decides it.

  1. 1

    Is it a rule someone already wrote down?

    A limit, a deadline, an eligibility condition, a required approval. If it is written in a policy, it belongs in a rule, where it will be applied the same way every time.

  2. 2

    Could the answer be looked up?

    If the answer is sitting in a system, such as an order date, a balance or a status, fetching it is a system call. Nothing needs to reason about it.

  3. 3

    Is the input written by a person?

    An email, a call, a free-text note or a form filled in differently each time. The first job is reading what someone meant, and that needs AI.

  4. 4

    Would two of your best people give the same answer?

    If yes, there is a rule hiding in the step, even if nobody has written it down. Find it and write it. If they would discuss it, the step needs judgment.

  5. 5

    Is it a conversation?

    Replying to a customer, asking a supplier for something, explaining a decision. Words aimed at a person need AI, with checks on what it may say.

Expect most processes to come out mixed, with more rule steps than people guess. A process that feels like judgment from the outside is often a series of lookups and checks with two or three real decisions in it. AI agents vs robotic process automation has a shorter rule of thumb for the same sort.

One return request, step by step.

Take a customer who writes in to return a pair of shoes that do not fit and asks for a different size. The e-commerce customer service page describes the sequence: check the order and the return window, confirm the replacement size is in stock, hold it, send the label, and issue the refund or ship the exchange when the original comes back. Here is how its steps sort.

StepRules or AIWhy
Read the message and work out what they wantAIThey might want a refund, an exchange or just advice on sizing, and they will not say it the way a form would
Find the orderRulesA lookup by email address or order number
Check the return windowRulesA date and a limit. One right answer
Check the new size is in stock, and hold itRulesA system call
Decide between an exchange and a refundAIIf they mentioned both, or the size they want is gone, someone has to choose the option that fits
Check the refund against the limit that needs a sign-offRulesYour policy, checked in code before the refund is issued
Send the label and reply to the customerBothSending the label is a system call. Writing the reply is AI
Issue the refund or ship the exchange when the shoes come backRulesTriggered by a change in the order’s status

Two of the eight steps need judgment, and a third needs AI for the writing. Everything else should come out the same every time. If the customer is upset, or the order is unusual in a way no rule covers, the case goes to a person with the order, the history and a recommended action.

What goes wrong when AI does everything.

It is tempting to hand the whole process to an AI and let it work out the steps, because that is quick to set up and handles odd cases gracefully. It costs you in four ways.

  • Answers drift. Ask a model the same question twice and the wording, and occasionally the answer, can differ. For a reply to a customer that is fine. For whether a refund is allowed, it is not.
  • It is harder to test. A rule can be checked once against every case it covers. A step left to a model has to be tested again whenever the model, the instructions or the inputs change.
  • It can be talked round. A model reads everything in front of it, including a customer’s message written to persuade it. A rule does not read the conversation.
  • It is harder to explain. When an auditor asks why a case went one way, “the rule says so” is a better answer than an account of what a model weighed.

A step with one right answer should not depend on a model getting it right, however good the model is. What an agent demo leaves untested looks at how convincing answers can hide exactly these problems.

What goes wrong when rules do everything.

The opposite mistake is older and just as common. A team writes rules for every case it can think of, and the automation handles exactly those cases.

Everything else goes to an exceptions queue. The email that did not match a pattern, the document scanned upside down, the customer who asked two things at once. Each new kind of exception tempts someone to add a rule, and the rule set grows until nobody can say what it does as a whole. Once that queue holds most of the work, people are doing the job by hand again, with an extra step in front of it.

Rules also cannot read. They can check that a field is filled in, and cannot tell whether what is in it makes sense. The judgment your best people apply to every case, such as noticing that an address is a warehouse or that a claim description does not match the photos, never makes it into a rule set because nobody thought to write it down. How to capture tacit knowledge before you automate is about finding it.

Your policies belong with the rules.

Policies are the clearest case of a rule. “Refunds over a set amount need a manager’s approval.” “Never change the address on an account the same day as a payout.” There is one right answer, and a wrong one costs money or trust.

The common mistake is to put them in the AI’s instructions. An instruction is guidance the model weighs against everything else it has read, and it is usually followed. A policy checked in code is applied every time, whatever the conversation said. AI agent guardrails, explained covers why that difference matters and the layers a run should meet.

In AIOS nobody has to write that code. You describe the policy to the AIOS agent as you would to a new hire, and it writes it as a rule: deny the action, require an approval, allow it, or log it. It reads the rule back in plain language and shows which workflow steps it would catch, and it saves nothing until you confirm. From then on the rule is checked in code on every action, the same way every time.

That is how AIOS governance turns your policies into rules. Every action is policy-gated: AIOS checks it against your policies before it reaches a system of record, and you add rules where your process needs them. The policy engine is deterministic. The AI proposes, and the engine decides.

Some checks need judgment too.

Not every safety check can be a rule, and it is worth being honest about which ones cannot. Spotting personal data in a message can be done the same way every time, and in AIOS that detection is deterministic. Deciding whether a message is an attempt to take over the agent, or whether a reply has drifted onto a topic the business has ruled out, needs a reading of the words. In AIOS those calls are made by a separate model, not by the one doing the work.

The same split applies to checking whether the work came out right. Where a check can be code, make it code. Where it needs judgment, use a model that is not the one being checked.

  • Each step is judged against the result it was supposed to produce. In AIOS a step that falls short is retried with feedback, not just repeated.
  • Tests check both. In Proof, each test case names where a run should end. Code checks the ending, and an AI grader checks the actions the run attempted.
  • Every firing is counted. A report shows each time a guardrail or a policy rule fired and what it did, so you can see which checks are doing the work.

How to evaluate an AI agent before it goes live goes further on testing the judgment steps.

Put both kinds in one workflow, and move the line as you learn.

Rules and judgment work best side by side in one workflow your team can read, with each step marked for what it is. Splitting them across two systems, a rules engine here and an AI tool there, means two records of every case and a handover between them that nobody owns. What is an agentic workflow? describes how one is laid out.

The line between the two is not fixed. Two signs say it should move.

  • The same judgment comes out the same way every time. If a decision your team thought needed judgment always lands on the same answer for the same facts, it is a rule nobody had written down. Write it down.
  • A rule keeps sending cases to a person. If one rule is behind most of the exceptions, the step it guards probably needs judgment, with a rule left only around the part that must not vary.

Both signs show up in the record of every run, which is why the record matters. In AIOS, Nightshift reviews the day’s runs every night and builds the fix, which waits for your approval like any other change. How self-improving AI agents work explains what a run should leave behind for that review.

Questions.

What is the difference between rules-based automation and AI?

Rules-based automation follows conditions written in advance and gives the same answer every time, which suits lookups, limits and required checks. AI reads and judges, which suits messages written by people, choices between valid options and decisions that depend on context.

When should you use AI instead of rules?

When the step needs judgment: reading what someone meant, choosing between valid options, applying business judgment, explaining a decision or deciding when to bring in a person. If a task is fully predictable, plain automation is the right tool.

Can an AI follow our business rules reliably?

An instruction in a prompt is usually followed, which is not enough for a policy. In AIOS your policies are written as rules and checked in code before every action, so they are applied whatever the conversation said.

Do we have to write the rules in code?

No. Describe the policy to the AIOS agent in plain language. It writes the rule, shows you which workflow steps it would catch, and saves nothing until you confirm.

Is AIOS deterministic?

The policy engine and personal-data detection are deterministic. Steps such as lookups and system calls run in plain code and give the same answer every time. Steps that need judgment use a model, and checks such as prompt injection are judged by a separate model.

What happens to a case the rules do not cover?

It goes to a person with the full case and a recommended action, so they decide instead of starting over. The decision is recorded with the run.

You pay for results. Not for software.

AIOS learns your processes and carries out the work across your existing systems—from customer follow-ups to invoice collection. Your team handles approvals and exceptions.

More guides