跪拜 Guibai
← All articles
Artificial Intelligence · Open Source · Architecture

agent-desktop 1.2.0 Drives the Desktop via Accessibility Tree: 55 Calculator Clicks, Zero Screenshots, Zero Misses

By 孟健AI编程 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Because it reads the accessibility tree instead of screenshots, agent-desktop removes the token cost of image parsing and frees the user's mouse and keyboard while the agent works in the background. The price is a slower per-action pace and a per-step credit system, which makes it a fit for unattended desktop automation rather than millisecond-level interactions.

Summary

Agent-desktop 1.2.0, released by Vercel Labs on November 5, replaces the usual screenshot-and-pixel-coordinate approach with direct reads of the OS accessibility tree. Each UI control gets a number, and the AI triggers it by that number in the background, with no screenshots and no mouse or keyboard takeover.

A hands-on test chained agent-desktop into WorkBuddy: install and connect took under two minutes without writing config code, then the AI read only the Calculator window's 36 numbered buttons, generated 15 mixed bill items, added them up with 55 consecutive clicks in 82.8 seconds with zero errors, and filled a Notepad file saved via shortcut. A side-by-side comparison against the traditional screenshot method showed both runs were correct, but agent-desktop took zero full-screen screenshots and never touched the physical input devices, while the old method needed nine screenshots and occupied the mouse.

The trade-offs are explicit: each action takes about 1.5 seconds because the model re-checks the interface state before acting, every step consumes WorkBuddy credits, and controls that lack stable identifiers may require falling back to foreground mode with a real mouse.

Takeaways
— agent-desktop 1.2.0, released November 5 by Vercel Labs, adds MCP support and operates through the OS accessibility tree with numbered UI controls.
— WorkBuddy installed agent-desktop 1.2.0 automatically in 42 seconds, costing 2.17 credits, and connected it as a custom connector in 59 seconds (1.96 credits), enabling all 67 tools.
— With a targeting prompt, the AI read only the Calculator window's 36 buttons and ignored other open applications, consuming 3.24 credits over 47 seconds.
— The full task summed 15 mixed bill items with 55 consecutive calculator clicks in 82.8 seconds (7.95 credits) and filled the totals into Notepad, with zero wrong clicks.
— In a comparison run, the traditional screenshot-and-coordinate method took 216 seconds total (including a 116-second interruption) with nine full-screen screenshots, while agent-desktop took 201 seconds with zero screenshots.
— Per-action timing measured roughly 1.5 seconds for agent-desktop versus 0.15 seconds for the screenshot method.
— Agent-desktop refused to edit a row of unnamed input fields in TickTick in background mode; it required adding --headed to switch to the foreground with a real mouse.
— The final saved bill file contained 20 lines and 660 characters, with all 15 amounts and categories matching exactly.
Conclusions

The 1.5-second-per-action rhythm is the deliberate cost of verification: the model re-reads the interface state before every click, which is why it never misses but also why adding one line and saving took nearly four minutes.

Reliability in UI automation now depends on the quality of the accessibility tree, so applications that expose no names for their controls still force a fallback to headed mode and physical clicks.

This comparison positions MCP-based desktop control as a token-saver and user-convenience play, not a speed play; for tasks where a human is idle, the slower, non-intrusive approach is the practical win.

Credit-based metering per step means the economic cost of agentic desktop use scales with the number of UI actions, not just the complexity of the task.

Concepts & terms
Accessibility tree
A structured representation of a UI's controls and their relationships, exposed by the operating system for assistive technologies. agent-desktop reads this tree directly, assigns IDs to each control, and lets an AI trigger those controls by ID instead of analyzing screenshots.
MCP (Model Context Protocol)
An open protocol for connecting AI models to external tools and data sources. Adding MCP support lets agent-desktop be wired into assistants like WorkBuddy as a set of callable tools without custom integration code.
From the discussion

The discussion centers on the portability of the accessibility-tree method to Android. The desktop's keyboard-free claim rests on per-focus input streams; Android's single current input method destroys that. A workaround exists only from API 33—an accessibility service that is itself an InputMethod, using commitText directly—though it requires getSurroundingText polling with a 600ms budget, and older versions still need a full input-method switch. The simple question of whether MCP configuration is all that's required stands unanswered against the detailed technical caveats.

— The desktop keyboard-free trick works only because each input focus has its own input stream, allowing tools to inject characters directly.
— Android's single current input method blocks that approach: a headless input method must become the active IME, and the 300ms+ switch time means a real user can't type during the change.
— API 33 offers a workaround: an accessibility service with flagInputMethodEditor acts as an InputMethod, sending commitText straight to the focused editor's InputConnection, leaving the user's keyboard untouched.
— The workaround carries a cost: commitText is one-way and the editor hasn't refreshed when it returns, so getSurroundingText polling is required, with a 600ms budget.
— For API 32 and below, no workaround exists; input-method switching remains the only option, and the author hasn't solved that case.
Featured comments
汪汪队首席上单

Actually, is configuring MCP all it takes?

booboosui

The desktop side can promise 'no keyboard grabbing' because each input focus has its own input stream—the tool just injects characters. Android doesn't work that way: the entire device has only one current input method, and whoever is selected gets the say-so. So moving that approach to mobile hits a wall from the first step. A headless input method that types via broadcasts must first become the current input method itself. During that switch, which takes about 300+ milliseconds, a real human can't type a single character. I later took a path that only exists since API 33: an accessibility service declaring flagInputMethodEditor, which is itself an InputMethod. commitText goes directly to the focused editor's InputConnection, and the user's original keyboard never moves. It's not free, though. commitText is a one-way call; when it returns, the editor hasn't refreshed yet, so you have to poll with getSurroundingText—I gave it a 600ms budget. On API 32 and below, you still have to switch input methods; I haven't gotten around that yet.

See top comments, translated →
Source: juejin.cn ↗ Google Translate ↗ Backup ↗