Development & Automation

typesafe-computer-use: An Open-Source Computer Agent That Drives a Mac for $0.0002 a Step.

The open-source typesafe-computer-use picks the next action on a Mac screen with Jev, a small classifier model, at about $0.0002 per step. How it works, cost comparison, setup, and a test run.

· Huuush

typesafe-computer-use: An Open-Source Computer Agent That Drives a Mac for $0.0002 a Step

Key takeaways

  1. 1Vision OCR and the accessibility tree read the screen, code computes the facts, and Jev picks the next action.
  2. 2On the same screen and goal, Jev costs $0.0002 per decision and Claude Opus 5 costs $0.032.
  3. 3On macOS 14 or later, prepare your API key and permissions, confirm with a dry run, then run with --act to take control.
A hand choosing an option on a MacBook screen with the mouse, and a small coin beside it

When you have AI operate a computer for you, it calls a big model every time it looks at the screen, so costs pile up even over a few clicks. typesafe-computer-use is an open-source tool that reads on-screen text with OCR and lets Jev, a small classifier model, pick the next action, driving a Mac for about $0.0002 a step. You write the task you want in one English sentence and it operates the Mac until it reaches that goal, calling a large writing model only when it has to write free-form text into an input field.

A small model chooses, and code decides the facts

The classifier chooses, code decides the facts, and the writing model writes only free-form text. Values the model would otherwise have to work out, such as the date, which input field has focus, and the URL, are computed by code and passed in as state. The creator, Aaron Levin, published a 2-minute-44-second demo on September 17 of the agent watching the screen and acting.

Loading X post.

Unable to load the X post. Please try again.

Source: X @awlevin

A single step goes through five stages.

  1. It reads the screen with Vision OCR and pulls named controls from the accessibility tree.
  2. Code adds facts that can be computed from the screen, such as the date, the focused input field, the URL, and actions already tried.
  3. One TypeSafe request returns three Choices: the action type, the target, and the site.
  4. It performs the chosen action, captures the next screen, and checks the actual result.
  5. If the classifier stalls, the writing model reads the screen and answers, or hands off to the user. The writing model does not choose actions.

155x cheaper and faster than Claude Opus 5

These figures compare one decision each on the same screen and goal. On cost, Jev is $0.0002 per decision and Claude Opus 5 is $0.032, a 155x difference.

Measuretypesafe (Jev)Claude Opus 5Difference
Input tokens4,8824,785Similar
Cost per decision$0.0002$0.032155x cheaper
Real loop including history$0.0002$0.035–$0.08170–390x cheaper
12-step task$0.003$0.40–$0.90130–300x cheaper
Model latency0.13–0.38 s5.2 s14–40x faster
One step including capture and OCRAbout 1.5 sAbout 5.5 s3.7x faster

For a 12-step task, Jev costs $0.003 and takes about 1.5 seconds. Opus 5 costs about $0.50 and takes 5.5 seconds.

Loading X post.

Unable to load the X post. Please try again.

Source: X @awlevin

Jev returns a probability distribution and a confidence score over up to 255 options within a few hundred milliseconds, and output tokens are free. TypeSafe's Choice docs cover the option format and usage. Opus reads the date straight from the screen pixels, but when Jev makes the judgment, code computes the date and passes it into the state.

Installation and usage

You need macOS 14 or later, Python 3.12 or later, and uv. Clone the repository, install the dependencies, and create the environment file.

git clone https://github.com/awlevin/typesafe-computer-use
cd typesafe-computer-use
uv sync
cp .env.example .env

Get an API key from the TypeSafe quickstart and put it in the root .env. These are the environment variables you need.

Environment variableRequired?Purpose
TYPESAFE_API_KEYRequiredEvery decision request
ANTHROPIC_API_KEYOptionaltype_text, URLs the writer suggests, and the final answer
CLICKER_EMAILOptionalEnables the type_email action
CLICKER_BROWSEROptionalChooses the browser; defaults to Google Chrome

In System Settings under Privacy & Security, give Terminal the Screen Recording and Accessibility permissions. Without Screen Recording, captures show only the desktop wallpaper, and without Accessibility, clicks are ignored and --act won't start.

Start your first run with a dry run that makes no real clicks. The first command below prints the action it would take in one step. Adding --act actually operates the computer and runs up to 100 steps.

uv run clicker "open the Playground"
uv run clicker "open the Playground" --act
uv run clicker "log in" --act --steps 20 --delay 3
uv run clicker "log in" --act --handoffs 0
uv run clicker-inspect "any goal"

Write the goal as a single English sentence. Clear your terminal before running, since any text left in the terminal is included in the OCR input. To stop a run, press Ctrl-C in the terminal or move the mouse to the top-left corner of the screen. Every run is saved to runs/<timestamp>/, so you can review a stalled run offline.

Supported environments and further docs

The primary supported environment is macOS, and Windows 10 and 11 are experimental. Details are in the Windows doc.

The browser backend, which uses Chrome DevTools, reads the DOM without Screen Recording permission. There are also instructions for running the OSWorld desktop benchmark, which requires Linux and KVM. The browser backend and OSWorld each have their own doc, and the writer endpoints doc explains how to swap the writing model for another model such as LM Studio or Ollama.

The repository is MIT-licensed, the latest release is 0.2.0 beta (September 23, 07:45 KST), and it has 1,118 GitHub stars (as of October 2). In 0.x versions, settings and behavior may change, and because it moves your real mouse and keyboard, start with a dry run.

Sources

Frequently asked questions

What is typesafe-computer-use?
An open-source tool that takes a goal in English, reads the screen with OCR and the accessibility tree, and lets TypeSafe Jev pick each next action to operate the computer.
How much does one decision cost?
Comparing one decision on the same screen and goal, Jev is about $0.0002 and Claude Opus 5 is $0.032, a 155x difference.
What do I need to install it?
macOS 14 or later, Python 3.12 or later, uv, and a required TypeSafe API key. For real control you also need to allow Screen Recording and Accessibility permissions.
Can I test it before it actually clicks?
Yes. Running without --act is a dry run that only prints the action it would take in one step. Adding --act performs real control.

Related articles