Agent-desktop – Native desktop automation CLI for AI agents

I've been building computer-use tools for a while, and I quietly launched this about a month ago (122 Stars on GH). I figured it was worth sharing here.Over the last few months, a lot of computer-use agents have come out: Codex, Claude Code, CUA, and others. Most of them seem to work roughly like this: 1. Take a screenshot 2. Have the model predict pixel coordinates 3. Click x,y 4. Take another screenshot 5. RepeatThat works, but it's slow, expensive in tokens, and fragile. If the UI shifts a few pixels, things break. And the model still doesn't know what any element actually is.But the OS already exposes structured UI information: - macOS: Accessibility API - Windows: UI Automation - Linux: AT-SPI Screen readers have used these APIs for years. On the web, Playwright beat screenshot scraping for the same reason: structured access is just a better abstraction than pixels.So I built a desktop equivalent: agent-desktop.It's a cross-platform CLI for structured desktop automation through the accessibility tree. One Rust binary, about 15 MB, no runtime dependencies. It exposes 53 commands with JSON output, so an LLM can inspect and operate native apps without screenshots or vision models. Inspired by agent-browser by Vercel Labs.A typical loop looks like this: agent-desktop snapshot --app Slack -i --compact agent-desktop click @e12 agent-desktop type @e5 "ship it" agent-desktop press cmd+return So the loop becomes: 1. Snapshot 2. Decide 3. Act 4. Snapshot again The main design problem was context size.A naive approach would dump the full accessibility tree into the model, but real apps get huge. Slack can easily exceed 50,000 tokens for a full tree dump, which makes the approach impractical.The approach I ended up using is progressive skeleton traversal: - First pass: return a shallow tree, typically depth 3, with deeper containers truncated and annotated with children_count - Named containers get references

Hacker NewsToolAISource
0Sign in to voteCopy link

FL score

72

out of 100

Verdict

VALIDATE

high confidence

Competition

No competitor data yet

Trend

No signal yet

A structured desktop automation API that replaces fragile pixel-based computer vision with OS-native accessibility trees, enabling faster, cheaper, and more reliable AI agent interactions with native applications.

The pain

Current AI agents use screenshot→vision→coordinate prediction loops that are slow (multiple vision model calls), expensive (token-heavy), fragile (pixel-sensitive), and semantically blind. Developers building agent infrastructure waste resources on vision models when the OS already exposes structured UI data.

The gap

The accessibility API abstraction exists on every major OS but hasn't been packaged as a developer-friendly tool for AI agents. Playwright proved structured access beats screenshot scraping for web; desktop needed the same solution.

Build angle

Position as the 'Playwright for desktop', a foundational infrastructure layer that becomes the standard abstraction for any agent needing to interact with native apps. Target agent framework builders (Anthropic, OpenAI, startups) and enterprise automation vendors first.

Strengths

  • Solves a real, measurable problem (token cost, latency, reliability) with elegant technical design
  • Cross-platform from day one (macOS, Windows, Linux)
  • Minimal dependencies (15MB single binary) = easy adoption
  • Progressive skeleton traversal is a clever solution to context explosion
  • Early traction (122 GH stars in 1 month) validates market interest
  • Timing perfect: computer-use agents are hot, infrastructure gap is obvious
  • 53 well-designed commands suggest thoughtful API design

Risks

  • Accessibility APIs are OS-specific; maintenance burden grows with OS updates
  • Adoption depends on agent framework integration, needs buy-in from major players
  • Market may consolidate around closed-source solutions (Claude, OpenAI) that build this in-house
  • Enterprise customers may demand support/SLAs before adopting
  • Limited to apps that expose accessibility trees; some legacy/custom apps may not cooperate
  • Monetization unclear, infrastructure tools have low margins unless bundled with services
  • Competition from vision-based approaches improving rapidly (multimodal models getting better)

Questions about this idea?

FlyBot reads the scoring and gives you a second opinion on “Agent-desktop – Native desktop automation CLI for AI agents”.

Open FlyBot