agent-desktop (deskref)
Why it exists
Most computer-use tools tell the model where it is with screenshots. The accessibility tree, the same one VoiceOver reads, gives the agent every control by name, with a ref it can act on, and costs far fewer tokens.
This is a fork of vercel-labs/agent-desktop. The snapshot-and-ref loop, the CLI and the macOS, Windows and Linux support are upstream’s work and the fork is built on top. My changes are speed on macOS and a web surface.
What it does
The agent takes a snapshot of an app, gets back JSON with a ref for each element it can act on, acts on a ref, then reads the UI again to check. There is no model inside; the loop lives in the agent. It ships as a CLI and a C library.
- Web pages through the same loop.
snapshot --surface webreads Chrome over DevTools and gives refs like native apps do. Upstream has no web surface. - Faster macOS commands. Every command is a new process, so 1.4.0 opens
its system connections while permission checks run. On System Settings,
median
find --textwent from 992 ms to 296 ms. - Fewer tokens per turn.
--linesprints one line per element instead of a JSON tree, about a third fewer tokens. - Cursor overlay. New in 1.6.0:
session start --cursorshows where the agent clicks.
npm install -g deskref installs it. The agent-desktop npm package and
brew install agent-desktop install upstream’s build, which has no web
surface.
Numbers
On a Mac dev set of 10 tasks, 5 runs each, Sonnet 5.5, the fork took 186 s and 637k tokens against upstream’s 439 s and 891k, and passed 48/50 runs against 44/50 for upstream. The pass-rate gap is not statistically significant. The time and token gaps are the result. I tuned the fixes on these tasks, so this is progress on a known set, not a held-out test.
The held-out run, with the losses, is in the writing post on 1.4.
What it is not
Not the fastest end to end: on held-out Linux native tasks it was slower than upstream and used more tokens, and the model’s thinking time is most of every run. Web is a side feature, and browser-harness passed more of the web runs I gave both. Each test used one model and a few runs per task, so read the numbers as a direction.