$ cat ~/map/pi-agent-desktop.md
pi-agent-desktop
Gives pi eyes and hands on native apps: accessibility-tree reads, clicks, and typing across Windows, macOS, and Linux.
extensions✓ Nov 2
Facts
- repository
- github.com/lennix1337/pi-agent-desktop ↗
- GitHub Stars
- ★ 1
- Forks
- 0
- license
- MIT
- npm / mo
- —
- last push
- Nov 23, 2026
install
pi install npm:@lennix1337/pi-agent-desktop (the native binary for your platform ships inside the package — no global install, no Python; on macOS, grant Accessibility and Screen Recording to the terminal that runs Pi).## TL;DR
A pi extension that gives the coding agent a desktop tool and matching skill for driving native apps on Windows, macOS, and Linux through the accessibility tree: apps snapshot as compact JSON refs instead of pixels, and click, type, set-value, and screenshot actions run against those refs, with semantic headless delivery by default and physical input gated behind a headed flag.
## Key points
- $One desktop tool plus a pi-agent-desktop skill teach a four-step loop: list-apps and list-windows find the target, snapshot returns the accessibility tree as compact JSON with @ref ids instead of pixels, an action runs on a ref, and get or a fresh snapshot verifies the result.
- $Supported actions include click, set-value, type, press, launch, and close-app; screenshot attaches a PNG when the tree is not enough.
- $Reads native apps on Windows, macOS, and Linux through the operating system's accessibility tree, powered by vercel-labs/agent-desktop; the platform binary ships inside the npm package, so no global install and no Python are needed.
- $The README positions it against screenshot-plus-vision models and browser tools: native desktop apps with exact text and values at small JSON token cost per step, where vision pays for large images and browser tools reach web pages only.
- $Delivery is semantic and headless by default — no cursor movement, no focus stealing; physical input (mouse-*, drag, hover, double-click, key-down/up) is refused unless the call sets headed: true, and --headed cannot be smuggled through args.
- $Commands run without a shell; batch, session, cursor-overlay, and --debug are not exposed.
- $Native apps snapshot in about 0.2 s; Electron and Chromium apps such as Slack or VS Code expose deep trees — snapshot them with --max-depth 3, which the tool itself suggests on timeout.
- $macOS needs Accessibility granted to the terminal that runs Pi, plus Screen Recording for screenshots; PI_AGENT_DESKTOP_BIN overrides the bundled binary.
## FAQ
Q Does it move my mouse or steal focus?
Not by default — delivery is semantic and headless. Physical input such as mouse, drag, hover, double-click, or key-down/up is refused unless the call explicitly sets headed: true.
Q Is this the same thing as the abcwyc/pi-agent-desktop repo?
No — the README warns about the name collision: abcwyc's repo is a desktop chat app for Pi, while this package gives Pi a desktop tool; it is not an app.
Q How does it read a screen without OCR?
Through the accessibility tree: snapshot returns compact JSON with @ref ids, so exact text and values come straight from the OS instead of being guessed from pixels; a PNG screenshot is attached only when the tree is not enough.
Q Why does an Electron app snapshot slowly or time out?
Electron and Chromium apps such as Slack or VS Code expose deep trees — snapshot them with --max-depth 3; the tool suggests this on timeout. Native apps snapshot in about 0.2 s.
Q What does pi need on macOS?
Grant Accessibility to the terminal that runs Pi, and Screen Recording as well when screenshots are needed.
## References
## Related entries
$ big-pi
Model-driven compression that summarizes completed phases into tiered blocks while Pi's JSONL transcript stays authoritative and untouched.
$ inception
A curator LLM replaces pi's compaction, rewriting old history every few turns to keep the context dense.
$ motus
Redacts exact secret values from pi tool output, blocks the commands and files that print them, and fails closed.
## Guides
Last updated: Nov 23, 2026