Computer Use Architecture: A Guide to Technical Routes and Selection
This article breaks down the main technical routes for building Computer Use agents—cloud API-based, cloud virtual desktop, on-device pure vision, and hybrid approaches—and compares their trade-offs in latency, cost, controllability, and privacy. It also covers shared engineering essentials such as layered context construction, constrained action spaces, safety design, and evaluation metrics, then offers practical selection guidance for different project requirements.
1. Why Computer Use Needs a “Route” Mindset
Computer Use refers to enabling a model to complete tasks the way a human uses a computer: observing the screen, moving the pointer, clicking controls, typing text, scrolling pages, and correcting the next action based on feedback in a loop. Its fundamental difference from traditional automation is that it does not rely on pre-agreed interface contracts; instead, it treats the graphical interface itself as the only interaction surface. This brings strong generalization potential, but also engineering challenges such as an exploding state space, noisy feedback, and fast error accumulation.
Therefore, discussing Computer Use cannot stop at “can the model click a button.” You first need to settle on a route: where visual and state information comes from, where actions are executed, how context is trimmed, and how failures are rolled back. Industry practice has roughly converged on four routes, each making clearly different trade-offs in latency, cost, controllability, and privacy boundaries.
2. Architecture and Trade-offs of the Four Technical Routes
1. Cloud API Invocation
The model service only exposes “perception–decision” capabilities: the input is a screen snapshot plus optional structured auxiliary information, and the output is action instructions with coordinates and semantics, while execution is the caller’s responsibility. The advantages are lightweight integration, fast iteration, and strong cross-environment reusability. The challenges are large context size, coordinate accuracy affected by resolution and scaling, and the need for the caller to maintain history and compression strategies for long tasks. In engineering practice, this is usually paired with an action whitelist, step-by-step screenshots, and result validation to prevent the model from producing out-of-bounds operations.
2. Cloud Virtual Desktop
An isolated desktop or container is spun up in the cloud, with the model and the execution environment on the same side, forming an “observe–act–observe again” loop. The advantages are reproducible environments, concurrency, and easy record-and-replay; the costs are resource usage and startup latency, plus the need for network egress controls, credential hosting, and snapshot rollback. This type of solution suits batch, long-chain tasks that can tolerate second-level feedback.
3. On-Device Pure Vision
Perception and decision-making happen on the local device, relying only on screen pixels without reading the control tree or system interfaces. Privacy and offline capability are the biggest advantages, and it saves the bandwidth cost of uploading images. The challenges are limited on-device compute and memory, the need to compress model size, cross-application adaptation that depends on generalization ability, and the need to design low-risk interaction boundaries.
4. Hybrid Approach
This combines structured state, a vision model, and a rule engine: accessibility information or page structure is used first to locate elements, the vision model handles fallback and exception recovery, and deterministic scripts handle high-frequency fixed steps. The essence of the hybrid route is to assign tasks by “degree of determinism,” trading rules for stability and the model for coverage.
3. Shared Engineering Essentials
Context construction is the first-order problem. A layered memory approach is recommended: system constraints and task goals stay resident; the last few rounds of screenshots and actions retain original precision; earlier history is converted into a textual summary that keeps only key states and confirmed facts.
The action space should be tightened into an enumerable set with preconditions and post-validation, as illustrated below:
ACTIONS = {"click(x,y)", "type(text)", "scroll(dy)", "key(combo)", "wait(ms)", "done(result)"}def step(state, action):assert action.name in ACTIONS, "illegal action"before = state.hash()after = apply(action)if after.hash() == before and action.name != "wait":return recover(state) # fall back and retry if there is no responsereturn after
Safety design must run through the entire process: secondary confirmation for sensitive operations, credentials kept out of the model context, a non-privileged execution environment, a network whitelist, full operation auditing, and one-click termination. Evaluation should look at task success rate, average number of steps, invalid action ratio, and human takeover rate at the same time, and use a fixed task set for regression to avoid “works in a demo, unstable in production.”
4. Selection Guidance
Choose the cloud API invocation route for fast validation and cross-environment reuse; choose the cloud virtual desktop route when you need concurrency and reproducible environments; choose the on-device pure vision route when keeping data on-device is a hard constraint; production systems are mostly hybrid. If you already use general capabilities such as Baidu AI Cloud’s container platform, object storage, log service, and monitoring and alerting, you can relatively naturally link execution environment isolation, trajectory retention, and metrics observation into a closed loop, focusing your effort on task orchestration and failure recovery.
