Browser Agents for Internal Operations: Which Portal Tasks to Hand Over, and When a Script or API Wins
Every operations team has a list of portals with no API: the carrier site where proof-of-delivery files live, the supplier portal where invoices get disputed, the benefits portal, the government filing site, the admin screen of a tool bought in 2014. A browser agent demo that logs in and fills one of those forms looks like the end of that list. In practice, a runtime agent on a portal is the most expensive and least predictable way to do the job, and it is the right choice for a smaller set of tasks than the demo suggests. This guide gives an operations owner a rule for routing each portal task, a pattern that keeps the model out of the daily run where it can, and the checks that catch failures before they reach your records.
The short answer
Route each portal task, not each portal, in this order:
- Ask the portal owner for an export, a scheduled report, or an API. A CSV that lands in a mailbox every morning beats any automation.
- If the task is stable and repetitive, use a deterministic browser script. Use an agent to write it and to repair it when the page changes.
- Use a runtime browser agent only for variants that are too varied or too rare to script, and keep it read-only or draft-only where you can.
- Leave consequential, ambiguous, or rare one-off actions with a person, and have the automation queue them rather than guess.
Then run two checks on whatever you build: a known-answer test on each portal before the day's batch, and a second read that confirms every write landed.
What a browser agent is, and what the other routes are
A browser agent is a model that looks at a page (through screenshots, the accessibility tree, or the DOM) and decides which click or keystroke comes next. Open-source libraries such as browser-use and hosted tools such as OpenAI's computer use in the Agents API both work this way. The model chooses each step at run time.
A deterministic browser script is different. It is code, usually Playwright or a similar library, that performs named steps against named page elements in the same order every time. Traditional RPA tools sit in the same family. The Research Toolkit case study on API versus browser routes draws the line clearly: a script that targets named page elements and a model that selects actions from screenshots have different failure modes and different operating costs.
The current decision guides agree on the order. ALESO's comparison of API, RPA, and computer use says to pick the most stable controllable interface for each process step: API first, stable UI automation next, model-driven computer use only where visual variation cannot be handled economically with fixed rules. CellCog's guide to computer use versus API integrations puts the same idea as a principle: prefer the most structured action path that can complete the outcome, then verify the resulting state independently. Those guides are written for builders. The rest of this article turns them into decisions an operations owner can make about a real task list.
Why runtime agents disappoint on portals
Three properties of portals work against an agent that decides each step live.
Portals change without notice. A label moves or a survey modal appears. A script fails on the missing element. An agent tries to adapt, which means it can carry on against a page that no longer means what it meant last week.
Enterprise tasks are harder than demos. The EnterpriseOps-Gym benchmark tested agents on 1,150 tasks across eight domains, including HR, IT, customer service, and productivity tools, with persistent state and strict outcome checks. The best model it tested completed 34.1% of tasks, and the authors note that agents often failed to refuse tasks they could not do, which led to unintended side effects. That is one research environment, not a forecast for your portal, but it is a reasonable warning against assuming demo success rates carry over.
The model reads everything on the page, including text meant to steer it. Anthropic's computer use documentation warns that instructions on web pages or in images can override the user's instructions, and that the model sometimes assumes the outcome of an action without checking it. OpenAI's computer use guide tells builders to check the actual outcome instead of relying only on the model's final answer. If the vendors who sell the capability put outcome checking in their setup instructions, an operations owner should treat it as a requirement.
Practitioners report the cost side. The team behind the Libretto Show HN post spent a year maintaining browser automations for EHR and payer portals and reported that runtime agents relied on DOM parsing that was unreliable on older sites, used many model calls per run, and made it hard to know in advance what the agent would do. That is a vendor's account of why they built their own product, so treat it as an author report, but it matches what the official documentation implies.
Build a portal task inventory first
Before choosing any route, list the work. One row per task, not per portal, because the same portal often hosts a safe read and a risky write.
| Task | Portal | Runs per month | Read or write | Consequence of a wrong result | How often the page changed last year | Export or API available? |
|---|---|---|---|---|---|---|
| Download proof-of-delivery PDFs | Carrier portal | 400 | Read | Low: re-download | Rarely | Ask the carrier |
| Dispute an invoice line | Supplier portal | 30 | Write | High: money and supplier relations | Twice | No |
| Check claim status | Payer portal | 900 | Read | Medium: wrong follow-up | Often | Partial |
| Submit a quarterly filing | Government site | 4 | Write | High: legal | Yearly | No |
Fill in the last two columns from records, not memory. "How often the page changed" decides whether a script is cheap to keep alive. The export question is the one most teams skip, and it often removes the hardest rows. Many vendors offer scheduled reports, bulk exports, or partner APIs that nobody asked for because the portal login worked well enough.
Check the portal's terms at the same time. Some portals prohibit automated access, and CellCog's guide lists anti-automation or contractual terms among the reasons to avoid computer use altogether. If the terms say no, the route is an export request or a person, whatever the demo can do.
Route each task with four questions
Work down the inventory with these questions, in order. Stop at the first yes.
- Can the portal owner give us the data or the action another way? An export, a report subscription, an EDI feed, or an API. If yes, use it, and stop.
- Is the task stable, frequent, and well defined? Same fields, same order, same page most of the time. If yes, use a deterministic script.
- Is the task varied enough that a script would need constant rewriting, and is the consequence of an error low or reversible? If yes, a runtime browser agent can run it, with read-only or draft-only scope.
- Otherwise, the task stays with a person. Automation can prepare it (gather the documents, pre-fill a draft, open the right page) and queue it for a human to finish.
Two patterns come out of this. Reads usually route to an export or a script. Consequential writes usually route to a person with an automated preparation step, or to a script with a human approval in front of the final submit. Runtime agents end up with the messy middle: varied reads, triage across inconsistent pages, and drafts a person will check.
Use the agent to build the script, not to run the task
Most comparisons present the choice as scripts or RPA on one side and AI computer use on the other. There is a third option that is usually better than either. For a stable portal task, use the model at build time rather than run time: have an agent write and repair a deterministic script that replays with no model, and keep a runtime browser agent only for the variants the script cannot handle.
The Libretto authors describe exactly this shift, from giving an agent a prompt at run time to having coding agents generate real scripts you can read, run, and debug, combined with the site's own network calls where possible and an optional read-only mode that stops the agent submitting or modifying data. That is their product pitch, so weigh it accordingly, but the pattern itself does not depend on any product. It follows from what the official docs and decision guides already say:
- A script is reviewable before it runs. You can read every step it will take, which you cannot do with a runtime agent.
- A script fails loudly. When the page changes, the selector is missing and the run stops. One practitioner on X put the trade plainly: selector maintenance is ugly, but it fails loudly and shows up in a diff, while an agent moves that cost into per-run inference and quieter failures.
- A script costs the same on run 900 as on run 1. A runtime agent pays model calls on every run.
Our recommendation, as a synthesis of those sources rather than an external benchmark: for any task that scored "stable and frequent" in the inventory, have an engineer or a coding agent record one correct manual run, generate the script from it, review the script, and run it without a model. When the script breaks, use the agent again to propose the repair against the new page, review the change, and redeploy. The model does the part it is good at (reading an unfamiliar page and writing code for it) at the moment a person is watching.
Keep a runtime agent only for the share of cases the script cannot handle, such as a supplier whose invoice layout differs, or a claim status page that renders three different ways. ALESO's legacy ERP example has the same shape: an RPA flow enters validated fields into a stable form, and computer use is limited to two rare layout variants, in an isolated session, allowed to save only a draft.
Run a known-answer check before every batch
You also need a way to find out that a portal route has gone wrong. CellCog's guide recommends canary tests against supported configurations and lists UI drift as a production dependency. That is right, but an operations owner needs a more specific habit, because the dangerous failure is a run that completes and returns the wrong answer.
The TinyFish digest on Browser Use's evaluation work relays reports from that community of a site restructuring its flow and an automation that had run cleanly for weeks starting to return confident, wrong results, without erroring out. Another X post makes the same point about the missing contract: a browser agent signing in through a login page gets no version number, no status codes, and no scopes to revoke, so it breaks silently. Both are author reports, but they describe the failure the vendor docs warn about when they say to check outcomes rather than trust the final answer.
So run a known-answer check on each portal before the day's batch, using one record whose correct result you already hold, because a runtime browser agent that meets a changed page tends to finish confidently with a wrong result, while a broken script fails loudly. For each portal:
- Pick a record whose correct result you already hold and that will not change: a delivered shipment with a known proof-of-delivery reference, a closed claim with a known status, a test supplier account.
- Before the day's batch, run the route against that record and compare the output to the stored answer, field by field.
- If it does not match, stop the batch for that portal and alert the owner. Do not let the run "try again" on live records.
This costs one extra run per portal per day. It catches the case a script would have caught by crashing and a runtime agent hides by succeeding. It also tells you which route broke, which matters when a portal has a script for the common path and an agent for the variants.
Verify writes through a second read
For writes, a confirmation screen is not proof. CellCog's guide ranks verification methods from an independent API or database read down to "the agent says it clicked submit", which it treats as no evidence at all. Apply the strongest one the portal allows:
- After submitting, reopen the record through a different page (a search or list view) and compare the saved values to what was intended.
- Capture any server-assigned reference number and store it with the case.
- If the second read cannot confirm the write, mark the case as unverified and queue it for a person. Never resubmit on the assumption the first attempt failed, because duplicate disputes and duplicate filings are worse than a delayed one.
Keep session recordings or step logs for each run. One practitioner described session replays as the only way to tell whether an odd run was the model, the page changing, or a captcha. OpenAI's Agents API documentation also tells builders to review saved browser activity after a task.
Scope the session before it touches anything
Whatever route you pick, the login it uses defines what can go wrong. The official guidance is consistent: OpenAI's guide says to use an isolated browser or VM, an allow-list of sites and actions, and confirmation before purchases, data transmission (typing sensitive information into a form counts), and destructive changes. Anthropic's documentation recommends a dedicated virtual machine with minimal privileges, keeping login information away from the model, and limiting internet access to an allow-list of domains.
In operations terms:
- Ask the portal owner for a separate low-privilege user for automation, so actions are attributable and can be revoked without locking out a staff member.
- Give runtime agents read-only or draft-only accounts wherever the portal supports roles.
- Put a human approval in front of any submit that moves money, changes a legal record, or contacts a third party. A practitioner on X put the stakes this way: one wrong click in a supplier portal is real money.
Prompt injection through page content is a real risk for runtime agents and deserves its own design work; our guide to securing AI browser agents against prompt injection covers the containment controls, and validating AI agent tool calls before execution covers checks before an action runs.
Tradeoffs to accept up front
Scripts need an owner. Someone has to repair them when a portal changes, and the agent-assisted repair loop shortens that work but does not remove it. Budget for it in the inventory: a portal that changed twice last year will need roughly two repair sessions next year.
Runtime agents are slower and cost more per run, and their reliability on your portals is unknown until you measure it. Run any agent route in shadow first, comparing its output with the current manual result for a few weeks, before it touches live writes.
Some tasks will stay manual. That is a valid outcome of the routing exercise. Deciding which steps should run on their own, and which need a person, is the same judgement covered in our guide to human-in-the-loop AI governance.
How to tell it is working
After the first month, check four things per portal:
- The known-answer check ran before every batch, and every mismatch stopped the batch.
- Every write has a stored reference and a passed second read, or sits in the human queue.
- Script repairs were reviewed before redeployment, and you know how long each took.
- The share of cases going to a runtime agent or a person is stable or falling. A rising share means the script is drifting or the portal has changed more than the inventory assumed.
Next step
Take your five most-used portals and fill in the inventory table for every task on them this week. Send the export or API request for each read task before building anything. For the tasks that remain, mark which are stable enough for a script, pick one known-answer record per portal, and decide who approves each write. That list is the specification for a browser agent project that will still be working in six months. If you want help routing and building it, our AI workflow automation service builds and hands over portal routes like these, and an AI audit can produce the inventory first.