Autopilot
by SERGDAB
README.md
# Autopilot
**For developers who build web apps with Claude Code: Autopilot lets your coding agent test and use your own app in a real browser**, and do the web chores around it (sign-ups, API keys, purchases). Passwords stay in a local vault the AI never sees, money moves only after you type your PIN, and a task that worked once replays without the model.
**Early: no outside security review yet, so use test cards only.**
## Install (one line per agent)
<!-- install:start (generated by scripts/install-links.mjs from package.json "repository"; do not edit by hand) -->
| Agent | Install |
|---|---|
| **Claude Code** | `/plugin marketplace add SERGDAB/claude-event-autopilot#v0.1.0` then `/plugin install autopilot@autopilot` |
| **Codex** | `codex plugin marketplace add SERGDAB/claude-event-autopilot --ref v0.1.0` then `codex plugin add autopilot@autopilot` |
| **Cursor** | `npx -y --ignore-scripts github:SERGDAB/claude-event-autopilot#v0.1.0 install --target cursor`, or one click: [Add to Cursor](https://cursor.com/en/install-mcp?name=autopilot&config=eyJjb21tYW5kIjoibm9kZSIsImFyZ3MiOlsiLWUiLCJjb25zdCBmPXJlcXVpcmUoJ2ZzJykscD1yZXF1aXJlKCdwYXRoJyksYz1yZXF1aXJlKCdjcnlwdG8nKSxlPXByb2Nlc3MuZW52LEg9ZS5BVVRPUElMT1RfSE9NRXx8cC5qb2luKHJlcXVpcmUoJ29zJykuaG9tZWRpcigpLCcuYXV0b3BpbG90JyksUz0nZDA4YzEyYzNiZWM1NmQ4ZDNkYzhiMDI4ODE3MTMxOTQ2YjhiNzQ2MGU3OTk1NTg5YmEwNmMwYzA4Zjc0ZWY2ZicsQj1wLmpvaW4oSCwnYm9vdCcsUysnLm1qcycpLGg9Yj0%2BYy5jcmVhdGVIYXNoKCdzaGEyNTYnKS51cGRhdGUoYikuZGlnZXN0KCdoZXgnKSxVPWUuQVVUT1BJTE9UX0JVTkRMRV9CQVNFPyhlLkFVVE9QSUxPVF9CVU5ETEVfQkFTRS5lbmRzV2l0aCgnLycpP2UuQVVUT1BJTE9UX0JVTkRMRV9CQVNFOmUuQVVUT1BJTE9UX0JVTkRMRV9CQVNFKycvJykrJ2F1dG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DM0KTphKSx7c3RkaW86J2luaGVyaXQnLHNoZWxsOnByb2Nlc3MucGxhdGZvcm09PSd3aW4zMid9KS5zdGF0dXM%2FPzEpfWlmKChoKGIpPT1TKT09ZmFsc2Upe2NvbnNvbGUuZXJyb3IoJ1thdXRvcGlsb3RdIHRoZSBib290IGZpbGUgZG9lcyBub3QgbWF0Y2ggaXRzIHBpbm5lZCBTSEEtMjU2OiByZWZ1c2VkJyk7cHJvY2Vzcy5leGl0KDEpfWYubWtkaXJTeW5jKHAuZGlybmFtZShCKSx7cmVjdXJzaXZlOnRydWV9KTtmLndyaXRlRmlsZVN5bmMoQisnLicrcHJvY2Vzcy5waWQsYik7Zi5yZW5hbWVTeW5jKEIrJy4nK3Byb2Nlc3MucGlkLEIpfWF3YWl0IGltcG9ydChyZXF1aXJlKCd1cmwnKS5wYXRoVG9GaWxlVVJMKEIpLmhyZWYpfSkoKS5jYXRjaCh4PT57Y29uc29sZS5lcnJvcignW2F1dG9waWxvdF0gJysoeCYmeC5zdGFja3x8eCkpO3Byb2Nlc3MuZXhpdCgxKX0pIl19) |
| **Any agent** | `npx -y --ignore-scripts github:SERGDAB/claude-event-autopilot#v0.1.0 install` finds Claude Code, Codex, Cursor, Gemini CLI, Copilot, VS Code and Cline and wires each one (`--plan` previews, `uninstall` undoes) |
**Then say** *"use autopilot to test sign-up on http://localhost:3000"*, or type `/autopilot:try` (1-minute demo on a
bundled fake shop) and `/autopilot:help` (what you can say). Needs Node.js 20+ and Chrome or Edge. Every line pins
release v0.1.0 (nothing runs from a moving branch). Update, per agent: [docs/INSTALL.md](docs/INSTALL.md).
<!-- install:end -->
[](docs/launch/autopilot-checkout.mp4)
**What is stored and where:** everything stays on your computer, in `~/.autopilot` (site logins in a local vault, cards
in an encrypted wallet, a hash of your PIN, your delivery profile, Autopilot's own browser profile, learned flows, logs)
plus the runtime in your agent's plugin folder. No telemetry. To remove it all: uninstall (the lines above, or
`/plugin uninstall autopilot@autopilot`), then delete `~/.autopilot`. Full list: [Trust](#trust-what-is-stored-where-and-how-to-delete-it).
On first use Autopilot installs its runtime by itself (20-45 s in our cold-start tests with an empty npm cache): the
terminal says it is installing, and the `autopilot_setup_status` tool reports packages done and an ETA, or one line
telling you how to fix a failed install. Claude Code asks once per Autopilot tool before first use (its own permission
prompt).
## Try it
```
/autopilot:try
```
Autopilot starts its bundled demo shop (fake products and payments), does the same small task twice and shows what
replay saves: run 1 learns the steps, run 2 replays them.

(Clip made by `autopilot clip`: a scripted client making the same tool calls, so no model thinking time. A Claude
run is the first row below.) Every finished task reports its time and Autopilot calls, and one that replayed a learned
flow ends with a "saved by replay" line. Calls are Autopilot tool calls, not your model's own thinking.
<!-- numbers:start (generated by scripts/readme-numbers.mjs from docs/media; do not edit by hand) -->
| What | Measured | Source (docs/media) |
|---|---|---|
| `/autopilot:try`, Claude-driven (real Claude Code session) | run 1: 8 s, 5 calls; run 2 (replay): 5 s, 2 calls | cold-start.json, 2026-12-02 |
| `/autopilot:try`, scripted client, no model, browser already started (`autopilot clip`) | run 1: 1.6 s, 5 calls; run 2 (replay): 0.6 s, 2 calls | autopilot-try.json, 2026-12-02 |
| Eval suites (live, Autopilot's own operator) | 17/17 (our own demo + adversarial cases), safety 100% | eval.json, 2026-12-03 |
| Cold start: empty npm cache to the finished `/autopilot:try` | 59 s (runtime install 28 s) | cold-start.json, 2026-12-02 |
| Page snapshot size, interactive view vs full (characters, 2 demo shop pages) | 39% smaller (2475 vs 4052) | autopilot-try.json, 2026-12-02 |
Calls are Autopilot tool calls; times are wall time. In the Claude-driven row run 1 also includes starting the
browser. The scripted client makes the same tool calls as `/autopilot:try` with no model thinking time and a
browser started beforehand, so it shows the calls saved, not the time. Our own demo shop and our own suites: no
outside baseline yet. Regenerate: `node scripts/readme-numbers.mjs`.
<!-- numbers:end -->
## Three real examples
1. **Test your own app.** *"Use autopilot to test sign-up on http://localhost:3000: sign up, confirm the email code,
log in, and tell me what broke."* Autopilot uses its own inbox and a vault password, reads the emailed code, and
returns an evidence report. Keep it: `autopilot flow export --spec <flow id> --out tests/` writes a Playwright spec
for your CI, and `autopilot suite init <your site>` + `autopilot suite run` test all your site's flows nightly.
Self-run benchmark on our own test app with 19 planted bugs: 15.5 found on average (16 and 15 over 2 runs) for
$0.13 per run, against 13 for $0.31 for plain Claude Code + Playwright MCP (1 run); Autopilot takes longer (9.6 vs
3.8 min). Read the counts with two caveats: Autopilot also reported about 3.5 findings per run that match no planted
bug (we could not confirm them; the baseline had 1), and our probe rules were written by someone who knew this app's
planted bugs. Method and every finding in [docs/BENCHMARK.md](docs/BENCHMARK.md) ("J1 update"). Clip (32 s): [GIF](docs/launch/autopilot-bugbash.gif) ·
[MP4](docs/launch/autopilot-bugbash.mp4).
2. **Buy something within a budget.** (Early: no outside security review yet, so use test cards only; try this on
the bundled demo shop first.) *"Buy one Delta Reign booster pack, cheapest in-stock offer under 300 kr
including shipping."* Autopilot compares shops read-only, picks one, fills checkout from your profile, and stops at
the pay button until you approve with your PIN (a prompt in your terminal links to Autopilot's own approval page; the PIN never goes to the AI). It never types a card the AI can see.
3. **Get an API key into your project.** *"Get me a Resend API key for this project."* Autopilot signs in (or hands
the login to you), creates the key and writes it to `.env.local` without showing it to Claude:
`autopilot provision resend --needs RESEND_API_KEY --project .`
## Trust: what is stored, where, and how to delete it
- **Everything stays on your computer**, in `~/.autopilot` (or `AUTOPILOT_HOME`), plus the plugin's runtime in Claude
Code's plugin data folder (`~/.claude/plugins/data/autopilot-*`). No telemetry: Autopilot sends nothing about you or
your tasks anywhere. The only network traffic is the browser visiting the sites you ask for, npm installing the
runtime (and, after that, downloading the background operator for delegate mode, about 230 MB, from npm), and the free [mail.tm](https://mail.tm) API when a task creates a disposable inbox on a real site.
- `~/.autopilot` holds: `.env.vault` (site logins, encrypted; the key is held by Windows DPAPI or the macOS keychain
for your user), `wallet.enc` (cards, encrypted the same way and locked with a key made from your PIN: a saved card
is typed only after a purchase approval with your real PIN), `approval-pin.json` (a slow salted hash of your PIN, never the PIN),
`spend.jsonl` (what was paid, for your limits), `profile.md` (name and delivery address you entered),
`browser-profile/` (Autopilot's own browser: its cookies and logins), `flows/` (learned steps, placeholders instead
of personal data), `runs/` (task logs and `outcomes.jsonl`, redacted), `receipts/`, `server.log`.
- Claude never sees passwords, card numbers or your PIN: it types placeholders (`{{vault:..}}`, `{{card:..}}`) that
Autopilot fills in after its gate, and a plugin hook blocks Claude's file and shell tools from those files.
- **Outside Claude Code** (Codex, Cursor and the other agents) there is no such hook: the agent's shell runs as you.
What still holds: a saved card is never typed without your real PIN (replacing the PIN file opens nothing). What
does not: that shell can read your site logins (it can ask Windows or the keychain for the vault key, as Autopilot
does), approve a payment that does not use your saved card (or a hosted test order) after replacing the PIN file, or change Autopilot's own
code. Use test cards only, and a PIN of 8+ characters with letters. Details:
[docs/INSTALL.md](docs/INSTALL.md#what-is-protected-outside-claude-code).
- **Delegate mode** (`autopilot_do`, `autopilot do`, `autopilot test`, the evals) gives Autopilot's own operator model
the raw Playwright browser tools; Autopilot's gate judges each acting call on the page itself, but that is a
bigger surface than hands mode's few checked tools. Another reason to stay with test cards for now.
- **Delete everything:** `/plugin uninstall autopilot@autopilot` (removes the plugin and its runtime), then delete the
`~/.autopilot` folder (`rm -rf ~/.autopilot`, or `Remove-Item -Recurse $HOME\.autopilot` in PowerShell). First end
a running Autopilot: close its browser window and end the process whose pid is in `~/.autopilot/server.json`
(there is no one-key kill switch yet).
## Other agents
Codex, Cursor, Gemini CLI, Copilot CLI, VS Code and Cline: see the install table at the top and
[docs/INSTALL.md](docs/INSTALL.md) (per agent: install, check, update, remove). Without approval prompts in the agent
(`codex exec` declines them all), a purchase or risky click comes back as `needs_user` and you approve it with your PIN
on Autopilot's own page, which it opens in your browser. Only Claude Code has been tested in a live session with a
model. Codex: the pinned plugin install and the real Codex CLI ran a sign-up check and a dry-run purchase on the demo
shop with a scripted stand-in for the model (no model login was available); `codex exec` needs one config line to
allow Autopilot's tools (docs/INSTALL.md). Cursor: the installed server ran the same two tasks for a scripted MCP
client; a run inside Cursor with a model is still to do (transcripts: docs/bench/2026-12-03-m2-agents/).
## Release checklist
1. `npx tsc -p .`, `cd web && npx tsc -p .`, `npm test` pass.
2. `node scripts/cold-start.mjs --cold-cache` passes: a real `claude -p` session with the plugin loaded from a fresh
copy and an empty npm cache reaches a first success (target: under 3 minutes). It prints the timing.
3. `node scripts/replay-smoke.mjs`, `node scripts/plugin-install-smoke.mjs` and `node scripts/mcp-smoke.mjs` pass
(the last two need `PAY_PORT=8099 node demo/serve.mjs`).
4. `npm run eval` (all suites) shows no regression.
---
## Developers: install from a clone
```bash
npm install # also builds the cockpit into web/dist (scripts/build-web.mjs)
npm link # puts `autopilot` on the PATH
autopilot setup # optional: delegate mode sign-in, browser, profile; `autopilot doctor` checks
```
The plugin is the repository itself (`.claude-plugin/plugin.json`): the MCP server launcher
(`plugin/bin/autopilot-mcp.mjs`, it installs the runtime on first use), the skills (`autopilot`, `/autopilot:do`,
`/autopilot:try`), a SessionStart hook (install progress) and a PreToolUse hook (keeps Claude off Autopilot's secret
files). Load a working copy for one session with `claude --plugin-dir .`. The skill in `plugin/skills/autopilot` is a
copy of `skill/SKILL.md`: after editing the skill run `node scripts/sync-plugin-skill.mjs` (`--check` fails if the copy
is stale). Delegate mode (`autopilot_do`, `autopilot do`) runs Autopilot's own operator, a second Claude Code session;
the plugin downloads its binary in the background after the first install.
## Use from a terminal
- `autopilot do "open example.com and return the page title"`, then `autopilot wait <task_id>`.
- `autopilot board` opens the cockpit (chat, live board, approvals, scenario tests).
- `npm run demo` replays the newest golden recording (or the fixture) with no backend.
- Your real Chrome (opt-in): `autopilot browser use-real-chrome` lets Autopilot work in your everyday Chrome through the
Playwright Extension (consent + approval PIN; only its own tabs, only sites the task names; card typing off).
`autopilot browser use-own` goes back. Fewer bot checks either way: log in once by hand in Autopilot's window.
- Any shell agent (Codex, Cursor): `autopilot hands start|open|snap|click|fill|wait|finish`. Site routes: `autopilot routes <domain>`.
## Develop
| Command | What |
|---|---|
| `npm run server` | server in the foreground (`AUTOPILOT_HOME=./workspace` for a dev data dir) |
| `npm run typecheck` | typecheck server, CLI, contracts |
| `npm test` | every `server/*.test.ts` |
| `npm run acceptance` | Stream A acceptance, live (needs the sign-in) |
| `cd web && npm run dev` | cockpit dev server on :5173, proxied to the server on :7777 |
Settings: `AUTOPILOT_HOME` (default `~/.autopilot`), `AUTOPILOT_BROWSER=chrome|playwright`, `AUTOPILOT_PORT` (7777),
`AUTOPILOT_NO_OPEN=1` (don't open the cockpit automatically).
## Layout
`contracts/` events + API · `server/` operator, gate, hands mode, learn/replay, tasks, API · `cli/` the `autopilot`
command and MCP server · `plugin/` plugin launcher, hooks, skills · `web/` cockpit · `skill/` the skill ·
`operator-rules/` the operator's CLAUDE.md · `recipes/` provisioning recipes · `demo/` demo shops · `scripts/` smokes,
cold start, acceptance · `docs/` install, benchmark, data, site suites, verify.
Security reports: [SECURITY.md](SECURITY.md). Contributing: [CONTRIBUTING.md](CONTRIBUTING.md).
## Credits
Autopilot's own email inboxes on real sites (sign-ups, verification codes, receipts) use the free
[mail.tm](https://mail.tm) API. Messages there are kept for 7 days; Autopilot saves order confirmations to
`AUTOPILOT_HOME/receipts/`. Local sites (`*.localhost`) use a local inbox instead.
## License
MIT. See [LICENSE](LICENSE).
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues