AI product Open source

macOS Harness

macOS Harness is an experimental, MIT-licensed, macOS-only Python harness from browser-use that gives an LLM or coding agent raw primitives for controlling a Mac in one persistent Python process, without app-specific tools, recipes, or framework rails. Its six core primitives—`see`, `key`, `type`, `click`, `ax`, and `script`—capture native and Electron app windows, send keyboard and coordinate input directly to an application process, expose Apple Accessibility and Apple Events, execute AppleScript, and draw a click-through pointer without moving the physical cursor. The agent can write missing task logic in ordinary Python during execution.

View repository Mentioned in 2 videos ↓

Overview

The same process provides access to a real, logged-in Chrome browser through Browser Harness, as well as the local filesystem and shell commands through Python, `Path`, and `subprocess`. It can capture background application windows without bringing them to the foreground and does not activate or raise the target app.

The project includes installation and skill-registration workflows, a `doctor` command for checking required macOS permissions, and verification instructions. Anonymous telemetry is enabled by default and records the CLI command category, success, duration, package version, operating system and architecture, and detected agent client; the project states that it does not record prompts, app names, screenshots, UI text, scripts, paths, or window titles, and provides `macos-harness telemetry disable` to turn telemetry off.

What macOS Harness is used for

2 uses taken from transcripts — each links to the moment in the video.

  • Gives an agent general Mac automation primitives for keyboard input, typing, clicking, accessibility, and AppleScript in one Python process. It can work with the filesystem and logged-in Chrome without using app-specific tools or moving the real cursor.

  • A lightweight Python toolkit that gives AI agents general-purpose control of a Mac through screenshots, keyboard and coordinate input, accessibility data, Apple events, and a logged-in browser. It is intended for coding agents and automation tools that need broad Mac control rather than application-specific integrations.

Videos mentioning macOS Harness

2 in the library.