Source-linked AI summary
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
API- and GUI-based LLM agents both automate software tasks, but the field lacks a unified comparison guiding when to use either paradigm or combine them. This paper systematically compares their divergence and convergence, examines hybrid orchestration, and finds that combining GUI and API actions improves success rates and reduces execution steps. It argues that continuing advances will increasingly blur the boundary between API-centric and GUI-centric automation.
Problem
Existing research lacked a unified comparative framework explaining when API or GUI agents outperform one another and whether hybrid strategies can combine their strengths.
Source: §1 · pp. 1–2Method
Results
Combining GUI and API actions increases SR by 6.1% for GPT-4o and 8.2% for o1, while reducing steps by 6.5% and 58.5%, respectively, versus GUI-only execution.
Source: §4.2 · p. 6Takeaways & Limitations
API agents provide speed, security, and reliability, GUI agents provide flexibility and broad applicability, and hybrid systems can combine these complementary strengths.
Source: §3.10 · p. 5, §4 · p. 5, §6 · p. 8
Abstract
from arXiv · showhide
Large language models (LLMs) have evolved beyond simple text generation to power software agents that directly translate natural language commands into tangible actions. While API-based LLM agents initially rose to prominence for their robust automation capabilities and seamless integration with programmatic endpoints, recent progress in multimodal LLM research has enabled GUI-based LLM agents that interact with graphical user interfaces in a human-like manner. Although these two paradigms share the goal of enabling LLM-driven task automation, they diverge significantly in architectural complexity, development workflows, and user interaction models. This paper presents the first comprehensive comparative study of API-based and GUI-based LLM agents, systematically analyzing their divergence and potential convergence. We examine key dimensions and highlight scenarios in which hybrid approaches can harness their complementary strengths. By proposing clear decision criteria and illustrating practical use cases, we aim to guide practitioners and researchers in selecting, combining, or transitioning between these paradigms. Ultimately, we indicate that continuing innovations in LLM-based automation are poised to blur the lines between API- and GUI-driven agents, paving the way for more flexible, adaptive solutions in a wide range of real-world applications.
1. Introduction
LLM agents translate natural-language requests into actions through API-based or GUI-based interactions, which differ in speed, resource demands, and interface requirements. The paper compares these paradigms and investigates hybrid strategies for selecting or combining their strengths.
1. Introduction
- API agents interact with documented endpoints and can automate tasks efficiently, scalably, and interoperably, whereas GUI agents use multimodal understanding to manipulate visual interfaces.API-based systems are exemplified by function and service orchestration, while GUI-based systems support desktop, mobile, and web applications through screen-based interaction.Source: §1 · p. 1
- Scheduling a Google Calendar meeting can require one authenticated API call or multiple GUI actions involving navigation, field entry, and button clicks.The API route is faster and more resource-efficient but depends on reliable endpoints; GUI execution is broader but slower and more error-prone.Source: §1 · pp. 1–2, Figure 1 · p. 2
- Existing work lacked a unified comparative framework explaining when API or GUI agents perform better and whether hybrid strategies can combine their strengths.This gap motivates examining differences, overlap, and practical selection criteria.Source: §1 · p. 2
- The paper systematically analyzes divergence and convergence across the two paradigms, then proposes hybrid approaches and decision criteria based on project requirements, resources, and user-experience objectives.Its intended audience includes academic and industry practitioners choosing, combining, or transitioning between agent types.Source: §1 · p. 2
2. Background
API-first and GUI-first agents both translate natural-language requests into actions, but they differ in how they access and control software. API agents invoke predefined functions, while GUI agents interpret and manipulate visual interfaces through human-like actions.
2. Background
- LLM agents share the goal of converting natural-language instructions into actionable commands, forming API-first and GUI-first paradigms according to their system interaction mode.The background frames these paradigms as the foundation for comparing their operational differences.Source: §2 · p. 2
2.1. API-Based LLM Agents
- API-first agents invoke predefined tools, plugins, or function calls, selecting APIs and populating parameters from user intent rather than generating full program code.This constrained action space supports reliability, safety, and simpler decision-making; API descriptions, parameters, and schemas are supplied in the prompt.Source: §2.1 · pp. 2–3
2.2. GUI-Based LLM Agents
- GUI-based agents use screenshots, accessibility trees, or metadata to plan and execute clicks, drags, keypresses, and other actions on interface elements.Their human-like workflow requires visual layout interpretation and control localization rather than endpoint invocation.Source: §2.2 · p. 3
- GUI agents support software testing, workflow automation, and accessibility, but research continues to address screen parsing, error handling, and robust action planning.Together with API agents, they form a complementary approach whose suitability depends on project goals and constraints.Source: §2.2 · p. 3
3. Divergence Between API and GUI Agents
API and GUI agents pursue the same automation objective but diverge in modality, efficiency, and reliability. APIs favor structured, low-latency execution, whereas GUIs provide human-like interaction at greater operational and visual complexity.
3. Divergence Between API and GUI Agents
- The comparison evaluates API and GUI agents across modality, reliability, efficiency, availability, flexibility, security, transparency, human-like interaction, and maintainability.These dimensions frame the practical distinctions between the paradigms and their real-world effects.Source: §3 · p. 3
3.1. Modality
- API agents interpret endpoint specifications and provide parameters, while GUI agents process screenshots or accessibility trees and manipulate interface controls through visual grounding.The interaction modality determines whether the agent selects structured functions or navigates visible elements.Source: §3.1 · p. 3
3.2. Efficiency
- API agents generally complete complex tasks in a single function call, whereas GUI agents often require sequential menus, typing, and clicks that increase latency and computational overhead.The additional user-like steps can limit practical applicability when execution becomes significantly slower than human performance.Source: §3.2 · p. 3
3.3. Reliability
- Stable, well-defined API endpoints support predictable and maintainable performance, while changing GUI layouts and multi-step decisions increase visual-planning errors and reduce accuracy.GUI workflows therefore require ongoing refinement and remain less production-ready in many scenarios.Source: §3.3 · pp. 3–4
3.4. Availability
API availability depends on developer-exposed functions, whereas GUI agents can access nearly any application with a visible interface. This broader GUI reach requires stronger interpretation and error handling for diverse or changing interfaces.
3.4. Availability
- API agents cannot directly perform functions whose endpoints developers have omitted, a constraint that is especially common in mobile applications with restricted external access.Their availability is bounded by the functions and services explicitly exposed to the agent.Source: §3.4 · p. 4
- GUI agents can interact with virtually any application presenting a graphical interface, without requiring explicit API definitions.This universality is advantageous where formal APIs are unavailable, but diverse or evolving interfaces demand more sophisticated interpretation and error handling.Source: §3.4 · p. 4
3.5. Flexibility
API and GUI agents differ in flexibility, security, and maintainability: GUI agents adapt across visible interface elements, while API agents offer more controlled and stable operation.
3.5. Flexibility
- GUI agents can theoretically operate on any visible interface element, whereas API agents are limited to developed, documented, and integrated endpoints.GUI flexibility depends on multimodal reasoning that can consistently locate and interact with UI objects.Source: §3.5 · p. 4
3.6. Security
- API agents support granular endpoint-level authentication, access control, and rate limiting, while GUI agents require safeguards against unintended privileged or destructive operations.Human-oriented graphical interfaces make comprehensive security enforcement for automated interactions challenging.Source: §3.6 · p. 4
3.7. Maintainability
- API agents are easier to maintain because versioned, standardized endpoints preserve agent logic and allow new APIs to be integrated through descriptions.GUI redesigns, pop-ups, layout shifts, and renamed or relocated elements can break automation and increase maintenance costs.Source: §3.7 · pp. 4–5
3.8. Transparency
Transparency differs by interaction mode: API agents execute largely invisibly, whereas GUI agents expose their clicks and text entries for observation, intervention, and verification.
3.8. Transparency
- API agents typically hide endpoint-level execution and present users mainly with the final outcome rather than the underlying process.Their behind-the-scenes operation provides limited visibility into how a task was fulfilled.Source: §3.8 · p. 5
- GUI agents make each click and text entry visible, enabling users to observe, intervene in, or adjust workflows during execution.This visibility supports step-by-step verification, training simulations, and tasks requiring visual confirmation.Source: §3.8 · p. 5
3.9. Human-Like Interaction
GUI agents simulate human interactions through visible, sequential interface actions, while API agents execute programmatic calls; the paper presents hybrid solutions as a way to combine their strengths.
3.9. Human-Like Interaction
- GUI agents replicate human actions such as navigating menus, filling forms, and interacting with interface elements sequentially.This human-like execution improves interpretability and supports a more intuitive user experience (Lin et al., 2025).Source: §3.9 · p. 5
- API agents prioritize efficiency, reliability, and scalability through direct function calls, whereas GUI agents provide more interpretable user-level execution.The paradigms therefore differ in whether automation is optimized for programmatic performance or human-like understanding.Source: §3.9 · p. 5
3.10. Summary
- API agents offer efficiency, security, and reliability with robust endpoints, while GUI agents provide broad applicability and user-like workflows but face visual-parsing, interface-change, and speed challenges.Selecting between them, or designing hybrid solutions, requires understanding these divergent properties.Source: §3.10 · p. 5
4. Convergence and the “Hybrid” Approach
API and GUI agents are not mutually exclusive: hybrid systems combine programmatic efficiency with GUI coverage and human-like interaction. The section presents wrappers, orchestration tools, low-code platforms, and experiments showing how this convergence improves automation.
4.1. API Wrappers Over GUI Workflow
- API wrappers expose GUI-driven applications through structured commands, improving efficiency, scalability, and integration with enterprise automation pipelines.These wrappers retain GUI workflows underneath while reducing the need for dedicated GUI-agent interaction.Source: §4.1 · pp. 5–6, Table 2 · p. 6
4.2. Unified Orchestration Tools
- Unified orchestration tools select APIs for suitable tasks and GUI agents when APIs are unavailable, shielding users from low-level implementation choices.A loan-approval workflow can use a credit-score API and switch to GUI navigation for CRM updates lacking an API.Source: §4.2 · p. 6, Figure 4 · p. 6
- Adding APIs raised Success Rate by 6.1% for GPT-4o and 8.2% for o1 compared with GUI-only execution.GPT-4o mainly avoided control-detection failures, whereas o1 used API shortcuts to address planning errors.Source: §4.2 · p. 6, Table 3 · p. 6
- Hybrid execution reduced completion steps by 6.5% for GPT-4o and 58.5% for o1 relative to GUI-only execution.The larger o1 reduction reflects strategic API use to bypass multiple GUI interactions.Source: §4.2 · p. 6
4.3. Low-Code / No-Code Solutions
- Low-code and no-code platforms let users visually compose workflows that combine API calls for services with GUI agents for legacy-interface verification.This approach hides protocol details while preserving the logical sequence of end-to-end automation.Source: §4.3 · pp. 6–7, Figure 5 · p. 7
4.4. Summary
- Hybrid agents combine GUI flexibility with API reliability and performance, broadening automation across data processing and visual interface validation.The paper frames convergence as a way to support diverse requirements while adapting to evolving software ecosystems.Source: §4 · p. 5, §4.4 · p. 7
5. API vs. GUI Agents: Strategic Considerations
Agent selection depends on software access, validation needs, and sustainability requirements. APIs suit stable, documented integrations; GUI agents cover inaccessible or visually interactive systems; hybrid workflows combine both and can evolve as APIs become available.
5.1. When to Favor API Agents
- Stable, documented APIs are preferred for backend integrations and mission-critical workflows because they offer speed, reliability, controlled access, and lower maintenance.Versioned endpoints can avoid complete interface overhauls when systems change.Source: §5.1 · p. 7
5.2. When to Favor GUI Agents
- GUI agents are relevant when APIs are absent or incomplete, particularly for mobile, legacy, proprietary, or visually validated applications.They can confirm on-screen text and layout without modifying underlying systems or building new integrations.Source: §5.2 · p. 7
- GUI agents are preferred for interactive graphical tasks such as animation, Photoshop drawing, and complex design-tool manipulation.These tasks are naturally performed through direct visual interaction rather than API commands.Source: §5.2 · pp. 7–8
5.3. When to Consider a Hybrid Approach
- Hybrid workflows use APIs for data-intensive operations and GUI agents for specialized front-end interactions or visual validation.Tasks can transition from GUI to API execution as new programmatic interfaces become available.Source: §5.3 · p. 8
5.4. Summary
- The selection framework weighs target-software access, integration and validation requirements, and long-term sustainability.API, GUI, and hybrid paradigms respectively emphasize reliable performance, interface access and visual confirmation, or adaptability across evolving ecosystems.Source: §5 · p. 7, §5.4 · p. 8, Table 4 · p. 8
6. Conclusion & Looking Forward
API and GUI agents differ in operating principles, performance profiles, and applicability, yet their complementary strengths support hybridization. Continued advances in coding assistants and multimodal models are expected to make these approaches increasingly interwoven.
- API agents emphasize speed, security, and reliability, whereas GUI agents provide flexibility, broad applicability, and transparency.Source: §6 · p. 8
Looking Ahead
- Coding assistants may simplify API creation and maintenance, while multimodal models may expand GUI agents’ visual understanding and manipulation capabilities.Source: §6 · p. 8
- Integrated systems could generate or refine APIs for back-end operations while dynamically orchestrating interface elements for transparent front-end interactions.Source: §6 · p. 8
A. APIs for Office Applications
The paper implements 12 task-specific APIs across Word, Excel, and PowerPoint to complement GUI-based desktop automation through direct COM-based application control. The supported functions cover editing, formatting, structured-content manipulation, and saving across applications.
- Twelve task-specific APIs span Word, Excel, and PowerPoint, providing direct access to underlying application functions through COM interfaces.Source: A. APIs for Office Applications · p. 9
- The APIs support application-specific operations including Word formatting and export, Excel table and range manipulation, and PowerPoint background changes and saving.Source: A. APIs for Office Applications · pp. 9–10
- A shared save_as API across all three applications illustrates cross-application generalization, while direct invocation can reduce GUI actions and improve reliability.Source: A. APIs for Office Applications · p. 10