AI Agents7 min read

RPA vs AI Agents: How They Differ and When to Combine

RPA bots follow fixed rules through UIs and APIs; LLM agents decide their own steps. How each works, where each breaks, and how to combine them safely.

By AI Agents DirectoryLast checked
Lego figures on display, photographed with a shallow depth of field

Robotic process automation (RPA) and LLM-based agents both do work in software that a person would otherwise do by hand, but they decide what to do in very different ways. An RPA bot runs steps that someone wrote down in advance. An agent is given a goal and chooses its own steps as it goes. That one difference explains most of their strengths, their failure modes and the way the two now get combined. This article compares them using the vendors’ own documentation: UiPath, Microsoft Power Automate and Automation Anywhere for RPA, and Anthropic and Microsoft for agents that drive a screen. Vendor product pages are marketing, so their claims are labelled as claims.

How RPA works

UiPath describes RPA as software robots that take on repetitive, rule-based work such as keying in data, moving files or processing transactions, by imitating the way a person uses screens and systems. Automation Anywhere traces the idea back to the keystroke macros of the 1990s.

A concrete example is Power Automate desktop flows, Microsoft’s RPA tool for Windows. You build a flow from drag-and-drop actions or by recording yourself, and it can drive legacy software such as terminal emulators as well as modern web and desktop apps, Excel and folders. The bot finds what to click through UI elements, and each element is defined by one or more selectors that describe where it sits in the application’s structure. You can give an element several selectors; if the first one stops matching, Power Automate tries the next. That fallback list exists because selectors break when an interface changes.

RPA vendors usually split bots into two kinds. Automation Anywhere’s definitions:

  • Unattended bots run on triggers and schedules with nobody watching, typically for back-office work like data entry and system integration.
  • Attended bots are started by a worker on demand and help with interactive jobs such as customer service, keeping a person in the loop.

The weakness is input. Automation Anywhere says plainly that, without AI, RPA only works well with structured data, and that most business data sits in emails and documents. Anything the rules don’t cover becomes an exception for a human to handle.

How LLM agents work

Anthropic’s “Building effective agents” separates two kinds of LLM system. In a workflow, the model and its tools run along code paths you defined in advance. In an agent, the model directs its own process and decides which tools to use. In practice an agent is usually a loop: the model calls a tool, reads the result, and decides what to do next, checking the environment at each step to see whether it is making progress.

That design is what lets an agent read a messy email, work out what the sender wants and pick the right next action without a rule for every phrasing. It also brings costs Anthropic spells out: more latency and money than a single model call, and errors that can compound over many turns. Its advice is to start with the simplest thing that works, sometimes no agent at all, and to test agents in sandboxes with guardrails.

Agents that drive a screen

The newest overlap with RPA is the “computer use” agent, which operates a desktop instead of calling an API. Anthropic’s computer use tool gives Claude screenshot, mouse and keyboard actions. Your code runs each action on a machine you control and sends back the result, usually a new screenshot. A request declares the toolset like this (from Anthropic’s docs):

client = anthropic.Anthropic()
response = client.messages.create(
    model="claude-opus-5-5",
    max_tokens=1024,
    tools=[
        {"type": "computer_toolset_20260801"},
        {"type": "text_editor_20250728", "name": "str_replace_based_edit_tool"},
        {"type": "bash_20250124", "name": "bash"},
    ],
    messages=[{"role": "user", "content": "Save a picture of a cat to my desktop."}],
)

Microsoft offers the same idea inside Copilot Studio. You describe the task in natural language, and the agent runs it on a Windows machine you configure, which lets it work with systems that have no API. Microsoft says the tool adapts when buttons or screens change, which is exactly where selector-based bots struggle.

The docs are also candid about the limits. Anthropic says computer use can be too slow for interactive work, that the model may get click coordinates or tool choices wrong, and that it can follow instructions hidden in web pages or images (prompt injection). The two approaches can both drive a UI, but with opposite trade-offs: a bot fails loudly when the screen changes, while an agent keeps going and may go wrong quietly.

Side-by-side comparison

RPA botLLM agent
Who decides the stepsA developer, at design timeThe model, at run time
Best inputStructured data, fixed formsFree text, documents, varied requests
Reaches systems viaUI selectors, APIs, connectorsTool calls, APIs, or screen control
Typical failureStops when a selector or rule no longer matchesPicks a wrong action or misreads the screen and carries on
Speed and cost per runFast, predictableSlower; each step is a model call
Audit trailFixed steps, easy to replayNeeds logged reasoning and tool calls
Main security concernCredentials held by botsCredentials plus prompt injection

When to combine them

Both big RPA vendors now pitch the hybrid model, and their own diagrams tell you how they see the split. UiPath’s RPA page casts agents as the planners and robots as the execution layer, with people overseeing both. Automation Anywhere uses nearly the same framing for what it calls agentic process automation, describing RPA as the “arms and legs” of the system. Those are positioning statements from companies that sell RPA, but the division of labour is a reasonable one.

UiPath’s order-to-cash example shows how it fits together:

  1. Agent intake. An agent watches customer emails and portals, pulls out the order details and decides which workflow applies.
  2. Decision. The agent checks credit limits and stock. If everything passes it tells the robots to continue; if not, it sends the case to a person.
  3. Robot execution. Bots log into the ERP, create the sales order, raise the invoice and update inventory, following fixed business rules.
  4. Human in the loop. A price mismatch or missing stock goes to a person, and the automation resumes after they resolve it.

A simple rule falls out of this. Use the agent where the input is unstructured or the next step needs judgment. Use a bot or a direct API call for steps that must happen the same way every time. Put a human approval step in front of anything costly or hard to undo. For the human side of that design, see our guide to human-AI collaboration in agent products; for picking which tasks to automate at all, see automating repetitive tasks with AI.

Where a system has a proper API, call it from the agent as a tool rather than driving its screen. Tool calls are faster and easier to check than clicks (our explainer on function calling and tool use covers the mechanics). Keep screen control, by bot or agent, for systems that only offer a UI.

Governance

Whichever mix you choose, the controls the vendors recommend overlap a great deal:

  • Isolate the machine. Anthropic suggests a dedicated virtual machine or container with minimal privileges. Microsoft recommends dedicated machines for computer use and least-privilege accounts.
  • Restrict where it can go. Copilot Studio can limit computer use to listed websites and apps. Microsoft notes this blocks actions on other sites but does not stop the model from opening them.
  • Handle credentials deliberately. Copilot Studio can store sign-in details in Power Platform or Azure Key Vault. It warns that if you share an agent set to use the maker’s credentials, anyone using it acts with the maker’s access.
  • Require human sign-off. Anthropic advises having a person confirm actions with real-world consequences, such as financial transactions or accepting terms. Copilot Studio can email a named reviewer when it detects possibly harmful instructions.
  • Record what happened. UiPath’s platform pitch centres on capturing every agent action and human decision as one business-transaction record, and on deciding at design time which steps are agentic, deterministic or human. Automation Anywhere recommends a centre of excellence to set automation standards.

If you already run RPA, the low-risk path is to keep existing bots for the steps they do reliably and add an agent only where exceptions currently pile up for people. If you are starting fresh, more options are listed in our productivity and automation directory.

#RPA#AI agents#Automation#Computer use#Governance
AI

Written by AI Agents Directory

Editorial team

Facts in this guide are checked against official documentation and repositories, which are linked in the article.