Skip to content
Diagram of an AI agent clicking through a portal with no API, then a code script repeating the same workflow with zero model calls.

BlogIndustry News

RPA With AI: What CVS Health's Open-Source Agent Kit Teaches

OpenAI's healthcare agents are live, and CVS Health open-sourced the trick: let AI discover a workflow once, then run it as plain code.

On November 16, OpenAI announced computer-use agents for healthcare teams, with CVS Health, Cigna, Abridge and Ambience showing agents that click through EHRs and insurer portals that have no usable API. The headline numbers are good. The more useful part for anyone running operations is quieter: CVS Health open-sourced the kit behind its production agents, and it uses the model far less than you'd expect.

The pattern is RPA with AI, flipped. Instead of an AI agent reasoning through the same screens on every run, the agent figures out the workflow once, then engineers turn the successful runs into plain code that repeats it without any model calls. If you have staff copying data between systems all day, this is the design worth stealing.

TL;DR#

  • OpenAI's healthcare computer-use agents are live through its API and ChatGPT for Healthcare, and CVS Health already runs them in production on referrals, document sending and specialist consults.
  • CVS's open-source CUA Agent Kit uses an AI agent to discover a screen-based workflow, then converts successful runs into deterministic Playwright or pywinauto code.
  • For repeatable back-office work, "agent discovers, code executes" is cheaper and more predictable than running an agent every time. Keep the agent for the ambiguous cases.

What OpenAI and CVS Health actually shipped#

The announcement covers clinical and admin work: drafting orders, prior authorization requests, referrals and discharge planning. OpenAI reports that 99% of 325 reviewed EHR inbox tasks were rated clinically safe, and on Stanford's HealthAdminBench its cheaper GPT-6 Luna model scored 91.8% of rubric points at 8.5 cents per task. Those are vendor-reported numbers, so treat them as a direction, not a guarantee.

The production stories matter more. According to OpenAI, one CVS Health agent cleared a months-long document-sending backlog over a weekend, and another handles system steps for tens of thousands of consults a day. CVS wraps this in validation checks, human oversight, screenshots and action records. Cigna said its case managers used to jump between more than 10 systems to prepare for member outreach, and it went from concept to deployment in under eight weeks.

Ambience showed the approval side: on a prior authorization request, its agent stops and asks a clinician when the chart is ambiguous, then waits for sign-off before submitting. That's prior authorization automation with a human gate exactly where judgment is needed.

RPA with AI: discover once, run as code#

Here's how the CVS kit works, based on its README. A computer-use agent follows a workflow written in plain English and records screenshots, actions, targets and traces. Once runs succeed consistently, a Codex skill reads that evidence and writes deterministic code using semantic locators rather than screen coordinates. That code runs with no API key and no model calls.

plain-English task
      |
      v
[AI agent explores the UI] -> screenshots, traces, action log
      |
      v
[coding agent writes Playwright / pywinauto script] -> engineer review
      |
      v
[script runs daily, no LLM] -> evidence saved per run
      |
   breaks? -> traces go back to the coding agent for a fix, then review

Why not let the agent run every time#

The kit's README says it directly: discovering how to do something and doing it repeatedly are different problems. Asking a model to reason through identical steps on every run adds inference cost and variability to work ordinary code handles fine. Classic RPA had the opposite problem, where every new workflow took weeks of manual bot building. This design takes the cheap discovery of an agent and the predictability of a script.

RPA vs agentic AI: picking the right tool for each step#

People search for the difference between RPA and AI as if you have to choose one. You usually don't. You choose per step.

Classic RPAAgent on every runAgent discovers, code runs
Setup per workflowSlow, hand-builtFast, plain-English promptFast discovery plus review
Cost per runLowModel tokens every timeNear zero after codifying
Handles UI changesBreaksAdaptsBreaks, but AI-assisted repair
PredictabilityHighVariableHigh
Handles judgment callsNoYesRoute those to a human or agent
AuditabilityLogsNeeds good tracingCode plus per-run evidence

The honest trade-off: codified scripts still break when a portal redesigns its forms. What changes is the repair cost. Production traces go back to a coding agent, which proposes a fix that an engineer reviews and tests.

Is RPA considered AI? Traditional RPA isn't; it replays rules. The real question is where you need reasoning, and the answer is usually "in a few places, not everywhere."

What this means for businesses outside healthcare#

Healthcare is the showcase, but CVS says the kit applies beyond it, and the problem is everywhere. Freight portals, supplier dashboards, marketplace seller centers, government filing sites, old ERP screens: plenty of systems your team touches daily have no API, or an API that covers 80% of the actions.

A few practical implications:

  • API first, still. If a proper API or webhook exists, use it. Screen automation is the fallback for the gaps, and the CVS README frames it the same way.
  • Your unit cost drops after discovery. You pay for model reasoning while learning the workflow and when fixing it, not on the ten-thousandth run.
  • Evidence is sensitive. The kit warns that traces can hold credentials, cookies, session tokens and screen data, and its redaction is best effort. During discovery, credentials in the prompt are sent to the model. Plan storage, access and retention before you run this on real accounts.
  • Approval gates belong in the workflow, not bolted on later. The Ambience pattern (pause when unsure, wait for sign-off) works for refunds, supplier payments and compliance filings too.

How to put this pattern to work#

  1. List screen-based tasks. Pick work where people copy data between two or more systems, at volume, with stable steps.
  2. Check for APIs first. Cross off anything a real integration can handle.
  3. Write the workflow in plain English, including what "done" looks like and what should make the process stop.
  4. Run discovery in a test or low-risk account until the agent succeeds consistently. Authenticate in local code if credentials shouldn't reach the model.
  5. Codify and review. Treat the generated script like any other pull request: tests, readable selectors, assertions on final state.
  6. Add gates and logging. Human approval for anything irreversible, and per-run evidence stored encrypted with a retention policy.
  7. Keep an agent path for exceptions and measure runs, failures, repair time and hours returned to the team.

How MagicMakers Lab approaches this#

This is close to how we build Agentic Development and AI Integration work for clients: deterministic code for the steps that never change, an agent only where judgment or messy input shows up, and a human approval gate before anything that moves money or data out of the business. On Framico, automating the order pipeline end to end got the business to 200+ orders shipped a day with zero manual steps, and Business Hub shows the same thinking applied to three disconnected systems consolidated into one platform.

Key takeaways#

  • OpenAI's healthcare computer-use agents are in production at CVS Health, with validation checks, screenshots and human oversight around them.
  • CVS's open-source kit uses AI to discover a workflow and plain code to repeat it, cutting model calls from routine runs.
  • RPA with AI works best per step: scripts for stable steps, agents or people for judgment.
  • Run artifacts can contain credentials and personal data, so treat them as sensitive from day one.
  • Start with one high-volume, screen-based workflow and measure before expanding.

FAQ#

What is RPA with AI?#

RPA with AI combines rule-based screen automation with models that can read, reason and adapt. In the newer pattern CVS Health published, an AI agent learns a workflow by operating the real interface, then that knowledge is turned into ordinary scripts. AI handles discovery and repair, while code handles the repetitive daily runs at low cost.

What is the difference between RPA and AI agents?#

Traditional RPA replays fixed steps a developer configured, so it's fast and predictable but brittle when screens change. An AI agent decides its next action from what it sees, so it adapts but costs more per run and varies more. Most teams get the best results combining them, with agents limited to steps that need judgment.

Can AI agents automate prior authorization?#

Yes, with controls. OpenAI's partners showed agents gathering chart evidence and preparing prior authorization requests in insurer portals. Ambience's agent stops when the record is ambiguous and waits for clinician approval before submitting. Organizations handling patient data need eligible services under a Business Associate Agreement, plus audit logs and limited agent access.

Is it safe to give an AI agent login credentials?#

It can be, with care. The CVS kit notes that discovery sends credentials in the prompt to the model, and that traces may contain cookies and session tokens. Safer options are authenticating in local code before the agent starts, using an approved model endpoint, encrypting stored evidence and setting retention and access limits.

If your team spends hours a week moving data between systems that don't talk to each other, there's probably a workflow here that can be discovered once and run as code. We'll help you find it and tell you honestly where an agent is worth the cost. Book a free audit.

Sources#