How AI Agents Really Operate Your Desktop and Browser
As agents take over real workflows, knowing whether they see the screen or read accessibility data determines reliability and token cost. This breakdown helps developers choose between desktop and browser automation paths, and understand where breakage happens.
AI agents like Codex now operate desktop apps and browsers, and the mechanics are less mysterious than they seem. Two paths exist: Computer Use drives native apps through OS interfaces, while Browser Use drives web pages via browser APIs. Both rely on an executor that reads the interface and performs clicks and input, while the model only decides what to do next. Observability comes from screenshots, accessibility trees, or DOM structures, each with trade-offs in cost and accuracy.
Two concrete tasks ground these ideas: saving a Word document as PDF on the desktop, and searching a web drive for a meeting note. Scripts can chain uncertain steps, session state tracks the active window or tab, and libraries like PyAutoGUI and Playwright plug into agent frameworks. Ready-made tools via CLI or MCP, and browser extensions that attach to already-open tabs, round out the picture. The appendix covers daemons, CDP, OCR vs accessibility data, cursor animations, and session vs app state.
The split between model judgment and executor action means the bottleneck is often interface fidelity, not model reasoning.
Accessibility trees are a free ride: built for screen readers, they serve agents without extra training.
Visual-only approaches remain necessary for non-standard layouts, but they increase input tokens and latency.
Scripting confirmed steps turns agents from step-by-step thinkers into batch executors, a pragmatic middle ground.
The two pointer animation cases show that human perception and machine input can be fully decoupled.