API, RPA or Computer Use
In this article
- Place each system a business step touches on the ladder (API or connector, deterministic workflow, RPA, computer use) and say why a higher rung was or was not enough.
- Explain why the screen rungs are slower, costlier and more fragile than an API, naming UI drift, sign-in prompts, partial submissions and irreversible clicks.
- Name the postcondition that proves a step worked, read from the system of record, and say which screen actions need a person to confirm them.
- Terms defined here: computer-use agent, DOM, UI drift.
Overview
An AI model that can look at a screen and click can, in principle, reach any software a person can. That makes it tempting as the answer to every integration problem, and it is usually the wrong one. A model working the screen is the slowest, most expensive and least predictable way to reach a system, so you use it only where nothing more structured exists, and you never take its word that the job is done.
The example is one business step, recording each supplier invoice in the company's books, which touches three systems that each end up on a different surface. The company, its systems and its volumes are invented.
What a computer-use agent is
A computer-use agent is an AI system that operates software the way a person does: it inspects the interface, picks an action, carries it out and checks what happened [1]. The model itself never touches the machine. With Claude's computer use tool, the model replies with requests to run tools such as screenshot, left_click or type, and your application performs each one in a virtual machine or container you control and sends the result back [2]. That application code is the harness: the model proposes, the harness acts.
One turn of that exchange, on a supplier's invoice page:
- The harness takes a screenshot and sends it to the model.
- The model asks for one action:
left_clickat a coordinate, the pixel where it sees the "Download" button of the March row. Coordinates are in the pixel space of the screenshot [2]. - The harness clicks there and takes a new screenshot.
- The model reads it and proposes the next action, or answers that the task is done.
A screenshot is only pixels, and the model has to interpret them. A web page also has a structure that code can read: the DOM, the tree of nodes the browser builds when it parses the page's HTML, one node for the title, one for each heading, paragraph or script [3]. Claude's browser use tool works with a page both ways, through its structure and through screenshots with viewport coordinates [4]. Playwright MCP gives the model a structured snapshot of the page and by default needs no screenshots or vision model [5].
The ladder
There are four ways for a program to reach a system. Order them by how much structure the program gets back, and take the highest one that works:
- Supported API or connector. The system documents a way for programs to read and write its data, or your automation platform ships a connector, a ready-made integration for that system. A call returns data or an error.
- Deterministic workflow. A workflow whose steps and paths are fixed in code ahead of time. It fits a system with no live API that still hands over structured data, such as an export file your code reads each night.
- RPA, robotic process automation: a script that replays fixed clicks and keystrokes in a user interface. Power Automate desktop flows are one product of this kind: you record a flow or build it from actions, run it later, and it can drive old programs, even terminal emulators, through interface elements, images or screen coordinates [6]. Code still decides every step; only the surface has moved to the screen.
- Computer use. A model reads the screen and chooses each action. It reaches places nothing else reaches, which is exactly why it comes last.
Each rung down trades structure for reach. RPA reaches any screen and needs no model, but it follows one recorded path. A computer-use agent can often cope when the screen changes, but every action is a model decision that can be wrong: Claude can make mistakes in the exact coordinates it outputs, and reliability can be lower in niche applications [2].
The ladder is mechanical enough to write down. This sketch takes three facts about a system and returns a rung:
def pick_surface(has_api, has_export, screen_stable):
if has_api:
return 'API call'
if has_export:
return 'workflow reads the export'
if screen_stable:
return 'RPA flow'
return 'computer use, bounded'
SYSTEMS = {
'ERP': (True, False, True),
'desktop accounting app': (False, False, True),
'supplier portal': (False, False, False),
}
for name, facts in SYSTEMS.items():
print(f'{name}: {pick_surface(*facts)}')Hold off on its output until you have placed the three systems yourself.
Three systems, one step
- The ERP, the company's main business system for orders and accounts, has a supported API and takes about 2,000 updates a day.
- The legacy desktop accounting app has no API. Its screens do not change between runs.
- The supplier portal is the supplier's website. A clerk signs in, opens the invoice list, downloads each new invoice and checks its status column, which reads "received" once the supplier has logged it. The portal has no API, the supplier redesigns it when it likes, and about 40 invoices a month pass through it.
Before reading on, pick a rung for each system and say why the rung above it was not enough.
The script prints:
ERP: API call
desktop accounting app: RPA flow
supplier portal: computer use, bounded| system | surface | why this rung | why not a higher rung |
|---|---|---|---|
| ERP | API call | structured, fast, failures come back as errors | none higher: top rung |
| desktop accounting app | RPA desktop flow | stable screen, fixed steps, no model needed | no API, no export file |
| supplier portal | computer use, bounded | only a screen exists, and it changes | no API, no export; a flow tied to positions or images breaks on each redesign |
Why not let the agent update the ERP too, since it can work any screen? Volume and cost. Declaring Claude's computer toolset adds about 4,500 input tokens to each request, and each screenshot adds roughly 1,000 to 1,800 more [2]. Even at a floor of one request with one screenshot per update, 2,000 updates come to 11.0 to 12.6 million input tokens a day. The 40 portal invoices cost 220,000 to 252,000 tokens a month on the same floor. Over a 30-day month the ERP has 1,500 times the portal's volume, and every one of those updates is a chance to click the wrong row, where one API request would do the same work and fail loudly.
Speed points the same way. Anthropic warns that computer use may be too slow next to a person doing the same actions, and suggests it for work where speed is not critical, such as background information gathering or automated testing [2]. Forty invoices a month fit that; a live ERP feed does not.
Rung 2 is not the surface of any system here, because none offers an export. It is the frame around the whole step: a workflow in code fixes the order (portal, desktop app, ERP, check) and hands control to a model only inside the portal part.
What goes wrong on the bottom rung
The portal is the one place a model acts, so it is where the step fails.
- [[ui-drift|UI drift]]. The supplier ships a redesign, or a banner slides in and pushes the invoice table down. Positions on a screen are fragile when the layout shifts or reflows [4]. A recorded flow clicks where the button used to be. An agent may find the button again, or may misread the new page and click the wrong row. A page reference from the structure survives layout shifts better than pixel coordinates do [4].
- Session timeout. The portal logs the agent out halfway through. The harness has to notice the sign-in page and decide what to redo, not let the model guess.
- MFA prompt. Multi-factor sign-in sends a code to a person's phone, and a CAPTCHA exists to stop software. Both are a hand-off to a person, never something the agent solves. Giving the model login credentials at all raises the risk of a page tricking it with instructions planted in the content [2].
- Partial submission. The session drops after "Submit" was clicked but before the confirmation loaded. Clicking again may log the invoice twice, so the harness reads the current state before any retry.
- Irreversible click. The same portal has a "Pay" button. A payment is a side effect with no simple undo, and Anthropic advises asking a person to confirm actions with real-world consequences, such as financial transactions [2].
- Wrong account. The browser is still signed in to a sister company's account. Every screen looks normal and the invoices land in the wrong books, so the harness checks the signed-in account before the first action.
The decision matrix
Put the three systems side by side. The last row is the postcondition: the state that must exist afterwards, and where code reads it.
| question | ERP | desktop accounting app | supplier portal |
|---|---|---|---|
| interface | supported API | stable screen, recorded flow | changing web pages, no API |
| credential model | API credential held by the program | a sign-in on the robot's machine | portal account; a person handles MFA and CAPTCHA |
| failure detection | error response | flow stops on a missing element | agent may not notice; check the books |
| safe to replay? | yes, if the invoice number is the key | after checking the entry exists | only after reading the current state |
| latency and cost | one request | seconds per screen, no model | a model call and a screenshot per action |
| owner | ERP integration team | automation team | agent owner plus a finance reviewer |
| postcondition | invoice in the ERP | entry in the app's ledger | status "received" read from the books |
The last row is the point. On the portal, a final screen saying "Invoice received" is what the agent saw, not proof. Code reads the system of record, the books, whose data counts as the truth, and confirms that the invoice is there with status "received" in this company's books and not a sister company's. OpenAI's computer-use sample says the model's answer alone does not prove success [1], and Anthropic notes that Claude sometimes acts as if an action worked without checking [2]. Where a portal path can move money, a person confirms that click before the harness performs it.
The matrix carries over to any step. For each system, ask what interface exists, who holds the credential, how a failure shows up, whether a rerun is safe, who fixes it when it breaks, and what record proves it worked. A screen rung that cannot answer the last question with a read from a system of record is not ready to run unattended.
Common mistakes
- An agent where an API exists. Symptom: thousands of ERP updates a day go through screens, slowly and with misclicks. Fix: call the API; keep computer use for systems without one.
- Trusting the final screen. Symptom: the run reports success and the books show nothing. Fix: read the postcondition from the system of record after every run [1].
- RPA on a screen that keeps changing. Symptom: the flow fails after each supplier redesign. Fix: RPA for stable screens only; a changing site goes to a bounded agent, or better, to an API the supplier adds.
Sources
- Computer Use Sample Apps (openai-cua-sample-app README). OpenAI (openai-cua-sample-app). Checked 29 Oct 2026.
- Computer use tool. Anthropic. Checked 24 Oct 2026.
- Get started viewing and changing the DOM (Microsoft Edge DevTools). Microsoft (Edge developer docs). Checked 21 Nov 2026.
- Browser use tool. Anthropic. Checked 21 Nov 2026.
- Playwright MCP README. Microsoft (playwright-mcp). Checked 29 Oct 2026.
- Introduction to desktop flows (Power Automate). Microsoft (Power Automate docs). Checked 29 Oct 2026.
Check yourself
Check yourself
Question 1 of 13
A system has no API but writes a nightly export file. Which rung fits?
Your first check counts towards your result.