Computer-Using Agents in Clinical Workflows: Technical Practice
This article explains how computer-using agents can operate existing healthcare software without deep API rewrites, covering perception–decision–action–governance design, prior-authorization and imaging-order flows, evaluation metrics, and human-in-the-loop controls.
From generating content to executing workflows
Healthcare IT has a persistent tension: core clinical systems are feature-rich, complex, and legacy-heavy, so full automation through APIs is often impractical in the short term. Clinicians still switch among multiple applications for referrals, discharge planning, imaging orders, insurance prior authorization, and other document-heavy work. Rule-based RPA handles fixed paths well, but UI changes, cross-system jumps, and unstructured information raise maintenance cost.
Computer-using agents do not require deep product redesign. They read the screen, locate controls, click, and type—similar to a human clerk—on existing interfaces.
Their loop is perception, decision, execution, and review. Perception uses screen pixels plus the OS accessibility tree to identify text boxes, buttons, menus, and scrollbars. Decision decomposes the goal and chooses the next action from page state. Execution uses mouse, keyboard, and window switching. Governance covers least privilege, sensitive-data protection, audit logs, and human confirmation. From the application’s perspective, access looks like a person at a keyboard and mouse, so agents can cover many systems with missing or incomplete APIs.
In publicly reported tests on electronic health record (EHR) inbox tasks, clinician-rated clinical-safety pass rates reached 99%. That figure applies to a specific evaluation set, task scope, and rubric. It does not mean the agent can make independent clinical decisions. It does indicate that, with clear boundaries and human review, agents can take high-volume, time-consuming process work and leave judgment and confirmation to clinicians.
Architecture: perception, decision, execution, and governance
Perception should fuse vision and structure. Pixels alone fail under resolution, themes, pop-ups, and occlusion. Accessibility trees alone may miss elements in old or custom-drawn clients. A dual channel is more robust: vision locates regions; the accessibility tree supplies role, name, hierarchy, and enabled state; text matching and coordinate checks stabilize targeting. Tables, notes, and insurance forms also need layout analysis and field extraction so similar fields are not filled in the wrong place.
Decision should constrain open-ended tasks to an auditable state machine. Healthcare workflows should not rely on unconstrained model improvisation. Split work into explicit nodes—for example: read patient message, sign in, retrieve history, draft the order, fill the authorization form, save pending, notify the physician. Each node defines inputs, outputs, allowed actions, and failure handling. Semantic understanding can run inside a node; transitions between nodes stay policy-bound.
Execution needs idempotency and recovery. Clicks fail, pages time out, dialogs block, sessions expire. Record page fingerprints before and after each step, cap retries on critical actions, and pause for a human on unrecognized screens instead of continuing blindly. Outbound submit actions should default to pending until a person sends or approves.
Governance is essential in care settings: least-privilege accounts, session isolation, field redaction, end-to-end logs, screen recordings or step snapshots, a takeover path, and replayable audit. Agents should not send patient replies, submit imaging orders, or complete insurance authorization on their own. Results belong in a clinician inbox or pre-review page. Human-in-the-loop is risk control, not merely lost efficiency.
Example path: imaging orders and prior authorization
For a patient with persistent low-back pain who needs MRI, the agent can ingest an inbox consult, identify task type and patient ID, sign into the EHR, and pull prior visits, physical therapy notes, and imaging. It can then draft three artifacts: a standards-aligned electronic imaging order, a progress note capturing exam findings and indications, and a reply draft for the patient. On the same workstation it can open the payer portal, fill prior-authorization evidence from extracted clinical facts, and save the form as pending.
The hard problem is cross-system semantic consistency: indications must map to order fields, payer required items must match clinical facts, and patient replies must not include unconfirmed conclusions. Systems need field-level checks, evidence citations, and conflict detection. Diagnoses, body sites, and prior treatments on the order should trace to source note fragments. Missing payer required fields should be flagged, not guessed.
Evaluation and rollout: shadow mode to allowlisted scale
Success is not only “did the task finish” but “was it safe.” Useful metrics include task success, key-field accuracy, clinical-safety pass rate, human takeover rate, mean handling time, rework, recovery from unexpected pages, and audit completeness. Early production can run in shadow mode: the agent drafts suggestions without executing, and staff compare outputs to human work. Then expand through low-risk, allowlisted scenarios.
For deployment, general container platforms, object storage, logging, and monitoring—including capabilities such as those from Baidu AI Cloud—can host the runtime. The core design remains permissions, audit, and human confirmation. Abstract flow:
task = receive_inbox_message()patient = extract_patient_context(task)records = read_ehr(patient)draft = generate_documents(records, task)fill_authorization_form(draft.clinical_evidence)save_as_pending(draft, authorization_form)require_human_confirm(doctor_or_authorization_staff)audit_log(step_snapshots, field_evidence, human_decision)
Implementation guidance
Success is not “can it drive a PC,” but whether engineering constraints are complete: clear task boundaries, least privilege, pause on critical actions, traceable outputs, smooth human review, and handover on exceptions. Enterprises should start with inbox triage, form prefill, and authorization packet assembly, then grow into cross-system flows. Builders should prioritize observability and audit over full autonomy. Only inside a controlled process do computer-using agents become production capacity rather than a demo.
