An API so thin your LLM writes its own macOS tools mid-task
This is a deliberately thin Python layer that hands an LLM raw macOS primitives and lets it write whatever app-specific glue it needs on the fly.
What it does
macos-harness is a single Python process that exposes the Mac desktop to an LLM through six low-level primitives: see, key, type, click, ax, and script. It can peek at background windows, fire events at specific app PIDs, and read the filesystem, all without raising the target window or moving your physical cursor. The model is expected to write its own app-specific logic in ordinary Python as it goes.
The interesting bit
The project treats macOS itself as the API rather than wrapping Spotify, Slack, or Final Cut. It is essentially a minimal bridge to CGWindow, CGEvent, Apple Accessibility, and Chrome DevTools Protocol, leaving the agent to figure out the rest. That is either liberating or terrifying, depending on how much you trust your model.
Key highlights
- Captures and interacts with background apps without bringing them to the foreground.
- Sends keyboard and mouse input directly to a specific process, leaving your real cursor alone.
- Exposes raw Apple Accessibility and Apple Events for when screen-reading is not enough.
- Includes a live browser connection via CDP in the same Python process.
- Ships with anonymous telemetry enabled by default, though it claims not to record prompts, screenshots, or window titles.
Caveats
- Explicitly labeled experimental and macOS-only.
- Telemetry is opt-out rather than opt-in.
Verdict
Worth a look if you are building Mac-native agents and tired of maintaining brittle per-app integrations. Skip it if you need cross-platform support or a polished, fully-guarded automation framework.
Frequently asked
- What is browser-use/macos-harness?
- This is a deliberately thin Python layer that hands an LLM raw macOS primitives and lets it write whatever app-specific glue it needs on the fly.
- Is macos-harness open source?
- Yes — browser-use/macos-harness is open source, released under the MIT license.
- What language is macos-harness written in?
- browser-use/macos-harness is primarily written in Python.
- How popular is macos-harness?
- browser-use/macos-harness has 709 stars on GitHub.
- Where can I find macos-harness?
- browser-use/macos-harness is on GitHub at https://github.com/browser-use/macos-harness.