API Agents vs. GUI Agents: Divergence and Convergence

Chaoyun Zhang, Shilin He, Liqun Li, Si Qin, Yu Kang, Qingwei Lin, Saravan Rajmohan, Dongmei Zhang

TL;DR

While API-based LLM agents offer speed and reliable programmatic execution, GUI-based agents provide human-like visual grounding and broader applicability across systems lacking formal endpoints. This paper presents a systematic comparative study of both paradigms across nine core dimensions, introduces decision frameworks for when to deploy each, and demonstrates empirically that hybrid "API + GUI" agents substantially boost task success while cutting execution steps.

What Problem Does This Paper Address?

Autonomous software agents powered by large language models (LLMs) have split into two distinct execution paradigms:

  1. API-based agents: Rely on predefined programmatic endpoints, function calling, and structured data exchange (e.g., calling a calendar API directly).
  2. GUI-based agents: Rely on multimodal visual perception (screenshots, accessibility trees) to simulate human actions (clicks, typing, scrolling).

While both aim to translate natural language into computer actions, they differ fundamentally in operational overhead, security, flexibility, and maintenance. Until now, the community lacked a systematic analysis contrasting these paradigms, clear decision criteria for selecting between them, and exploration into how they can converge into effective hybrid architectures.

Methods

The authors structure their inquiry through a qualitative framework and an empirical prototype:

  • Taxonomy of Divergence: A dimensional comparison across nine attributes: Modality, Reliability, Efficiency, Availability, Flexibility, Security, Maintainability, Transparency, and Human-Like Interaction.
  • Convergence Mechanisms: An outline of how these paradigms intersect in practice, including:
  • API wrappers over GUI workflows (e.g., headless browser/RPA interfaces executing UI steps behind structured functions).
  • Unified orchestration engines that dynamically toggle between API calls and GUI interactions based on endpoint availability.
  • Low-Code / No-Code platforms abstracting both behind graphical visual workflows for citizen developers.
  • Hybrid Agent Prototype: The authors extend the UFO Windows OS agent framework, prioritizing API calls when available and falling back to visual GUI navigation. They implemented 12 task-specific COM-based APIs for Microsoft Office applications (Word, Excel, PowerPoint) covering actions like text selection, font formatting, and table manipulation.

Datasets

  • OSWorld Benchmark: The authors evaluated their hybrid prototype on a subset of 27 office-related tasks within OSWorld (a benchmark evaluating multimodal agents on open-ended computer tasks in real operating systems), specifically focusing on Word, Excel, and PowerPoint automation.
  • No new training datasets were created; the study evaluates foundation models (GPT-4o and o1) under zero-shot / few-shot agentic execution.

Key Insights and Ideas

  • Complementary Trade-offs: API agents provide high speed, strong security boundaries, and low token costs, but fail completely when endpoints are unavailable or unexposed (common in legacy enterprise systems and mobile apps). GUI agents offer universal coverage and visual auditability/transparency, but suffer from high step latency, visual parsing errors, and fragility against UI redesigns.
  • Hybrid Synergy Eliminates Failure Modes Differently by Model:
  • For GPT-4o, integrating APIs primarily fixes visual grounding failures (e.g., unannotated UI elements that the vision model misidentifies).
  • For reasoning-focused models like o1, APIs serve as execution "shortcuts," allowing the model's planning engine to dramatically compress multi-step GUI trajectories into single programmatic operations.
  • Convergence is Happening at the Software Layer: The boundary between API and GUI is blurring through headless browser automation, RPA abstractions, and unified workflow orchestrators that hide low-level execution mechanics from the end user.

Key Results

Evaluating on the 27 office tasks from OSWorld across GUI-only vs. Hybrid (GUI + API) configurations yielded:

  • Success Rate (SR):
  • GPT-4o: Increased from 16.3% (GUI-only) to 22.4% (Hybrid), a +6.1% absolute gain.
  • o1: Increased from 16.3% (GUI-only) to 24.5% (Hybrid), an +8.2% absolute gain.
  • Average Completion Steps (ACS) (computed on mutually solved tasks):
  • GPT-4o: Decreased from 13.8 to 12.9 steps (a 6.5% reduction).
  • o1: Decreased from 16.0 to 6.6 steps (a 58.5% reduction), showing that reasoning models aggressively leverage direct APIs to bypass tedious UI interactions.

Limitations and Future Work

  • Limited Empirical Scope: The quantitative experiment evaluated only 27 tasks across three desktop productivity applications (Office suite) using 12 hand-engineered COM APIs. Expanding evaluations to wider domains (web, mobile, operating-system-level actions) remains open.
  • Dynamic Decision Logic: The current hybrid approach relies on a simple rule (prioritize APIs if available). Building learned orchestrators that can dynamically decide at runtime whether an API call or a visual GUI action is safer or more cost-effective remains an active challenge.
  • Security vs. Universality: Enforcing strict access controls on GUI agents that possess general screen manipulation abilities remains difficult compared to endpoint-level API security.

Summary updated

BibTeX
@inproceedings{zhang2025api,
  author = {Chaoyun Zhang and Shilin He and Liqun Li and Si Qin and Yu Kang and Qingwei Lin and Saravan Rajmohan and Dongmei Zhang},
  title = {{API Agents vs. GUI Agents: Divergence and Convergence}},
  booktitle = {WCUA @ ICML},
  year = {2025},
  url = {https://openreview.net/forum?id=XuThXhPSQR},
}
Figure