DEV Community

sun young
sun young

Posted on

macos-harness: Give an LLM a Mac, and It Writes Whatever Tool Is Missing

Most computer-use agents get this wrong.

They hand the LLM a fixed menu of pre-defined tools — "you can click, you can type, you can screenshot" — and the agent is trapped inside that box. The moment it hits a scenario the framework didn't anticipate, it stalls, or starts forcing square pegs into round holes. Others wrap it in layers of rails, recipes, and workflow config before any real work begins.

macOS Harness (845 stars, MIT, by the browser-use team) inverts the whole approach. One sentence: the simplest, thinnest harness that gives an LLM complete freedom to control a Mac.

The idea, in one diagram

The README draws it out, and it translates to:

  • the agent wants to do something no existing helper covers;
  • so it looks at the screen, reaches for raw macOS primitives;
  • writes the missing logic in ordinary Python, mid-task;
  • task complete — with no app-specific tool added along the way.

The philosophy is three "no"s: no framework, no recipes, no rails. This is the opposite of the mainstream. Conventional computer-use gives you a toolbox and a sandbox; macOS Harness gives you the whole Mac and one Python process, and says build what you need.

Why "write it on the fly" matters

The fatal flaw of the pre-defined-tool approach is that it can never be exhaustive. Real software is endlessly varied: a button that looks different, an operation with no clean API, a task that needs several system primitives stitched together. Your twenty pre-built tools always miss the twenty-first scenario — and the agent gets stuck.

macOS Harness cuts the Gordian knot: don't hand over a tool list, hand over the ability to make tools. Whatever the agent needs, it composes from macOS primitives plus plain Python. Its ceiling isn't a fixed set of capabilities — it's whatever Python can do.

That's the dividing line between the "tool era" and the "agent era." The tool era teaches an agent to use a hammer, so it can only hit nails. The agent era gives it a hand that can forge hammers, saws, and screwdrivers.

Three signals it's worth attention

  • Built by browser-use — the benchmark open-source browser-automation project. This is their macOS extension, not a hobby project.
  • Radically minimal — one Python process wired directly to macOS, your real browser, and your files. Install via a single uv command, register the skill, run doctor.
  • Real capability — it drives real apps through real macOS primitives, not simulated clicks. It does real tasks, not demo tasks.

The honest caveat

It's macOS-only (it's in the name). And "complete freedom" is double-edged — the README explicitly requires the agent to explain and ask before requesting macOS permissions. It's for power users who want to hand their Mac to an agent while keeping oversight, not for beginners expecting turnkey magic.

I've localized the README and core docs to Chinese: https://github.com/yangshun2005/macos-harness-cn

If you find this project useful, a star on the original repo supports the author's ongoing maintenance.

Top comments (0)