flashbrowse

v1.6.1 · Pure Rust · Apache-2.0

Sub-100ms browser control. Built for AI agents.

Token-compressed browser automation with 18 native MCP tools. Zero Python.

curl -fsSL https://raw.githubusercontent.com/nhrbuilds/flashbrowse/main/install.sh | sh
$ flashbrowse open https://news.ycombinator.com93.2% fewer tokens
Title: Hacker News
URL: https://news.ycombinator.com/

[1] Link: Hacker News
[2] Link: new
[3] Link: past
[4] Link: comments
[5] Link: ask
[6] Link: show
[7] Link: jobs
[8] Link: submit
[9] Link: login
  Row: 1. | Show HN: Sub-100ms Rust browser controller for agents | [10]
    [10] Link: Show HN: Sub-100ms Rust browser controller for agents
    Text: 142 points by nhrbuilds 2 hours ago | 38 comments
  Row: 2. | Compressing Chromium AXTree for LLM context windows | [15]
    [15] Link: Compressing Chromium AXTree for LLM context windows
[42] Textbox: Search

Engineered for context windows.

Sub-100ms Warm Actions

POSIX pipe CDP transport and adaptive settling cut warm_act p95 to 63 ms.

3x–23x Token Compression

Walks the accessibility tree in document order, keeping every word and [N] action ID.

18 Native MCP Tools

Built-in stdio server for batched forms, isolated contexts, mocking, and PDFs.

Deterministic Settle Gate

Correlates lifecycle events, network idle, and AX fingerprints for identical trees.

Iframes, Shadow DOM & React

Splices child iframe trees, open shadowRoots, and React click handlers.

First-Class Node.js SDK

Official @nhrbuilds/flashbrowse package with typed APIs and bundled binaries.

Faster loops. Fraction of the tokens.

Measured sequentially on Chrome 147 against full (interestingOnly: false) accessibility snapshots.

63 msWarm action p95
18×Fewer tokens than Puppeteer
0 errorsAcross 5,249 soak calls

Agent Loop

30-row table · 60 links local fixture

ControllerMedianp95Payload
flashbrowse524 ms568 ms1,215 tok
Playwright579 ms786 ms8,589 tok
Puppeteer564 ms666 ms21,817 tok

Real-Site Tokens

Compressed action tree vs full accessibility tree

example.com
flashbrowse
272 t
Playwright
814 t
Puppeteer
1,358 t
news.ycombinator.com
flashbrowse
2,143 t
Playwright
19,269 t
Puppeteer
47,930 t
github.com
flashbrowse
1,719 t
Playwright
17,102 t
Puppeteer
40,137 t

Chrome/Chromium in production today (Firefox BiDi integration underway); Playwright and Puppeteer still lead for WebKit and trace viewers.

Native speed in Node.js and Bun.

The official @nhrbuilds/flashbrowse package (github.com/nhrbuilds/flashbrowse-js) wraps the Rust binary with typed ESM/CJS APIs and a reusable MCP client.

install
npm install @nhrbuilds/flashbrowse

Prebuilt binaries for Linux x64/arm64, macOS arm64/x64, and Windows x64.

flashbrowse-cli.ts
import { Flashbrowse, FlashbrowseError } from "@nhrbuilds/flashbrowse";

const browser = new Flashbrowse();

try {
  const tree = await browser.open("https://example.com", {
    sessionId: "research",
    signal: AbortSignal.timeout(30_000),
  });
  console.log(tree);

  const next = await browser.act(3, {
    sessionId: "research",
    action: "click",
  });
  console.log(next);
} catch (error) {
  if (error instanceof FlashbrowseError) {
    console.error(error.exitCode, error.stderr);
  } else {
    throw error;
  }
} finally {
  await browser.close({ sessionId: "research" });
}

Community-backed open source.

Voluntary backing only. Approved manually before listing. Dollar amounts stay private.

No public sponsors yet - be the first supporter below.

View tier durations & sponsorship rules
TierMonthlyYearlyOne-TimePlacement Duration
Gold Sponsor$250+ / mo$2,500+ / yr$500+ onceLarge logo card + tagline + link while active (or 180 days for one-time), then permanent supporter credit.
Silver Sponsor$50+ / mo$500+ / yr$100+ onceMedium logo card + link while active (or 90 days for one-time), then permanent supporter credit.
Bronze Backer$15+ / mo$150+ / yr$25+ onceCompact badge + link while active (or 30 days for one-time), then permanent supporter credit.
Supporter$5–$14 / mo$5–$149 / yr$5–$24 onceListed directly in the permanent compact supporters strip with name and link.

Pure Voluntary Support

Sponsorships fund ongoing maintenance, testing, and documentation. They do not buy custom features, SLAs, or priority roadmap control.

Manual Approval Before Listing

Every sponsorship enters review first and is never auto-published. We reserve the right to decline sponsors whose business conflicts with our ethical standards.

Privacy & Amount Confidentiality

Dollar amounts and contact emails are never shown publicly. Only your chosen display name, optional tagline, logo, and URL appear.

Cancellation & Refund After Fees

Recurring sponsorships stop featured placement when cancelled (moving to permanent credit if kept). Declined or admin-refunded entries receive a refund net of payment processor fees.

Release history.

Synced from CHANGELOG.md.

v1.6.1

Changed

  • EVAL.md: the fidelity table and the arm-size table were stale against the current code (both artifacts were written 2026-11-23, before the current fixtures and the compressor changes in 871c4f6 and 442d4b0; the arm sizes also predated the flat/nested fix above). Both are re-measured, and eval/results/fidelity-report.json and eval/results/arm-sizes.json are regenerated.

Fixed

  • browser_act with action: "select" works. It failed on every page in 1.6.0 with CDP error: CDP protocol error for Runtime.callFunctionOn: code -32602: Invalid parameters. Two independent defects were responsible. Runtime.callFunctionOn sent its arguments as bare JSON values; Chrome requires a CallArgument object per argument, so it rejected the call. The match text was then JSON-encoded and wrapped again, so the page received the literal "France" including quotes and matched no option. Selecting by visible text or by option value now sets the value and dispatches change and input, as documented. An unmatched option leaves the selection unchanged; the outcome is only reported on the stderr log, not to the caller, so an agent cannot tell a no-match from a successful action except by re-reading the element.
  • Evaluation tooling: the shadow-button pilot task asserted shadow DOM text through document.body.innerText, which cannot see into a shadow root, so no agent could ever pass it. The fixture now mirrors the shadow button's click into the light DOM and the task asserts that outcome. This changes the measured task from "the text exists" to "the button was found and clicked".
  • A page whose accessibility tree repeats a nodeId no longer loses every action ID. Chromium reuses nodeId values for InlineTextBox layout noise, which has no backendDOMNodeId, no children, and is dropped by the pruned renderer whatever its parent. The compressor treated any repeat as a corrupt tree and fell back to a renderer that emits no action IDs at all, so ordinary pages (the-internet.herokuapp.com/dropdown and /checkboxes) produced a tree with zero numbered elements and browser_act could not run, with only a stderr warning to explain it. A duplicate is now fatal only when a colliding node can reach the output, so a genuinely ambiguous tree still falls back and no text is dropped either way.
  • dump --format axtree is the flat list again, as the help text says. It had been short-circuited to the session's nested rendering, so axtree and axtree-nested returned byte-identical payloads and the eval's flat and nested observation arms compared the same thing.
  • Test flake: pipe_reader_eof_cancels_a_writer_blocked_inside_io asserted the blocked writer had been dropped the instant the call failed, but the writer is torn down by a separate task, so the assertion raced that task's scheduling and failed roughly once in twenty runs under load, which could redden CI on an unrelated change. It now waits for the drop, as the sibling test already did.
  • Test calibration: minimal_page_settles_quickly and sparse_complete_ax_tree_does_not_hit_settle_deadline bounded settle time at 3 seconds, but the settle loop's own commit_fallback is 3000 ms. On a loaded runner where no Page.lifecycleEvent arrived within that window, the designed fallback engaged, added the small-tree quiet window, and the open took ~4.3 s with a correct tree, which failed the tests (seen on Windows CI). Both now assert the settle outcome (exit_reason == "settled", the guard against the 15 s stall these tests exist for) plus a generous wall-clock backstop, so a real stall still fails but a slow runner does not.

v1.6.0

Added

  • browser_pdf paper size and margins: paper_width, paper_height, margin_top, margin_right, margin_bottom, margin_left (inches), prefer_css_page_size, prepare_lazy_content, and timeout_ms. Defaults are US Letter with 1 cm margins, matching Chromium. When a page declares a CSS @page size and prefer_css_page_size is set, it takes precedence over the explicit paper dimensions; those dimensions remain the fallback without a CSS page size.
  • Rust callers can use PdfExportOptions with BrowserSession::print_to_pdf_with_options; the earlier PdfOptions struct and BrowserSession::print_to_pdf method remain available with their original fields and behavior.
  • BrowserSession::font_status resolves document.fonts.ready and reports the settled status.
  • Await-promise CDP primitives evaluate_awaiting_promise and call_function_on_awaiting_promise, plus engine-neutral evaluate_awaiting_promise and await_fonts_ready on the BrowserDriver seam.

Changed

  • Generalized the screenshot policy-restore guard into FaithfulRenderGuard, shared by screenshot and PDF export.

Fixed

  • PDF export now attempts to restore images and CSS webfonts blocked during page load. browser_pdf previously called Page.printToPDF with no preparation, so an agent-default export embedded no blocked images and never waited for webfonts. Screenshot and PDF share a preparation path that lifts the relevant blocklist, re-requests blocked images and pending CSS webfonts, then waits up to timeout_ms for network, image, and font readiness. Integration coverage includes a cross-origin stylesheet with a signed font URL. Recovery is best-effort: a font pattern the stylesheet recovery cannot identify, or an unavailable resource, can leave fallback content in the capture. Only the readiness polling phase is bounded; resource and lazy-content preparation can add time before that budget begins. If the polling deadline expires, capture proceeds on a best-effort basis.
  • Font recovery reprocesses a matching stylesheet through CDP while preserving its original URLs. This is covered for a cross-origin stylesheet and signed font URL; it does not guarantee every font-loading pattern on every page.
  • PDF export accepts documents without an HTML body and keeps the original viewport scroll position after lazy-content preparation.
  • Screenshots also wait for font readiness; they previously checked network and images only.
  • A recoverable preparation error restores the configured resource policy without closing the browser session.
  • The MCP tools/call deadline is 120 seconds for execution. When a screenshot or PDF task is aborted at that deadline, the recovery path waits up to 16 seconds for deferred resource-policy restoration before replying. If restoration fails, it closes the affected isolated context or resets the shared browser; that cleanup can add more time beyond the execution deadline.
  • flashbrowse doctor now launches and shuts down a browser session before requiring a successful --version probe. The previous check accepted an executable file even when Chrome could not start because a shared library was missing; the launch error now makes the Chromium check fail.
  • Windows flashbrowse doctor now converts the CIM available-memory value from KiB to MiB once, so the available-memory check reports the expected unit.

v1.5.1

Changed

  • Split browser launch, transport, session, tree compression, and MCP code into smaller modules. Moved usage, architecture, benchmarks, and contributor instructions into dedicated guides.

Fixed

  • Record network requests and their responses in Chrome's event order. HTTP failures remain visible in browser_network with failed_only: true during request bursts, subject to the existing 200-entry log limit.
  • Exercise network log overflow without depending on task scheduling, and wait for the expected response with a deadline in the browser integration test.

Questions & answers.

How is flashbrowse different from Playwright or Puppeteer?

Playwright and Puppeteer are full cross-browser testing frameworks with Node/Python runtimes. flashbrowse is a single Rust binary focused on LLM agents: it connects directly over Chrome DevTools Protocol, blocks bloat by default, waits for a stable accessibility tree, and compresses snapshots 3x–23x smaller.

Does flashbrowse require Python, Node.js, or Docker?

No. The flashbrowse binary has zero Python, Node, or JVM dependencies. Chrome or Chromium is the only external requirement (and flashbrowse setup can download a managed Chrome for Testing build automatically).

How does the Node.js package @nhrbuilds/flashbrowse relate to the Rust repo?

flashbrowse-js (@nhrbuilds/flashbrowse on npm) wraps the native flashbrowse binary with typed ESM/CommonJS APIs (Flashbrowse, FlashbrowseError) and a reusable startMcpClient() helper, bundling optional native binaries for Linux, macOS, and Windows.

How do monthly, yearly, and one-time sponsorships work?

All sponsorships go through Whop and enter manual review before appearing publicly. Monthly and yearly sponsors stay in their tier slot while active; one-time sponsors get a fixed featured window (30, 90, or 180 days by tier) before transitioning into the permanent compact supporters list.