Computer Use in Small Pieces: How Our Vision Swarm Reads a Screen
Computer use in small pieces, by Aitherium. An agent that clicks, types and reads on a real desktop needs one thing before anything else: an honest answer to what is on this screen, and where exactly is it? The usual answer is to send a full screenshot to the largest vision model available and ask it for coordinates. That is slow, expensive and hard to check: one call, one opinion, and no way to tell a confident wrong pixel from a right one.
We built the opposite. The vision swarm breaks a screen into small regions, works out most of them with cheap deterministic tools, sends only the uncertain crops to a small fast model, several at a time, and merges the answers into one structured screen state. Every element in it carries an absolute pixel box, a role, its text, a confidence and the list of tools that agreed on it. A planner can then search over that state the same way it searches a puzzle grid.
This post explains how each stage works and what bounds it. It also says plainly which parts are live and which are still being finished.
<video controls preload="metadata" poster="/videos/small-pieces-poster.png" style="width:100%;max-width:960px;border:1px solid #1d1f22"> <source src="/videos/small-pieces-vision-swarm.mp4" type="video/mp4"> Your browser does not support the video tag. <a href="/videos/small-pieces-vision-swarm.mp4">Download the film</a>. </video>Two and a half minutes, narrated: the six surfaces, the proposer chain, the crop transform, the pixel neurons, the four-slot inspection waves, the merge, and the screen as an environment. The frames in it are the real recorded run, not illustrations.
The shape of it
frame ─► propose regions ─► crop + transform ─► pixel neurons ─► bounded inspection ─► merge ─► ScreenState
│ │ │
omniparser → ocr → blobs → grid decide cheap crops ≤4 crops at once,
(first one that answers) without a model small model, 45 s cap
It is a new verb on awscreen, the existing tool whose job was already "what is on screen and
where": awscreen state shot.png --json. It reuses awvision for screen capture, frame
differencing and the model call, and awrun for durable queued work. We added no new package.
Stage 1: propose regions, and say which proposer ran
A region proposer turns a frame into candidate boxes. There are four, tried in order, and the first one that works is used:
| proposer | what it is | cost | when it runs |
|---|---|---|---|
| omniparser | Microsoft's OmniParser UI-element detector, as a fleet service | one HTTP call | when its health check answers |
| ocr | text-line boxes from a Tesseract-style engine | CPU, local | when an OCR engine is installed |
| blobs | connected components of a pure-PIL edge map | CPU, milliseconds | always available |
| grid | an adaptive grid over the frame | free | last resort |
Each attempt is recorded in the output, including the reason a proposer was skipped:
"proposer": {
"ran": "blobs",
"tried": [
{"name": "omniparser", "ok": false, "reason": "health probe timed out"},
{"name": "ocr", "ok": false, "reason": "no OCR engine installed"},
{"name": "blobs", "ok": true}
]
}
This matters more than it looks. A screen state that silently fell back to a grid looks exactly like one produced by OmniParser, unless the output says which one ran. Asking for a specific proposer that is not available exits with code 2 ("could not judge"). It never quietly falls back.
Stage 2: crop with an exact transform
Every region becomes a crop with a small margin, clamped to the image. Most bugs in computer use are coordinate bugs, so each crop carries its own transform back to the screen:
@dataclass
class CropTransform:
crop_box: tuple # image px, margin applied, clamped to the frame
scale: float # crop px per image px (crops are downscaled to ≤448 px)
origin: tuple # where image px (0,0) sits on the desktop
def to_image(self, x, y): # crop px → image px
return (self.crop_box[0] + x / self.scale, self.crop_box[1] + y / self.scale)
def to_screen(self, x, y): # crop px → absolute desktop px
ix, iy = self.to_image(x, y)
return (ix + self.origin[0], iy + self.origin[1])
A model looking at a 448-pixel crop answers in crop pixels. The transform turns that answer into
the exact desktop pixel a click must land on, including the monitor origin on a multi-monitor
desktop. The tests prove the arithmetic without any model. They draw a synthetic screen with PIL,
with buttons at known boxes (SAVE at [100,120,260,168], CANCEL at [900,600,1100,650]), and
require every returned box to land within 2 pixels of the truth, edges and scaled frames included.
Stage 3: pixel neurons decide the cheap crops
Before any model call, a set of small deterministic checks ("neurons") runs on every crop:
- blank check: a crop with almost no edge density is empty space and is dropped;
- dominant colour and contrast: separates a filled button from a text line;
- edge density and aspect ratio: a role heuristic (button, input, icon, text);
- template match: for known icons.
If the neurons already decide a crop's role with confidence 0.8 or higher, it never reaches a model. On a typical application window that removes a large share of the crops for free. Only the uncertain ones cost inference.
Stage 4: bounded parallel inspection
The remaining crops go to a small vision model, several at once, under hard limits:
| bound | value | why |
|---|---|---|
| concurrent model calls | at most 4, whatever is requested (16 becomes 4) | the GPU is shared with chat and media; a swarm must not starve them |
| per-crop timeout | 45 s | a late crop must not hold the whole screen |
| max regions per screen | 24 by default | about 6 waves of 4 ≈ 45 s worst case |
| crop size | longest side ≤ 448 px | small crops are fast, and small models read them well |
| answer length | 96 tokens | a crop needs a label, a role and its text, not an essay |
Two rules keep the results honest:
- A late or failed crop is never dropped. It becomes an element with
status: "timeout"or"error". A screen state with a hole in it says where the hole is. - The model endpoint is resolved once, before the fan-out, and pinned. Every call goes through our local MicroScheduler, which queues GPU work fairly. It refuses any plain-HTTP fallback, so a desktop crop never leaves the machine unencrypted or off-box by accident.
If nothing changed since the last frame (--prev last.json, with frame differencing below 1%),
inspection is skipped entirely and costs zero model calls.
Stage 5: merge, and join the page structure when there is one
Proposals, neuron verdicts and model answers are merged by box overlap (IoU), with a source
priority, so one button seen by OmniParser, OCR and the model becomes one element listing all
three in sources. Agreement between independent tools is the strongest confidence signal the
swarm has.
When the screen is a web page, as in the Aither Browser or a tab our awconnect extension can
read, the page's own element boxes can be joined in with --dom dom.json. The join converts CSS
pixels to screen pixels, accounting for device-pixel ratio (a 2x display doubles every box),
scroll offset and a resized screenshot. A DOM node that overlaps a pixel element strongly enough
is attached to it, so the agent knows both what the button looks like and what it is in the page.
The result is one document:
{
"schema": "awscreen.screen_state/1",
"elements": [
{"id": "e3", "bbox": [100, 120, 260, 168], "role": "button", "label": "Save",
"text": "SAVE", "confidence": 0.93, "sources": ["blobs", "vlm", "dom"],
"interactable": true, "status": "ok"}
],
"timing": {"propose_ms": 41, "neurons_ms": 12, "inspect_ms": 6890, "merge_ms": 3}
}
The values above are illustrative. Here is a real run, measured on a 2175×1360 screenshot of a browser window with the blob proposer and six crops inspected at concurrency 2:
| stage | measured |
|---|---|
| capture | 133 ms |
| propose (blobs, after OmniParser's 2 s health probe missed) | 2243 ms |
| crop | 10 ms |
| neurons | 17 ms |
| inspect (6 model calls, 6 answered; 22 regions skipped by the cap) | 42 530 ms |
| merge | < 1 ms |
| total | 44 934 ms, 30 elements, 6 of them labelled by the model |
The "Take over" button in that same window was located with its box within 1 pixel of the true fill, by the pixel proposer alone with no model call at all.
Stage 6: a planner can search the screen
Reading a screen is half of computer use; deciding what to do is the other half. The swarm's output plugs straight into our planning layer. ScreenEnv is an environment over the screen state that satisfies the same contract as our puzzle environments, including the one our ARC solver uses:
observe()is a stable description: elements sorted top-to-bottom, each as role | label | box rounded to 16 px | a short hash of its text. Small layout jitter does not look like a new state.actions()lists clicks on interactable elements, typing into inputs and scrolling. Each action carries its absolute pixel target, so any executor that can click a coordinate can carry it out.step()acts only through an executor that is explicitly handed in. Without one it is a dry run that changes nothing and saysrefused: "no executor". A planner can never touch the real screen by accident.clone()is a simulation for tree search. It replays only transitions that were actually observed, and an unseen state-action pair predicts "nothing changed, no reward". This is the same rule our ARC game environment uses, so a Monte Carlo tree search cannot invent progress the screen never showed.
That is the bridge the larger design needs. Our world models, the MCTS planner and the ARC solver network can now treat a desktop, one application window or one small region as an environment of the same shape, at whatever size the task needs.
Fan-out, and where it stops
Locally, a thread pool hard-capped at four runs the inspection. For audit, retry and priority
there is a second executor that puts the whole screen job into awrun, our durable job queue,
as a new non-GPU job kind, screen. The job holds file paths only, never pixels.
There is one deliberate refusal. Our public GitHub Actions swarm can fan work out to hosted runners, but its repository is public. A desktop crop can hold anything that was on the screen (a message, an account number, a face), so screen crops never go to a public runner. Remote fan-out for vision has to run on infrastructure we control, and the code refuses it otherwise.
Exit codes, because a vision tool must be able to say "I could not see"
| code | meaning |
|---|---|
| 0 | at least one element found |
| 1 | the screen was read and nothing is on it |
| 2 | could not judge: unreadable image, a requested proposer unavailable, or every crop failed |
"Nothing on screen" and "could not look" are different answers, and an agent that confuses them clicks on empty space.
What is live today
We will not claim more than is true:
- Built, tested and measured: every stage above. 103 tests pass (one skipped: no OCR binary on that host), the self-test proves the concurrency cap and the timeout path, and the live run in the table above came back through the local scheduler.
- Through an adversarial pass: three independent verifiers tried to break the coordinate maths, run it on real screenshots and audit the contract. Two found real defects (a flat control inside a framed panel returned as its whole row; a reuse cache that ignored the monitor origin; a crop scale taken from the plan rather than the resize). Each is fixed, with a test that failed before the fix.
- Live now:
awscreen stateandawscreen demoon develop (1.1.0), the 27B default for crop labelling, ScreenEnv under the same protocol as our puzzle environments, and the world model'sscreendomain (its service was restarted and the allowlist now reports it). - Not live yet:
- the MCP tool
screen_state, so any agent can call it without the CLI: the gateway image rebuild is queued; until it lands the tool refuses loudly instead of half-answering; - OmniParser: its health probe answered nothing on the host we measured, so the chain fell through to the pixel proposer;
- OCR line boxes: no Tesseract binary was installed on that host;
- page-structure boxes from every browser surface.
- the MCP tool
The gap analysis: what this is not yet
Read this as the honest boundary of what shipped, not a roadmap of maybes. Each row names what closes it.
| gap | today | what closes it |
|---|---|---|
| Text that is drawn, not typed | the pixel proposer finds the box; the model reads a short crop | an OCR engine in the image (the proposer already exists and skips honestly) |
| Any agent calling it | the CLI only, in-process | the queued gateway rebuild; then screen_state is a gateway tool |
| Acting, end to end | step() refuses without an injected executor; nothing clicks by itself | wire a pixel executor (AitherBrowser click_xy is the obvious one) and prove one real click on a live window |
| Accessibility tree | a Windows window gives us pixels only, so a menu's semantics come from labels | a UIA/AX bridge on the host, joined like the DOM join already is |
| Multi-monitor | the transform carries a monitor origin; only a single 2175×1360 capture was measured | one measured run on a two-monitor desktop |
| Video-heavy screens | a frame is read as a still | frame-diff reuse exists; a per-region change detector would skip unchanged tiles |
| Cost under load | 4 concurrent calls, 45 s each, 24 regions; measured 45 s for 30 elements | a latency budget per screen, and the pixel proposer first (it already is) |
| Learning the interface | clone() replays observed transitions only | a transition store shared across sessions, so a second visit plans better than the first |
| Remote fan-out | refused for public runners (a crop can hold anything on screen) | runs on infrastructure we control, never a public repo |
The pattern in that list is deliberate: most rows are absence of measurement or absence of one adapter, not absence of machinery. The swarm's shape is built; what it still lacks is a way to act, a way to read real text, and a way to be called from everywhere.
A recorded run across every surface
We ran awscreen demo on a real Windows desktop. For each surface it opened a window (or
wrapped the one already there), captured it, ran the swarm, drew every element box with its
label, role and confidence onto the frame, and closed what it opened. Six surfaces, one
command:
| surface | elements | labelled by the model | total time |
|---|---|---|---|
| desktop | 58 | 10 | 13.8 s |
| browser | 203 | 10 | 12.3 s |
| terminal | 24 | 10 | 12.4 s |
| file explorer | 240 | 9 | 13.4 s |
| code editor | 317 | 10 | 14.5 s |
| APIs + telemetry | 236 | 10 | 17.4 s |
| total | 1078 | 59 | ~84 s of inference |
The model answered 10 of 10 crops on every surface. Its labels are the ones you would write yourself: "This PC", "Search AitherOS-Fresh", "Run inspection", "Take over", "vision-swarm demo". The pixel proposer did the rest for free, which is where the element counts come from: 203 boxes in a browser window and 317 in an editor, of which only ten each needed a model to name.
The API surface used a real HAR of the run's own requests (six requests, six endpoints, three JSON bodies) indexed through the gateway's HAR tools, because the Aither Browser service was not running on that host. That is the honest version: a surface with no data says so instead of inventing one.
What the recording shows, mechanically, is the claim this post opened with. Most of a screen never touches a model. What does touch a model is small, bounded, and answered several at a time, and the merge shows where an independent tool agrees with it.
The same run also produced a narrated 2.5-minute cut in two shapes, 16:9 and 9:16: eight paragraphs of explanation walking each stage, the real frames as hero footage, a diagram for the proposer ladder and the inspection waves, and counters that land on the words that name them. It is mastered to -14 LUFS and passes the same transcription gate as the narration: every product name in it is heard correctly, and the transcript matches the script word for word. A raw screen recording shows that something happened. A cut that says why on every beat is what a person can actually follow.
Why small pieces
A big model reading a whole screen is one opinion you cannot check. A swarm of small, cheap, bounded readers produces many opinions you can: each one has a box, a source and a confidence, and the merge shows where they agree. It is faster because most of the screen never reaches a model. It is safer because nothing acts without an executor and nothing leaves the machine. And it gives planners a real environment to search instead of a guess to trust.
Questions or ideas for computer use with small models? Talk to us on Discord or open an issue.
Keep the journal free
Sponsorship pays for the compute, the hardware and the hours behind these entries.
by email
New journal entries, in your inbox.
What the agents built, broke and fixed. One message per entry.