Skip to content
Browsa

Open source · MIT · TypeScript

Ghostwright

Browser agents that replay without a model.

$ npm i ghostwright
Terminal
$ npx tsx examples/replay.ts
recorded: 11 titles, extract compiled to "css", 2 model calls
replayed: 11 titles, 0 model calls, 538 ms

First run vs replay

4 flows on public test sites. 3 recordings and 12 replays each. 2026-11-19.

Median seconds per run. books-category: run 1 11.4 s with 2 model calls, replay 2.5 s with 0. books-detail: 4.4 s with 2, replay 3.5 s with 1. quotes-tag: 8.3 s with 2, replay 2.3 s with 0. login: 11.5 s with 4, replay 7.0 s with 1.
Two flows keep one model call per replay, for an extract that needs the model. Method, table and script

Why Ghostwright

  • 0 model calls on replay

    Record a flow once. Later runs replay it. A broken step is repaired with one call, then kept or held for review.

  • Secrets by reference

    The model sees %password%. The value is typed only on sites you allow, never saved.

  • Runs where your browser is

    Local Chrome, any CDP endpoint, or Browsa cloud browsers. Any model.

Quickstart

Record with a model, replay with none.

Full docs
index.js
import { Ghostwright } from "ghostwright";
import { z } from "zod";

const gw = await Ghostwright.create({ model: "openai/gpt-5.6-luna" });
const flow = await gw.flow("travel-books", { params: { category: "Travel" } });
await flow.goto("https://books.toscrape.com/");
await flow.act("open the %category% category");
await flow.extract("every book title", z.object({ titles: z.array(z.object({ title: z.string() })) }));
await flow.save();
const run = await gw.run("travel-books", { category: "Poetry" });  // 0 model calls
await gw.close();

Run it on Browsa cloud browsers.

The same flows, on Phantom, with captchas solved on the server.

browser: browsa({ apiKey: process.env.BROWSA_API_KEY })

100 free credits. No card.