axstream
Fast, verified computer use that compiles. Your coding agent does a macOS
UI task once; axstream saves it as a small text macro that replays in seconds
— no screenshots, no per-step reasoning, and never trusted until it proves its
own outcome. The first run is agent-speed; every run after is ~100ms per
action, verified, or an honest refusal.
→ Docs · → The spec · macOS
In four commands
uv tool install axstream # or: pip install axstream
axstream install # wire the skill + MCP into Claude Code / Codex
axstream --doctor # check the driver + permissions
axstream replay <macro> # a saved task, in seconds
The one prerequisite is the cua-driver
daemon (--doctor tells you how). Then your agent gets the flywheel: do a
task once → it's saved → it replays instantly, forever.
{"name":"new-note","description":"a titled Apple Note","slots":{"title":{"example":"standup"}}}
{"op":"act","do":"open","target":"Notes"}
{"op":"act","do":"key","keys":["cmd","n"]}
{"op":"act","do":"type","text":"{title}"}
{"op":"assert","target":{"text":"{title}"}}
Why it's fast — and why it's trusted
A coding agent drives a Mac the expensive way: screenshot → reason → one click
→ screenshot again, seconds and tokens per step. axstream replaces the repeat
of any task with a deterministic macro: clicks resolve through a verified
ladder (accessibility element → OCR text anchor → visual patch → window-
relative pixels) and every macro ends with an assert that only passes when
the task actually happened. A macro that can't prove its outcome never earns
the verified stamp — following
PreAct, whose result is that cached-replay
systems collapse without exactly this gate.
Measured against a coding agent's native computer use on the same repeat
tasks: 34–78× faster at the execution layer, deterministic at p95,
verified-or-refused every time.
Install
As a Claude Code plugin (skill + MCP tools + slash commands, one line):
claude plugin marketplace add milind-soni/axstream
claude plugin install axstream@axstream
Any other agent (Codex, Cursor, Windsurf — via the Agent Skills standard):
npx skills add milind-soni/axstream
Or the package directly:
uv tool install axstream # from PyPI — or: pip install axstream
axstream install # wire the skill + MCP into Claude Code / Codex
One prerequisite for live execution either way: the cua-driver daemon
(/bin/bash -c "$(curl -fsSL https://cua.ai/driver/install.sh)" + grant
Accessibility). axstream --doctor checks everything.
After install, your agent gets /axstream (status), /axstream-teach
(compile a task into a macro), /axstream-stats (benchmark), the fast
primitives (screen-as-text, batched verified actions), and the macro
flywheel.
Run it (from a clone, for hacking)
git clone https://github.com/milind-soni/axstream && cd axstream && uv sync
uv run axstream --doctor
uv run axstream replay <macro> --slots '{"...":"..."}'
uv run pytest tests # 133 tests
File macros: agents author, axstream replays
A macro is a plain text file a coding agent (Claude Code) can write, diff,
and refine — a one-line JSON header, then axstream-spec ops, one per line.
Files live in ./.axstream/macros/*.axstream (project) and
~/.axstream/macros/ (user); slot placeholders are {slot_name} inside
string args (same templating as the macro store).
{"name":"new_note_titled","description":"open a new note and type a title","when_to_use":"user wants a fresh note with given text","slots":{"title":{"description":"the note title","example":"standup"}},"provenance":{"source":"hand-written","created":"2026-07-22"}}
{"op":"act","do":"open","target":"Notes"}
{"op":"act","do":"key","keys":["cmd","n"]}
{"op":"act","do":"wait","ms":400}
{"op":"act","do":"type","text":"{title}"}
axstream list # what's available
axstream replay new_note_titled --slots '{"title":"standup"}' --dry # inspect
axstream replay new_note_titled --slots '{"title":"standup"}' # execute
Replay runs through cua-driver (background, pid-addressed — the reliable
edge) and prints one JSON progress object per action. Clicks resolve down a
four-rung ladder — never a raw desktop-scope click that would steal the
user's mouse: