Screen Operation Capabilities for AGI: From Code Generation to Computer Use

    This article examines the shift in general-purpose AI from symbolic tasks like code generation toward screen operation, the ability to perceive interfaces, locate controls, plan multi-step workflows, and execute actions. It breaks the technology stack into perception, grounding, planning, and execution layers, explains why treating the GUI as a universal interface improves long-tail coverage, and outlines evaluation metrics, enterprise rollout practices, and common challenges such as high-resolution scaling, dynamic content, long-horizon drift, security compliance, and cost control.

    1. From Writing Code to Operating a Computer

    Historically, the industry measured general-purpose models mainly on symbolic tasks such as code generation and text reasoning. Real information work goes well beyond that. Many business systems expose no external API, legacy systems lack documentation, interface elements are inconsistently named, and interaction paths are buried under multiple layers of menus. Against this backdrop, research has started to shift toward screen operation, a capability much closer to how people actually work.

    Screen operation means a model can observe the screen, recognize controls, move the pointer, click buttons, fill in forms, switch applications, and continuously correct its own behavior across multi-step tasks. It is not a stack of isolated skills but a combination of perception, understanding, planning, execution, and feedback-driven correction. Calling such a model a computer-use model emphasizes direct interaction with graphical interfaces rather than text or code alone.

    The fundamental driver behind this shift is coverage. The vast majority of software has a graphical interface, while only a minority offers stable, public, well-documented APIs. The interface is therefore treated as the most universal interface: it requires no extra adaptation from the software vendor and no waiting for ecosystem integration, and the model can obtain information and apply actions directly from pixels and control structures.

    2. Anatomy of a Screen Operation Model: A Four-Layer Stack

    Turning “look at the screen, click the button” into a reproducible, measurable, and engineerable capability usually requires four layers.

    2.1 Perception: Screen Representation and Element Recognition

    The perception layer converts the screen into structured information the model can process. Common approaches include visual encoding, interface structure parsing, and fusion of accessibility information. In engineering practice, screenshots and the control tree are typically used together: the screenshot supplies real visual context, while the control tree provides semantic priors and candidate click targets. Fusing both significantly reduces misjudgments such as “looks like a button but is not clickable.”

    2.2 Grounding: Precise Mapping from Semantics to Coordinates

    Grounding is the key bottleneck in screen operation. The model must map a natural-language intent such as “click save in the top-right corner” to a concrete coordinate or control identifier. A common approach is to jointly model referring expressions in text and visual regions, then output a bounding box or center point for the clickable target. To improve robustness, multi-scale features, priors on interface element types, and targeted enhancements for hard cases such as small icons and dense toolbars are usually added.

    A schematic grounding output can be abstracted as:

    1. intent: "click save"
    2. target: {type: "button", bbox: [x1, y1, x2, y2], confidence: 0.93}
    3. action: click(center(bbox))

    2.3 Planning: Decomposition and State Tracking for Long-Horizon Tasks

    Real tasks often involve anywhere from a dozen to several dozen steps. The planning layer decomposes a high-level goal into subgoals, maintains task state, and rolls back and retries on failure. The common engineering structure is a plan-execute-observe-correct loop: after each step, the screen state is read again to decide whether the remaining plan needs adjustment. To avoid infinite loops, teams typically set a maximum step count, detect repeated actions, and add checkpoints at critical points.

    2.4 Execution: Action Space and Safety Boundaries

    The execution layer turns decisions into concrete actions: moving, clicking, typing, scrolling, keyboard shortcuts, window switching, and so on. Production environments must define safety boundaries, such as second confirmation for high-risk operations, masking of sensitive data entry, audit-friendly operation logs, and rollback snapshots. The more restrained the action space, the more predictable the system.

    3. Why “The Interface Is the API” Is the More Pragmatic Route

    Treating the interface as a universal API delivers three engineering benefits.

    First, immediate availability. No API from the target system, no plugins, and no code changes are required; the model can start working in any environment that has a graphical interface.

    Second, long-tail coverage. Many internal systems, industry-specific tools, and legacy clients have no integration channel, making interface operation almost the only viable automation path.

    Third, portability. The same screen understanding and operation framework can move between systems with different interface styles at a relatively manageable cost: only grounding and control recognition need recalibration, rather than bespoke integration logic for each system.

    This route is not meant to replace API-based automation. Stable APIs still hold clear advantages in reliability, throughput, and cost. A more sensible positioning is API first, interface as fallback, with the two combined to cover systems at different levels of maturity.

    4. Evaluation: How to Measure Screen Operation Capability Scientifically

    Judging whether a screen operation model is reliable requires multiple dimensions rather than a single score.

    • Grounding accuracy: given a referring description, can the model hit the correct target? A common method is to measure hit rate on real high-resolution interface samples, with emphasis on small targets and dense layouts.
    • End-to-end task completion rate: execute complete tasks in a real or simulated desktop environment and measure the success ratio. This type of evaluation is closer to the production experience.
    • Efficiency metrics: steps, time, and number of human interventions needed to complete the same task. A high completion rate with excessive latency has limited practical value.
    • Robustness and safety: behavior in the face of pop-ups, loading delays, permission prompts, and interface redesigns, plus whether unauthorized or destructive actions occur.

    A practical evaluation loop looks like this:

    1. task set -> environment snapshot -> execution trace -> result判定 -> failure attribution -> new test cases

    Failure attribution matters especially: distinguishing perception errors, grounding offsets, planning mistakes, and execution failures is what makes targeted optimization possible.

    5. Engineering Deployment: Connecting Screen Operation to Business Workflows

    A phased path is recommended for deploying screen operation in enterprise environments.

    1. Scenario selection: start with repetitive flows that have fixed steps, stable interfaces, and clear value, such as form entry, cross-system data transfer, and scheduled inspections.
    2. Environment isolation: run in a controlled virtual desktop or containerized desktop with snapshots and rollback to avoid polluting real environments.
    3. Least privilege: grant only the permissions required to complete the task, and add human confirmation for sensitive operations.
    4. Observability: fully record screen state summaries, decision rationale, and action sequences for auditing and review. This can be combined with common cloud capabilities such as logging services and monitoring alerts.
    5. Human-in-the-loop: set confidence thresholds, hand low-confidence cases to humans, and progressively accumulate samples to feed back into the model and grounding module.
    6. Versioning and regression: interface redesigns are the norm, so a regression test set for the grounding model is needed to prevent a single update from causing widespread failures.

    6. Common Challenges and Mitigations

    • High resolution and scaling: different scaling ratios produce large variations in target size, requiring multi-scale training and coordinate normalization.
    • Dynamic content: delayed loading and animations interfere with judgment, so waiting strategies and stability detection should be introduced to avoid clicking before an element is ready.
    • Long-horizon drift: multi-step tasks accumulate errors easily, so state verification and rollback should be inserted at critical points.
    • Security and compliance: when personal information and business-sensitive data are involved, input masking, operation logging, and access control are required.
    • Cost constraints: calling a large model at every step is expensive, so layered scheduling can be used, with a small model handling grounding and a large model handling planning, balancing quality and cost.

    7. Conclusion

    Treating the interface as a universal API and letting models complete tasks by looking at the screen and clicking buttons is a pragmatic path for general AI moving into real work environments. Its value lies not in replacing existing API automation but in filling the automation gap across long-tail systems. For developers, the real bar has moved from “can it click” to “can it click stably, safely, and auditably.” Sustained investment across the perception, grounding, planning, and execution layers, combined with scientific evaluation and phased deployment, is what takes screen operation from demo to production.