APACHE-2.0 · V0.14.0 RELEASED · 3-TIER HYBRID ENGINE
Run a fast, isolated fleet of headless Chrome.
Fluxwright resolves static pages in pure Rust HTTP first, routes non-visual scripts through an optional light-CDP tier, and pools isolated Chrome contexts with automatic crash recovery, replayable sessions, built-in E2E tests, and a 22-tool MCP server.
npm install fluxwrightHybrid fast-path & pooled Chrome fleet
- HTTP fast hits
- 842
- Browser jobs
- 1,284
- Recycled
- 3
- Retried
- 1
Every capability, built for scale.
Playwright drives one browser cleanly. Running hundreds across machines takes a control plane: Tier 1 Rust fast path, cgroup budgets, crash retries, session replay, and 22 MCP tools.
Three tiers when speed counts, one lifecycle underneath.
Stay in zero-browser Rust HTTP when the HTML already has what you need, or escalate seamlessly to external light-CDP or pooled Chromium without changing callers.
Pure-Rust HTTP + html5ever
Fetches static docs, blogs, sitemaps, and server-rendered pages using rustls + ring and DNS-pinned SSRF checks on every redirect hop. Zero Chrome launched.
mode: "auto" | "http"External Light-CDP Server
Routes non-visual escalated JS jobs to a user-supplied lightweight CDP endpoint (such as Moli, Obscura, or Lightpanda) with graceful -32601 fallback and zero AGPL entanglement.
--fast-cdp-endpoint <url>Pooled chrome-headless-shell
Automatically takes over for SPAs, challenge pages, interactions, screenshots, PDFs, or snapshots with isolated contexts, crash retries, and optional --low-memory flags.
--low-memory · cgroup 75%- 01
Route
Static scrapes hit Tier 1 Rust HTTP first; browser jobs enter engine.run().
- 02
Admit
Busy pools queue by priority or shed load above the cgroup RAM ceiling.
- 03
Lease
Each job gets an isolated context on the least busy Chrome. Zero shared state.
- 04
Run
Drives navigation, locators, snapshots, screencasts, or visual diffs safely.
- 05
Recycle
Destroys the context immediately and drains bloated browsers without stalling.
Native speed in every runtime.
Node and Python load a compiled Rust native module directly in process, eliminating intermediate Node/Go driver hops. Use one Playwright-style API across TypeScript, Python, Rust, HTTP, CDP WebSockets, and MCP.
The 22-tool MCP server exposes navigation (open, goto, back, forward, tabs, close), AI inspection (snapshot with @eN@rK revision guardrails, markdown, title, content, screenshot), actions (click, hover, fill, press, select, scroll, wait_for, evaluate), and diagnostics (console, network, export_api_calls).
import { chromium } from "fluxwright";
const browser = await chromium.launch({ maxBrowsers: 4 });
// Fresh browser context on a pooled Chrome.
const page = await browser.newPage();
await page.goto("https://example.com", { waitUntil: "domcontentloaded" });
await page.getByRole("button", { name: "Accept" }).click();
await page.getByRole("textbox", { name: "Search" }).fill("chromium");
// Cross-origin iframes pierce cleanly with the same locator API.
const payment = page.frameLocator("iframe#payment");
await payment.getByRole("textbox", { name: "Card" }).fill("4242");
// AI accessibility snapshots (@eN@rK revision guardrails) + Markdown.
const snapshot = await page.ariaSnapshot();
const markdown = await page.markdown();
await page.close(); // destroys context and frees the pool slot
await browser.close();import asyncio
from fluxwright.async_api import async_playwright
async def main():
async with async_playwright() as p:
browser = await p.chromium.launch(max_browsers=4)
# Fresh browser context on a pooled Chrome.
page = await browser.new_page()
await page.goto("https://example.com", wait_until="domcontentloaded")
print(await page.title())
await page.get_by_role("button", name="Accept").click()
await page.get_by_role("textbox", name="Search").fill("chromium")
await page.close() # destroys context and frees the pool slot
asyncio.run(main())use fluxwright::{BrowserEngine, JobOptions, Priority};
let engine = BrowserEngine::builder()
.max_browsers(8)
.max_contexts_per_browser(10)
.memory_ceiling_mb(8192)
.recycle_after_jobs(200)
.low_memory(true)
.build()
.await?;
// run() queues, leases, retries on renderer crash, and drops the context.
let job = JobOptions::default().priority(Priority::High).retries(2);
let title = engine
.run(job, |page| async move {
page.goto("https://example.com").await?;
page.title().await
})
.await?;// POST /v1/scrape with Tier 1 pure-Rust HTTP fast path ("mode": "auto")
const res = await fetch("http://127.0.0.1:7331/v1/scrape", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.FLUXWRIGHT_SERVER_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
url: "https://docs.example.com/guide",
mode: "auto", // "auto" | "http" | "browser"
formats: ["markdown", "text"],
block_cookie_banners: true,
}),
});
const data = await res.json();
// data.engine => "http" (static) or "browser" (auto-escalated SPA)
// data.fallback_reason => populated whenever Tier 1 escalates
// POST /v1/map discovers links + optional XML sitemaps cleanly:
// { "url": "https://example.com", "mode": "auto", "include_sitemap": true }import { test, expect } from "fluxwright/test";
test.use({ trace: "retain-on-failure", video: "retain-on-failure" });
test("homepage renders", async ({ page }) => {
await page.goto("https://example.com");
await expect(page).toHaveTitle(/Example/);
await expect(page.getByRole("heading")).toHaveText("Example Domain");
await expect(page).toHaveScreenshot("home.png");
});
// Parallel runner with sharding, retries, and HTML report:
// $ npx fluxwright-test --workers=4 --retries=1 --reporter=list,html// Serve hybrid HTTP API + pooled /cdp gateway + managed sessions
// $ fluxwright serve \
// --low-memory \
// --recycle-rss-mb 512 \
// --fast-cdp-endpoint ws://127.0.0.1:9222 \
// --allow-query-token --profiles-dir ./profiles --adaptive-concurrency
// Point existing Playwright scripts directly at the pooled gateway:
import { chromium } from "playwright";
const browser = await chromium.connectOverCDP(
`ws://127.0.0.1:7331/cdp?token=${process.env.FLUXWRIGHT_SERVER_TOKEN}`,
);
const page = await browser.newPage();
await page.goto("https://example.com");{
"mcpServers": {
"fluxwright": {
"command": "fluxwright-mcp",
"args": ["--http", "127.0.0.1:7440"]
}
}
}Benchmarks that hold under chaos.
Every runner executed on identical chrome-headless-shell 158.0.8127.88 binaries with isolated browser contexts per job on ubuntu-latest (4 vCPU).
| Workload scenario | Fluxwright (jobs/s) | puppeteer-cluster | Crawlee | Playwright | Selenium (BiDi) |
|---|---|---|---|---|---|
| 1 browser, 10 pages (100 jobs) | 35.2 | 33.5 | 21.8 | 31.0 | 28.1 |
| 10 browsers, 2 pages each (40 jobs) | 41.8 | 30.7 | 19.6 | 31.3 | 25.5 |
| 500 concurrent (10 browsers × 20 pages) | 43.8 | 33.5 | 23.9 | 33.3 | 26.0 |
| 1,000 queued (4 browsers × 8 pages) | 42.7 | 32.7 | 24.0 | 34.5 | 27.7 |
| 100 PDFs (4 browsers × 8 pages) | 37.6 | 29.1 | 22.1 | 32.5 | 23.7 |
| 200 scraping jobs (images + fonts) | 30.2 | 27.1 | 20.6 | 25.1 | 20.8 |
| 1,000 chaos jobs (browser kill / 2s) | 40.0 | 23.3 | 3.3 | 25.8 | 82.4% failed |
Measured in GitHub Actions run 45952022742 (27 November 2026) with full-lifecycle job timing, process-tree RSS, and normalized host CPU% on chrome-headless-shell 158.0.8127.88, plus fastpath-bench.mjs (497.0 req/s on /v1/scrape, 1,023.5 req/s on /v1/map in 14 MB RSS). Selenium runs WebDriver BiDi (fresh browser.createUserContext() per job); Crawlee uses 797–1,216 MB peak RAM behind pLimit(1) page serialization. In chaos, raw Playwright (74.0% failed) and Selenium (82.4% failed) drop jobs once their 4 browsers die, while soak-5m (45825257140) held 7,898 jobs at 0.0% failure.
Install in seconds, run anywhere.
Tier 1 HTTP fast-path endpoints run with zero browser binaries installed. For full Chromium rendering, install chrome-headless-shell, which opened pages 5 to 10 times faster than full headed Chrome in our CI runs.
fluxwright installnpm install fluxwrightUnscoped prebuilt binaries across Windows x64, macOS (Apple silicon & Intel), and Linux (x64 & ARM64 glibc). Requires Node 18 or later.
pip install fluxwrightABI3 wheels and source dist across Windows x64, macOS (Apple silicon & Intel), and Linux (x64 & ARM64 glibc). Python 3.10+, asyncio & sync APIs + pytest plugin.
[dependencies]
fluxwright = "0.14"
tokio = { version = "1", features = ["full"] }Published on crates.io for Rust 1.95+ with pure-Rust ring TLS (zero cmake/nasm required).
cargo install fluxwright-mcp
fluxwright-mcp --http 127.0.0.1:7440Prebuilt fluxwright-mcp archives for all 7 targets are on GitHub Releases.
cargo install fluxwright-cli
fluxwright install
fluxwright doctor
fluxwright serve --listen 127.0.0.1:7331 --low-memory --recycle-rss-mb 512Add --fast-cdp-endpoint ws://... for external light-CDP execution or use fluxwright coordinate for multi-node cluster leases.
docker pull ghcr.io/harshit-d3v/fluxwright:latest
docker run --rm \
-e FLUXWRIGHT_SERVER_TOKEN="$FLUXWRIGHT_SERVER_TOKEN" \
-p 127.0.0.1:7331:7331 --shm-size=1g \
--memory=4g --cpus=4 --cap-add=SYS_ADMIN \
ghcr.io/harshit-d3v/fluxwright:latestMulti-arch image (linux/amd64 + linux/arm64) on GHCR. Reads container cgroup limits automatically and reaps Chromium subprocesses via tini.
Know before you choose it.
What it does not do
- Firefox or WebKit. Fluxwright is HTTP fast-path + Chromium CDP only.
- Interactive GUI codegen or a built-in Trace Viewer UI (Fluxwright writes Playwright-compatible
.ziptraces you open in Playwright Trace Viewer). - Java or .NET SDKs. Official bindings target Node, Python, and Rust.
- Anti-bot evasion.
Safe by default
- Chrome's sandbox stays enabled unless
FLUXWRIGHT_NO_SANDBOX=1is set. - Tier 1 HTTP fast path validates URLs via netguard DNS pinning on every 3xx redirect hop.
- Linux and macOS control Chrome over a private pipe, never an open debug port.
- Jobs never share cookies or storage; Chrome exits immediately when the engine exits.
- HTTP and CDP endpoints require bearer tokens; saved profiles and journals write
0600on Unix with isolatedFLUXWRIGHT_WORKER_TOKENTLS support.