agent-desktop: Controlling Desktop Applications via the Accessibility Tree

X postLahfirAnnouncement

Developer Lahfir has introduced agent-desktop, a CLI tool that allows AI agents to interact with desktop apps. By leveraging the accessibility tree, it enables end-to-end testing across macOS, Windows and Linux.

Key points

  1. agent-desktop brings computer use capabilities to AI agents and installs globally via npm.
  2. Interacts with desktop apps via the accessibility tree rather than relying solely on raw screenshots.
  3. Allows drilling into specific window segments to reduce LLM token consumption.
  4. Supports executing multiple agents on a single application simultaneously.
  5. Runs across macOS, Windows and Linux, with demonstrated compatibility in Vercel Sandbox environments.

Why it matters

It offers developers a practical method for automated desktop E2E testing using agents, reducing token costs by using structured accessibility data instead of pure computer vision.

Analysis

With agent-desktop, developer Lahfir targets the challenge of executing reliable and cost-effective desktop automation using AI agents. Many prevailing computer-use paradigms rely heavily on full-screen screenshots, which consume large amounts of visual tokens and can struggle with precision.

Mechanism and Token Efficiency

By tapping into the operating system's native accessibility tree, agent-desktop provides agents with structured, semantic metadata regarding interface elements such as inputs, buttons, and navigation controls. To keep context usage and API expenditure low, the tool allows agents to drill down into specific window components rather than processing the entire desktop layout on every step.

Use Cases and Environments

The primary application highlighted is end-to-end testing for desktop software, alongside multi-agent operational workflows where multiple agents interact with the same app concurrently. The CLI is distributed via npm and runs on macOS, Windows, and Linux. Author demos also confirm execution within virtualised container sandboxes such as Vercel Sandbox, with packaging options like Homebrew planned for upcoming releases.

Original post

Lahfir ▲

@mdlahfir · 31 October 2026

Get onboarded with agent-desktop 😮‍💨 t.co/GLNYXAgvBV t.co/RXCsz5x79r

122 likes5 replies81 bookmarks7.5k views

View on X
More posts in the thread (5)
  1. t.co/YENrX1fUEM
  2. @chaliy Thanks!
  3. @chaliy PRs/Issues welcome 🫡
  4. @stanzilla 🔜
  5. @trevin here's a demo of it working in vercel sandbox t.co/dulou6mVo2
Selected replies (5)
  • @chaliy @mdlahfir Awesome work. I already tested it. It just works.
  • @trevin @mdlahfir Are you able to have agents use a remote machine’s agent-desktop?
  • @stanzilla @mdlahfir homebrew release planned?
  • @trevin @mdlahfir Ideally I want my various Macs to be able to use agent-desktop on another Mac in my fleet
  • @383degrees @trevin @mdlahfir give me a week. i will get my remote viewer working with mac, it is currently windows only

Summary generated by AI (Gemini 3.8 Flash, 1 November 2026). It may contain errors – the original source is authoritative.

Similar in content, found by the AI search.

  • X post:Omar Ghandour

    Agently Announces Agent-Driven Desktop Control for Mac

    Co-founder Omar Ghandour has announced Agently ('Jarvis for Mac'). The tool is designed to manage workflows directly on macOS, using an orchestration agent that coordinates sub-agents connected to company data and apps such as Outlook, HubSpot, and Stripe.

    286bookmarks19.9kviews

    AI & LLMs· Announcement

  • Repository:alibaba/page-agent

    Page Agent: In-Page GUI Agent for Controlling Web Interfaces via Natural Language

    Alibaba's Page Agent is a TypeScript library that enables natural-language control of web pages directly inside the browser. Loaded as a single JavaScript script, it executes actions through text-based DOM manipulation without requiring headless browsers, Python backends, or screenshots.

    29kstarsTypeScript

    AI & LLMs· Tool

  • Repository:a2aproject/a2a-cli

    A2A CLI: Official Terminal Tool for the Agent2Agent Protocol

    The A2A CLI is a Go-based command-line client designed to interact with Agent2Agent (A2A) agents. It provides a standardised way to discover, message, and manage AI agents directly from the terminal without throwaway scripts.

    116starsGo

    AI & LLMs· Tool

  • Link:mobilenext.ai

    Mobile Next: Programmable Mobile Runtime for AI Agents

    Mobile Next provides an infrastructure that allows AI agents to control real iOS and Android devices, simulators, and emulators via API and the Model Context Protocol (MCP). The stack comprises an MCP server, a CLI utility, the Playwright-inspired Mobilewright testing framework, and an on-demand cloud device farm.

    AI & LLMs· Tool

Let's talk about your project

Locations

  • Mattersburg
    Johann Nepomuk Bergerstraße 7/2/14
    7210 Mattersburg, Austria
  • Vienna
    Ungargasse 64-66/3/404
    1030 Wien, Austria

Parts of this content were created with the assistance of AI.