AI Agents and Coding Assistants
Old-Style Robotic Process Automation and AI Agents Compared
How scripted software bots differ from AI agents in flexibility, predictability, cost and upkeep, and when to combine the two.
Key takeaways
- RPA executes fixed rules and behaves the same way each time as long as its surroundings do not change.
- AI agents interpret varied inputs such as free-form email, at the price of less predictable behavior.
- Scripted bots tend to break visibly when screens change, while agents may carry on and get something subtly wrong.
- Many good designs use a model to read messy input and fixed code to carry out the consequential steps.
- Choose by the shape of the work, the cost of errors and who will maintain the system.
Robotic process automation, usually shortened to RPA, follows a script: click here, copy this field, paste it there. An AI agent is given a goal and works out the steps as it goes, using a language model to read what it finds. The first is predictable but brittle. The second copes with variety but can surprise you.
Despite the name, RPA involves no physical robots. The "bot" is a program that imitates the actions a clerk performs on a screen or sends data between systems.
How each one works
A traditional bot is built by recording or drawing a sequence of steps. A developer or trained staff member specifies where to look on the screen, what to extract and what to do under each condition. If a case arrives that no rule covers, the bot stops or hands it to a person.
An agent runs a loop. It reads the situation, chooses an action from the tools available, observes the result and decides what to do next. The cycle is explained in the loop inside an AI agent. Nobody writes out every branch in advance. You describe the goal, the rules and the limits.
Side by side
| Question | Scripted bot | AI agent |
|---|---|---|
| New kind of case | Stops or errors | Attempts it, rightly or wrongly |
| Explaining a result | Trace the rules | Review logs and outputs |
| Running cost | Largely licenses and upkeep | Often usage-based model fees too |
| Testing | Cover each defined path | Sample many varied cases repeatedly |
| Hostile text in inputs | Usually treated as plain data | May be read as instructions |
Treat these as tendencies. Products increasingly mix the approaches, and some tools sold as RPA now include model-based features.
The same task done both ways
Say a company receives supplier invoices and enters them into its accounting system.
A scripted bot works well if every invoice arrives as the same electronic form. It reads fixed fields, checks that the total matches the line items and creates the record. When a supplier redesigns its layout, extraction fails, and someone updates the script.
An agent can read invoices in many layouts, including a total mentioned in the body of an email. It can look up a purchase order and draft a note about a mismatch. It can also read a handwritten 7 as a 1, pick the subtotal instead of the total or accept a fraudulent invoice that looks convincing. Each result needs checks.
A sensible combination lets a model extract the fields, then applies fixed rules: the supplier must already be on file, the arithmetic must add up, the amount must match an order, and anything else goes to a person. Payment remains a controlled step. More on this kind of work appears in AI document processing.
A worked estimate of exceptions
The share of cases each approach can finish matters, and so does what happens to the rest. Take an invented month of 1,000 invoices.
Suppose a scripted bot handles 700 correctly and stops on 300 that have unfamiliar layouts. Staff process those 300 by hand. They know exactly which ones need attention, because the bot refused them.
Now suppose an agent attempts all 1,000, gets 940 right and gets 60 wrong without flagging them. Only 60 items are wrong, far fewer than the 300 the bot set aside, but nobody knows which 60. Finding them may mean checking all 1,000.
The agent becomes clearly useful if checks can catch its errors. If rules for totals, supplier names and order numbers flag 55 of the 60 bad items, along with some good ones, staff review a short list. Five errors still slip through, and you need to decide whether that is acceptable for this process and how the old method compares. People make entry mistakes too, so measure their rate instead of assuming it is zero.
What each one asks of your data
A scripted bot needs consistency: the same fields in the same places, with predictable formats. Much of the work in a bot project is forcing inputs into shape.
An agent tolerates variety but needs context. It has to know your supplier names, your account codes, your approval rules and what counts as an exception. If that knowledge lives only in a senior clerk's head, the agent will fill the gaps with guesses.
Either way, clean reference lists and clear written rules pay off. They also make it easier to change tools later, because the knowledge about your process is not locked inside one bot or one long prompt.
How they fail
Failure style may matter more than success rate. A scripted bot usually fails loudly. A button moves, the script cannot find it and an error appears. The danger arises when a change goes undetected, such as two columns swapping places while the bot keeps copying by position.
An agent often fails quietly. It improvises around an obstacle and reports completion. It may fill a missing value with a plausible one. Across a long task these slips accumulate, as explained in why errors compound.
Security differs as well. Because an agent reads content as language, text inside an invoice or web page can attempt to redirect it, a risk called prompt injection. A fixed script has other weaknesses, notably the powerful account credentials it often holds, but it does not take advice from the documents it processes.
Upkeep and cost
RPA's hidden cost is maintenance. Each change in a connected application can require rework, and an organization with many bots needs people to watch them. Where systems offer an API, a formal way for programs to exchange data, using it is usually sturdier than clicking through screens.
Agents reduce some of that rework but add their own. The model provider may update or retire a model, which can shift behavior. Instructions need revision. Test sets must be rerun. Usage fees rise with volume and long tasks, so estimate costs on real samples before committing, and check current pricing.
In both cases, someone must own the process, handle exceptions and know how to do the work by hand.
Choosing between them
Ask these questions in order.
- Is there an API or a built-in feature that does this without either one? Use it if so.
- Are inputs structured and rules stable? Prefer ordinary scripts or RPA.
- Do inputs vary in wording or layout, while the actions stay fixed? Use a model to interpret and fixed code to act.
- Does the path itself depend on what is discovered along the way? An agent may fit, with limits and review.
- Would a wrong action be costly or irreversible? Keep a person's approval in the loop whatever the technology.
Auditors and regulators may expect you to show why a result occurred. A rule-based path is easier to demonstrate. If that is required, keep the decision in rules and use models only to prepare information.
Common mistakes in the choice
- Using an agent for fixed rules. Paying for interpretation that the task does not need adds cost and variation.
- Stretching a script over messy input. Dozens of special cases become hard for anyone to follow.
- Automating a broken process. Neither tool repairs unclear ownership or conflicting rules.
- Counting only successful runs. Include review, repairs and downtime when you compare the two.
- Handing over broad logins. Give either kind of automation its own account with only the access the job needs.
Moving from bots to agents
If you already run scripted bots, there is no need to replace what works. Look at the exception queue, the items the bot hands to people. Those are candidates for an agent that suggests a resolution while a person decides.
Keep the existing checks when you add a model. Run old and new side by side on the same cases and compare. Give the agent narrower access than the bot had if it needs less. For picking where to begin, see choosing a first process.
Common questions
Is RPA obsolete?
No. For stable, high-volume, rule-bound work, predictability is a major advantage. Its role is shifting in many places toward the reliable "hands" of systems where models handle interpretation.
Is an agent that clicks through screens just smarter RPA?
It uses the same surface, the user interface, but decides differently. Computer use agents look at the screen and choose actions, so they may survive a moved button and may also click the wrong one.
Which is easier for non-programmers?
Both now have visual builders. Building a first version is often easy with either. Handling exceptions, security and maintenance is where specialist help usually pays off.