MedUIGym: Evaluating and Training GUI Agents for Clinical Workflows

Yitong Qiao, Lei Liu, Yue Shen, Jian Wang, Jinjie Gu, Zhixuan ChuarXiv 2026

Imagine a world-class doctor. They’ve spent a decade in school, they know every symptom in the book, and they can diagnose a rare tropical disease from across the room. Now, sit that doctor down in front of a 15-year-old Electronic Health Record (EHR) system with a cluttered interface, three different login screens, and a "Save" button hidden in a sub-menu. Suddenly, they’re struggling.

This is the "GUI gap" in medical AI. We have models that can pass the USMLE, but they can’t actually use the software that runs modern hospitals. A new paper introduces MedUIGym, a massive interactive playground designed to teach AI agents how to stop just talking about medicine and start actually navigating the digital tools of the trade.

TL;DR

MedUIGym is a scalable environment that turns 17 different medical benchmarks into over 15,000 interactive tasks where AI agents must navigate a graphical interface (GUI) to complete clinical workflows. It reveals that while today’s models are "book smart," they struggle with the "visual tax" of clicking and typing through complex hospital software—but they can be trained to get much better at it.

What Problem Does This Paper Address?

Most medical AI research focuses on "text-in, text-out" tasks—like answering a multiple-choice question or summarizing a note. In the real world, however, clinical work is a series of actions: searching for a patient, filtering lab results, comparing a current CT scan to one from last year, and then clicking through menus to order a new test.

Current agents usually interact with medical data through "tool calls" (basically talking to a database via an API). But real EHRs are dense, visual, and messy. There is a massive need for agents that can "see" a screenshot and "act" with a mouse and keyboard. MedUIGym addresses this by providing a unified, verifiable environment where agents are judged not just on their final answer, but on whether they successfully navigated the interface to get there.

Methods

The researchers built a high-fidelity EHR sandbox that looks and feels like a real hospital application.

The MedUIGym environment allows agents to perceive EHR states from screenshots and execute mouse-and-keyboard actions.

Key technical features include:

  • Dual-Interface Evaluation: Agents can be tested using either the visual GUI or a "native tool" (direct database access). This allows researchers to measure exactly how much harder the visual interface makes the task.
  • Scalable Trajectory Collection: The system can run many agents in parallel, recording their "trajectories" (the sequence of screenshots and clicks).
  • Training Support: It supports both Offline Learning (Supervised Fine-Tuning from successful human/agent paths) and Online Reinforcement Learning (where the agent explores the environment and gets a "reward" for successfully saving an order or finding the right data).

Datasets

The authors didn't just create one new dataset; they unified 17 existing benchmarks into one format. This includes:

  • Internal Training/Validation: 9,773 tasks from sources like MIMIC-III, eICU, and EHR-Complex.
  • External Validation: 5,966 tasks from "out-of-distribution" sources like PhysicianBench and MedAgentBoard to see if the agents can generalize to software they haven't seen before.
  • Total Scale: 15,739 tasks across six clinical families, ranging from simple information retrieval to complex clinical decision-making.

Key Insights and Ideas

  • The "GUI Tax" is Real: Models perform significantly worse when they have to use the visual interface compared to direct database queries. For example, on one set of tasks, a model's score dropped from 64.7% (native tool) to 44.7% (GUI). Navigating menus is a skill in itself.
  • "Thinking" Isn't a Silver Bullet: The researchers tested models with "thinking" enabled (like Qwen3.5-397B-Thinking). While it helped on complex queries, it actually lowered performance on some outcome prediction tasks. More reasoning doesn't always mean better clinical judgment.
  • Workflows are the Final Boss: Models are decent at finding a single lab value. They are terrible at "workflows"—multi-step processes like assessing renal function, selecting an antibiotic, and documenting the decision.
  • Training Works: By fine-tuning models on GUI trajectories using Reinforcement Learning (specifically a method called GRPO), the researchers saw massive improvements (up to +13 points), proving that "EHR navigation" is a learnable behavior for AI.

Key Results

  • Top of the Class: GPT-6.1 Terra (max) was the frontier leader, achieving an average score of 76.6% across the internal benchmarks.
  • Open Source Gains: After training in MedUIGym, the Qwen3.5-9B model saw its average score jump from 6.8% to 20.0%, a nearly 3x improvement.
  • Error Patterns: Most failures weren't due to medical ignorance. Instead, agents suffered from "mistargeted actions" (clicking the wrong button) or "configuration errors" (messing up the filters in a search).
Figure 6. GUI interaction errors.

Limitations and Future Work

While MedUIGym is a huge step forward, the authors acknowledge it’s still a simulation. Real-world EHRs are even more chaotic, with network lag, pop-up alerts, and inconsistent data entry from human staff.

Future work will likely focus on:

  1. Long-horizon tasks: Workflows that span days or weeks of a patient's stay.
  2. Multi-agent collaboration: Having different AI agents handle different parts of the hospital (e.g., one for pharmacy, one for nursing).
  3. Reducing the "GUI Tax": Developing better vision-language models that can parse dense, text-heavy interfaces as easily as humans do.

Summary updated

Abstract

Automating clinical workflows requires vision-language agents that can navigate dense graphical user interfaces (GUIs) in electronic health records (EHRs) and execute precise actions, yet many medical agents still rely on text or structured tool calls. In this work, we introduce MedUIGym, a scalable interactive environment comprising 15,739 tasks from 17 benchmark sources across six clinical task families for training and evaluating clinical GUI agents. In MedUIGym, agents perceive EHR states from screenshots and execute mouse-and-keyboard actions, as well as a paired native-tool interface over identical clinical data. The environment verifies both final answers and required clinical actions, and supports parallel trajectory collection for training. Benchmarking twelve vision-language models shows that current agents struggle across diverse clinical workflows, and simply increasing reasoning effort fails to yield consistent gains. Furthermore, MedUIGym supports offline learning from GUI trajectories and online reinforcement learning from task rewards. After training, both Qwen3.5 models perform better on in-domain clinical tasks and generalize to tasks from external sources. By unifying tasks from existing benchmarks, dual-interface evaluation, and GUI trajectory collection, MedUIGym provides a testbed for studying how vision-language agents complete clinical tasks through the EHR's graphical interface. Our project page is available at https://github.com/yitong-qiao/MedUIGym.
BibTeX
@misc{qiao2026meduigym,
  author = {Yitong Qiao and Lei Liu and Yue Shen and Jian Wang and Jinjie Gu and Zhixuan Chu},
  title = {{MedUIGym: Evaluating and Training GUI Agents for Clinical Workflows}},
  year = {2026},
  eprint = {2611.30983},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.30983},
}
Figure