Agent vs RPA vs a Plain Script
Agent vs RPA vs a plain script: how each one works, where each one breaks, and how to pick the simplest fit, explained for your AI interview.
In short
A plain script runs fixed code that a developer wrote. RPA, robotic process automation, is a software robot that repeats a person's digital tasks, often by copying clicks on a screen. An AI agent lets a model choose its next step, so use one only when the steps can't be listed in advance.
11 min readBeginnerOccasional · estimateFacts checked 27 November 2026
Say it out loud
Read it once, then say it without looking. Start with the short one; use the long one when they ask you to go deeper.
A plain script is fixed code that does the same steps every time. RPA is a software robot that repeats digital tasks, often by copying clicks, so it can break when the screen moves. An agent is a model that picks its own next step. For a repeated task with fixed fields, I'd use a script. I'd use RPA only when there's no other way in, and an agent only when the steps can't be listed in advance.
Think of three ways to hand over a repetitive office job. A plain script is a standing order: the same steps and the same fields, every time, written by a developer. RPA, robotic process automation, is a software robot that does a person's repetitive digital tasks, often by copying clicks and typing on a screen. An AI agent is different again. A model reads the situation, picks the next tool or click, and decides when the job is done.
The choice comes down to how predictable the work is. If a claims team copies fixed fields from one file format every night, a script is the simplest option and the easiest to test. If the only way in is a desktop screen with no other door, RPA can work, but it breaks when a button moves or a new pop-up appears.
An agent fits when the steps can't be listed in advance, like reading a messy customer email and deciding what to check. Anthropic's December 2024 guide on building agents says to find the simplest solution possible, and to add complexity only when needed. It also warns that autonomy brings higher costs and compounding errors. So I'd test agents in a sandbox, limit what they can touch, and keep a person on risky actions.
In an interview, I'd say the choice out loud: a script first, RPA as the last resort on a screen with no other door, and an agent only for open-ended work.
What are the three, in plain words?
Picture three ways to hand over a job. A plain script is a standing order: do exactly these steps, with exactly these fields, every time. A developer writes it in code, and it never changes its mind.
RPA, robotic process automation, is a software robot that does a person's repetitive digital tasks. Classic RPA follows steps that someone recorded or scripted for it, and it does not reason about what those steps are for.
An AI agent is a model that reads the situation, picks the next tool and decides when to stop. A claims team might use one to read a messy customer email and decide what to check. Nobody writes every step for it in advance.
Key words
- Plain script
- Fixed code that runs the same steps, with no model making choices.
- RPA
- Robotic process automation: a software robot that does a person's repetitive digital tasks.
- Agent
- A model that picks its own next step and tool until the task is done.
- API
- A direct door a program can use to read or write data, without clicking a screen.
How does each one decide what to do?
- Script
Fixed code
Runs the steps its developer wrote. No model and no screen. The same input gives the same result.
- RPA
A software robot
Does a person's repetitive digital tasks by following recorded or scripted steps, often copying clicks into an application.
- Agent
A model in charge
Reads the task, picks the next tool or click, reads the result, and decides when to stop.
“RPA is a software technology that automates repetitive, rule-based, and labor-intensive back-office workflows such as filling in forms, searching for information, or sorting invoices.”
AWS
“Workflows are systems where LLMs and tools are orchestrated through predefined code paths.”
Anthropic, workflows
“Agents, on the other hand, are systems where LLMs dynamically direct their own processes and tool usage, maintaining control over how they accomplish tasks.”
Anthropic, agents
Anthropic's guide calls the fixed-path kind with LLM calls a workflow, and the model-led kind an agent. A plain script has no model in it, so it sits below that split: it is simpler than a workflow, not a form of one. RPA sits outside that split too. Its steps are fixed, and it often works on a screen built for people.
Which one fits a real claims team?
Take a mid-size insurer that gets 4,000 claim forms a week from three partner garages. Each form has to be copied into the claims system by hand. Three things differ: the file format, the system, and the messiness of the input.
- 1
Forms from one garage, one fixed layout
A plain script. It reads the fixed fields, posts them, and sends anything with a missing field to a person.
- 2
An old claims system with no API
RPA is the only way in for now. Keep the bot, add a check that stops it when the screen looks different, and plan to replace it.
- 3
Customer emails with photos and free text
An agent reads the mess, pulls out the policy number and drafts the entry. A person approves each posting before it goes in.
Three ways to automate one office task
Repeated office task
Claims, invoices, forms
Plain script
Fixed steps written in code
RPA bot
Copies clicks on a screen
AI agent
Model picks each next step
- 1The fields and steps never change: a script.
- 2No other door in, so a bot copies the screen.
- 3The steps can't be listed in advance: an agent.
Tip
Often the best setup mixes them: a script for the fixed part, and one model step for the messy part. Name the fixed part first in an interview.
Where does each one break?
Each option fails in its own way. A script breaks when its input stops matching what it expects. RPA often breaks when the screen changes. An agent breaks when a wrong guess carries into later steps, and each run costs more than a script run.
Where each one breaks
Plain script
Fixed steps written in code
RPA bot
Copies clicks on a screen
AI agent
Model picks each next step
New claim form layout
Fields land in the wrong place
Screen moved a button
The click lands on nothing
Wrong guess repeats
Errors compound over many steps
- 1A new layout puts the fixed positions out of place.
- 2A moved button sends the bot's click somewhere else.
- 3One wrong guess carries into every later step.
A script is only as safe as its refusals. This made-up claims script sends an incomplete form to a person instead of guessing the missing field:
# A made-up claims script: fixed fields only. Anything odd goes to a person.
REQUIRED = ["Policy No", "Claim Date", "Amount"]
def post_claim(form):
# A field left out stops the posting; empty values are not checked here.
missing = [field for field in REQUIRED if field not in form]
if missing:
return "SEND TO HUMAN: missing " + ", ".join(missing)
return "POSTED: policy " + form["Policy No"] + " for " + str(form["Amount"])
print(post_claim({"Policy No": "PL-20417", "Claim Date": "2026-11-02", "Amount": 1250}))
print(post_claim({"Policy No": "PL-20417", "Amount": 1250}))Output
POSTED: policy PL-20417 for 1250 SEND TO HUMAN: missing Claim Date
Microsoft describes its desktop flows as working with application UI elements, images, or coordinates. Coordinates are exactly why a moved button hurts a bot: the click goes where the button used to be.
Anthropic's computer use tool gives a model a screen to read and a mouse and keyboard to use. That makes it an agent that drives a screen, so the same screen risks apply, and its docs say to isolate the model from sensitive data and actions, because of prompt injection.
How would you replace a fragile RPA bot?
Start with the question a senior engineer asks first: is there a door that doesn't need the screen? Anthropic's December 2024 guide says to find the simplest solution possible first, and to call LLM APIs directly before reaching for a framework, since many patterns fit in a few lines of code.
- 1
Ask for an API first
A direct door to the claims system beats any bot. Ask the vendor, check the docs, and only then look at the screen.
- 2
Turn the fixed part into a script
Where the steps and fields never change, a script with tests replaces the recorded clicks.
- 3
Add an agent only for the messy input
Keep the model for the step that needs judgement, with limits on what it can touch and a person on each posting.
- 4
Log every run and alert on failures
Count the stops and the odd cases each day, so a broken screen is found the same morning.
What does the interviewer want to hear?
A strong answer covers
- A plain definition of each: fixed code, a screen bot, a model in charge.
- The question that decides it: can the steps be listed in advance?
- Why RPA is brittle: it depends on a screen that can change.
- Why agents cost more and can compound errors.
- Start with a script, use RPA only without an API, and add an agent for judgement.
- Testing, logging and a human check on risky actions.
Common traps
Trap"An AI agent is always the best choice."
BetterAgents cost more and can compound errors. Use a script when the steps are fixed.
Trap"RPA is just AI with a screen."
BetterClassic RPA copies recorded or scripted steps. Intelligent automation is the upgrade that adds AI to handle messy input.
Trap"A bot just clicks, so it can't go wrong."
BetterA moved button or a new pop-up sends the click astray. Test it and watch its logs.
Can you spot the fragile step?
Spot the fragile step
A bot approves claims on an old screen. Which step depends on where a button sits on the screen?
Quick check
A team copies 300 policy numbers every night from one fixed-format file into a ledger that accepts a file import. Which fits best?
Can you answer these from memory?
Flash cards · tap a card to flip it
What will they ask next?
Learn it in depth
Last updated on 27 November 2026
Replacing a fragile bot with something sturdier?
I design and build AI agents and the screens around them, with the guardrails in place: a script where it fits, checked tool calls and a person on risky steps. Book a short call and tell me what your bot does.