AI Browser Agents for Prior Authorization: API First, Portal Under Supervision
AI browser agents for prior authorization: use FHIR PAS or X12 278 first. On portal-only payers, code checks every screen and a human clicks submit.
Key takeaways
- Route each payer and transaction through a verified capability table to FHIR PAS or X12 278 first; use a browser agent only on reviewed, allowlisted portal flows.
- The model points at named fields and validated payload values; code checks URL, labels and form signature on every screen and halts on drift, MFA, CAPTCHA or unknown screens.
- Track completed, halted and silent wrong submissions by payer, reconcile every receipt against the payload, and turn each portal UI change into a regression fixture.
An AI browser agent for prior authorization belongs on exactly one kind of work: a payer portal with no API behind it. If the payer supports FHIR PAS or an X12 278 for the transaction, use that. If it doesn't, a model can drive the screen, but only under a supervisor. Code holds the data. Code checks every screen. A human clicks submit.
I've written about the API side of prior auth before. This post covers the work the API doesn't reach, and how I'd design an agent for it.
The benchmark numbers support that design. In HealthAdminBench, a public benchmark of computer-use agents on healthcare admin work, the best agent finished 38.3% of prior auth tasks end to end. I cite the arXiv v1 numbers throughout because other versions of the paper exist. Those runs used simulated portals with no MFA, no CAPTCHA and no session timeouts. Production portals can add all three.
Why portal-only prior auth isn't going away
CMS-0057-F requires impacted payers to stand up a Prior Authorization API, and CMS says it "must be implemented beginning January 1, 2027." I covered how CRD, DTR and PAS fit together in the CMS-0057-F FHIR prior auth API piece.
The rule only covers Medicare Advantage, Medicaid and CHIP fee-for-service, Medicaid and CHIP managed care, and QHP issuers on the federal exchanges. Commercial and employer plans are not on that list. Drugs are excluded from the API requirements as well. And imaging PA often goes through radiology benefit managers like eviCore and Carelon instead of the plan's own portal.
Flexbone states the gap plainly: electronic PA "does not cover the portal-only plans, the phone-only plans, or the endless status checks in between." That leftover work is real, and it's the only place a browser agent earns its keep.
Start with status checks, not submissions. A status check is read-only, so there's nothing to submit wrong. It's also repetitive, and it loops: Flexbone describes a 5–7 day Medicare Advantage concurrent-review cycle for post-acute care, which means the same case gets checked over and over. Pick one payer and one status workflow. Get the screen map, halts and audit trail right there. Only then move to forms that end in a submit button.
When to use a browser agent instead of the FHIR prior auth API
The first component is a router that decides whether the agent runs at all. Writing payer.supports() is easy. The hard part is the data behind it, which belongs in a capability table with one row per payer, transaction and channel.
def pick_channel(caps, payer, txn):
# caps: (payer, txn, channel) -> status, source, last_verified
for channel in ("fhir_pas", "x12_278"):
row = caps.get((payer, txn, channel))
if row and row.status == "verified" and not row.stale():
return channel
row = caps.get((payer, txn, "portal"))
if row and row.status == "allowlisted":
return "browser"
return "human_queue"
The rows start from payer companion guides and your clearinghouse's payer list. Neither one is proof. A row only counts as verified after a test transaction gets a valid response on that channel. stale() forces a recheck on a fixed cadence, and any rejected or unanswered transaction demotes the row on the spot. Record the source for each row so you can tell "the guide says so" apart from "we sent one and it worked."
Check both API channels for every payer. Don't assume. The X12 278 requirement still exists in regulation. A payer running an all-FHIR PA API that meets CMS-0057-F gets enforcement discretion for skipping the 278. A plan still may not require you to use FHIR instead of the 278. So one payer might offer PAS only, another only the 278, another both. Each payer that turns on an API is one less portal to automate.
The browser branch is an allowlist, not a default. A payer and transaction pair gets onto the list only after someone has walked the flow, mapped the screens and read the portal's terms of use. If those terms forbid automated access or require named users, the pair goes to the human queue.
How accurate are AI computer-use agents at prior authorization?
HealthAdminBench tests computer-use agents on 135 expert-designed tasks across an EHR, two payer portals and a fax system, all with synthetic data. The key finding is the gap between doing a step and doing the whole job. GPT-5.4 CUA succeeds on 82.8% of subtasks. The best agent, Claude Opus 4.6 CUA, completes only 36.3% of full tasks across prior auth, appeals and DME, and 38.3% of the prior auth tasks.
Three failure modes explain the gap:
- Information gathered in the EHR is needed later in the portal. Agents rarely go back for it, and they run out of step budget.
- Agents avoid file upload and download, so document handling fails across the board.
- Agents often fail to write key details to the scratch space they're given, and lose them over long runs.
The paper also notes that it doesn't capture interface drift over time, and that real portals rarely expose stable hooks like the data-testid attributes its setup relies on.
My read: the model handles single actions reasonably well and can't hold a long job together. So don't ask it to.
How to keep an AI agent from entering wrong data on a payer portal
The model proposes actions by reference. It names a field and a value from a validated payload. It never types patient values, credentials, URLs or selectors. A proposal is a small object like {"action": "fill", "field": "rendering_npi", "value_ref": "case.provider.npi"} or {"action": "click", "target": "continue"}. This is the same idea as giving a model typed tasks instead of raw FHIR tools.
Code looks up case.provider.npi in a payload that was validated before the run started. Code maps rendering_npi to a selector using a per-payer screen map. One state in that map looks like this (illustrative, not a real portal):
payer: example_health
states:
pa_service_details:
url_pattern: "/auth/new/step-3"
required_labels: ["Rendering Provider NPI", "CPT/HCPCS Code", "Date of Service"]
form_signature: ["renderingNpi", "svcCode1", "dos"] # input ids, in order
fields:
rendering_npi: "#renderingNpi"
cpt_code: "input[name='svcCode1']"
service_date: "#dos"
next: pa_attachments
pa_review:
url_pattern: "/auth/new/review"
required_labels: ["Review and Submit"]
gate: submit
If the model names a field that isn't in the current state's map, or a value ref that isn't in the payload, the action is rejected. Someone has to maintain this map by hand for each allowlisted flow. That's the cost of the browser branch, and it's why the router tries the APIs first.
This design addresses all three benchmark failure modes. The payload lives in code, so nothing has to be remembered across screens. Uploads are a deterministic step that attaches a known file to a known control. The model's job shrinks to reading the screen and picking the next move.
It also limits the security exposure. Portal pages are untrusted input. A banner, a note field or a payer message can carry text the model will read. If the model can only point at named fields and named values, injected text has very little to work with. More on that in why prompt injection is the main LLM attack surface.
Handling MFA, CAPTCHA and portal UI changes in a browser agent
This is where I disagree with the vendor pitch. Skyvern markets its AI as adapting to layout changes. On a payer portal, an agent that adapts its way through a changed form can put a value in the wrong box and keep going. I want it to stop instead.
Every step has an expected screen state. Code checks it before the model acts and again after.
expected = portal_map[payer].states[step]
seen = classify_screen(page, portal_map[payer]) # URL + labels + form signature
if seen.kind in {"mfa", "captcha", "unknown"} or seen.id != expected.id:
return halt(run, reason=seen.kind, shot=page.screenshot())
if expected.gate in {"submit", "attest"}:
return park_for_human(run)
classify_screen is not a model call. It matches the URL pattern and the required labels from the screen map. Labels alone can fool it, though. If a payer adds a second NPI input or reorders the form while keeping the same label text, the label check still passes and the selector now points at the wrong box. That's why the map also stores a form signature, the ordered list of input ids. If the field count or order changes, the screen doesn't match. When the screen isn't recognized, the run halts with a screenshot and the case goes to a person. A halt costs one person's attention on one case. A confident wrong submission costs a denial and the rework to fix it.
MFA and CAPTCHA are never automated around. They mean a human is needed. Skyvern's own rollout advice is to verify the real login and MFA flow before going live, and the benchmark doesn't test it. When the agent hits either one, a person logs in and the case goes back into the queue.
Submit and attest buttons are always gated. The agent fills the form, then parks. The reviewer doesn't get a bare screenshot. They get the screen next to the payload, field by field. That side-by-side diff is what keeps the human gate from turning into a rubber stamp.
Audit trail and credentials for every portal run
Every run saves a screenshot at each step and writes an audit row tied to the work item: payer, channel, portal account, actions taken, who approved the submit, and the portal's receipt or reference number. When someone asks why an auth went in with the wrong date, the answer has to come from the record, not from memory.
Portal credentials are scoped to each agent and pulled from a vault at run time. They never go into a prompt. Skyvern gives the same advice: use a credential store rather than putting passwords in task instructions, and keep an internal case ID that links the source record to the portal receipt. It's the same argument I made in SMART Backend Services for AI agents. If every bot and every human shares one login, the audit trail can't tell you who did what.
How to evaluate a prior auth browser agent
A single success rate hides the number that matters most. Track three outcomes, broken down by payer:
- Completed: the agent reached the submit gate, the human approved, and the portal returned a receipt that reconciles with the payload.
- Halted: the agent stopped on drift, MFA, CAPTCHA or an unknown screen. Safe, but not automated.
- Silent wrong submission: something went in that didn't match the payload, and nobody caught it before submit.
You won't see the third one unless you look for it. So every submit is followed by a reconciliation step. The agent reads the confirmation page, and later the status page, using the same screen map. Code pulls out the values the portal echoes back (member, NPI, codes, dates of service) and compares them to the payload by field label. A mismatch is a silent wrong submission, caught right away instead of at the next denial. Fields the portal never echoes back get marked unverified, so you know exactly where each payer leaves you blind.
The target for the third outcome is zero. Every instance is an incident with a root cause. A falling completion rate on one payer usually means their portal changed, so check the halt reasons. A nonzero wrong-submission rate means the gate is broken.
Every portal UI change that triggers a halt becomes a regression fixture: the saved page, the screenshot, the expected state and the correct actions. Update the screen map, then replay every fixture for that payer before the agent goes back on live cases. The HealthAdminBench environments and tasks are public, which makes them a reasonable smoke test before you have fixtures of your own. Fixtures from real portals are the eval that counts. The rest is the usual discipline from the honest guide to LLM evals: binary checks, split by segment, run on every change.
One more tradeoff. In the paper, fine-tuning an open-source model on just 100 training tasks raised held-out task success by 23 points and beat the best closed-source agent by 14. Your fixtures could double as a training set like that. But the benchmark data was synthetic, and yours isn't. Real portal screens carry PHI, so training on them puts your training pipeline under the same controls as the cases. And a better model doesn't let you remove a single gate.
The browser agent is a temporary bridge. Each payer that ships a working PAS endpoint or 278 means one less screen map to maintain. When a row in the capability table flips to verified, move that payer to the API branch and delete its fixtures.
Questions people ask
Should I use a browser agent or the FHIR prior authorization API?
Use FHIR PAS or X12 278 whenever the payer supports it for that transaction, confirmed by a test transaction and recorded in a capability table keyed by payer, transaction and channel. A browser agent is the fallback for portal-only plans and should only run on payer and task pairs someone has reviewed and allowlisted.
How accurate are AI computer-use agents at prior authorization?
In HealthAdminBench (arXiv v1), the best agent completed 38.3% of prior auth tasks end to end and 36.3% of full tasks overall, in simulated portals with no MFA, CAPTCHA or session timeouts. Agents did much better on individual subtasks than on whole workflows.
What prior auth work should a browser agent automate first?
Start with status checks on one payer and one workflow. They are read-only, repetitive, and include recurring loops like the Medicare Advantage concurrent-review cycle, so you can get screen maps, halts and audit trails right before automating forms that end in a submit button.
How do you detect a wrong submission by a prior auth browser agent?
After submit, the agent reads the confirmation and status pages, and code compares the values the portal echoes back against the validated payload by field label. Any mismatch is logged as a silent wrong submission, and fields the portal never echoes back are marked unverified.