Skip to content
FossShelf
Home / Categories / For Web Developers

browser

Headless browser for AI agents: 9x faster than Chrome, built in Zig

Replaces Browserbase, Browserless, Hyperbrowser

42.15K starsAGPL-3.0reviewed 8 Sept 2026last commit 14 Nov 2026
Screenshot of browser

Who it's for

AI agent developers building web-browsing pipelines

Lightpanda gives AI agents a browser that starts in milliseconds and uses less RAM than many Node.js processes. The native agent mode lets you prototype in natural language and export a PandaScript that runs in production without an LLM. Supports Anthropic, OpenAI, Gemini, Mistral, and any OpenAI-compatible endpoint.

Your agent targets a small, fixed set of pages where a simpler HTTP client is sufficient. If the pages require no JavaScript and load reliably with a plain fetch, the browser overhead is unnecessary.

Data engineers running high-volume web scraping pipelines

With 16x lower peak memory than Chrome, significantly more concurrent scrapers can run on the same server. CDP compatibility means existing Puppeteer or Playwright scripts work without modification. The Docker image (`lightpanda/browser:nightly`) deploys in one command and exposes a CDP server on port 9222.

If your scraping targets are mostly static HTML with no JavaScript rendering required, a simpler HTTP client or a lighter tool will be faster and easier to operate.

Teams migrating from Browserbase, Browserless, or Hyperbrowser

Lightpanda is Puppeteer-compatible: replace the `browserWSEndpoint` in your existing script and point it at your self-hosted Lightpanda CDP endpoint. The migration involves minimal code change. Self-hosting eliminates per-session fees at the cost of managing your own infrastructure.

If your team does not have capacity to manage a containerized service, a managed browser cloud may justify its ongoing cost through operational simplicity.

Backend engineers exposing browser access to AI agents via MCP

The native MCP server runs over stdio or HTTP. In HTTP mode, concurrent agents each get an isolated browsing session, preventing state leakage between tasks. One Lightpanda process can serve multiple agents simultaneously without Chrome's per-instance overhead.

If your agents only need to read static pages or call structured APIs, adding MCP browser access introduces unnecessary complexity. Use direct HTTP calls instead.

The problem

Running headless Chrome in production is expensive and slow. A single Chrome instance consumes over 2GB of RAM at peak, and scaling to hundreds of parallel workers means provisioning serious compute just to run a browser. Chrome was not built for cloud-native automation: it carries decades of rendering code, persistent state, and UI subsystems that are irrelevant in a headless context. For AI agent builders, the problem is sharper. Agents need to browse dozens or hundreds of pages per task, and waiting for Chrome to start per session kills throughput. Data teams scraping at scale face the same issue: the infrastructure cost of running Chrome workers often exceeds the compute needed for the actual business logic. Most teams end up paying for managed browser services like Browserless or Browserbase rather than self-hosting, trading cost control for convenience.

How it works

Chrome DevTools Protocol (CDP) compatibility

Exposes a CDP server on port 9222 that existing Puppeteer and Playwright scripts connect to without modification. Replace the `browserWSEndpoint` in your Puppeteer config and the rest of your script runs unchanged. WebDriver Bidi is also supported via `--protocol webdriver`, and both protocols can run simultaneously from a single Lightpanda process.

16x lower peak memory than headless Chrome

On a benchmark of 933 real web pages on an AWS EC2 m5.large instance, Lightpanda peaked at 123MB of memory versus 2GB for headless Chrome. That ratio holds at scale: the same server that runs 10 Chrome instances can run far more Lightpanda instances on the same hardware. The benchmark code is public in the lightpanda-io/demo repository.

Native agent mode for LLM-driven browser control

The `lightpanda agent` command lets you drive the browser with a single LLM call. Describe a task in plain English and the agent navigates pages, clicks flows, fills forms, and extracts structured data. Supports Anthropic, OpenAI, Gemini, Mistral, and any OpenAI-compatible endpoint. Agent sessions export a PandaScript that replays in production without an LLM at runtime.

MCP server with isolated per-session browsing contexts

Lightpanda runs as an MCP server over stdio or HTTP. In HTTP mode, each client connection gets its own browsing session with its own page, cookies, and memory, so multiple agents run concurrently without clobbering each other's state. The `session_new`, `session_list`, and `session_close` tools manage sessions explicitly.

Full JavaScript execution without graphical rendering

Runs Ajax, single-page apps, and modern JavaScript frameworks using V8 for execution and html5ever for HTML parsing. Skips graphical rendering entirely, which is the main source of Chrome's overhead in headless mode. Supports fetch, XHR, clicks, form input, cookies, custom headers, proxy, network interception, and an adblocker.

Built from scratch in Zig, not a Chromium fork

Written in Zig, a low-level systems language with explicit memory control. Shares no code with Chromium, Blink, or WebKit. The 9x speed and 16x memory improvements over headless Chrome come from this foundation: Lightpanda carries none of the legacy display or UI code that Chrome includes for human-facing features irrelevant to automation.

Features

  • Chrome DevTools Protocol (CDP) compatibility
  • 16x lower peak memory than headless Chrome
  • Native agent mode for LLM-driven browser control
  • MCP server with isolated per-session browsing contexts
  • Full JavaScript execution without graphical rendering
  • Built from scratch in Zig, not a Chromium fork

How to install

Deploy Lightpanda as a Docker container to start a CDP server on port 9222.

docker run -d --name lightpanda -p 127.0.0.1:9222:9222 lightpanda/browser:nightly

Recommended for this setup

Strengths

  • Drop-in replacement for Chrome-based Puppeteer scripts: CDP compatibility means teams swap one line of code to migrate. Replace `browserWSEndpoint` in the Puppeteer connect call with the Lightpanda endpoint and the rest of the script runs unchanged. Playwright and other CDP-compatible clients work the same way. No rewrite required.
  • Performance advantage backed by a public benchmark: The 9x speed and 16x memory advantage comes from a published benchmark: 933 real web pages on AWS EC2 m5.large, with code in the public lightpanda-io/demo repository. Teams can reproduce the test against their own workloads before committing to a migration.
  • Eliminates per-session fees at high scraping volume: Browserbase and Browserless charge per-compute or per-session for managed infrastructure. Lightpanda is AGPL-3.0 and self-hostable via Docker: server cost replaces API billing. For moderate to high scraping volume, the economics shift significantly in favor of self-hosting.
  • Purpose-built: no graphical subsystems consuming resources: Chromium includes rendering pipelines, GPU code, and UI subsystems that consume memory even in headless mode. Lightpanda omits all of it by design. The result is faster startup, lower memory, and a smaller attack surface in cloud environments.

Trade-offs

  • AGPL-3.0 restricts use as an external managed service: Self-hosting Lightpanda for internal use, including internal commercial team use, carries no licensing obligation. Building a managed browser service for external customers on top of Lightpanda requires publishing your source modifications under AGPL-3.0. Teams that need to avoid AGPL obligations should evaluate the commercial license. This does not affect teams running it purely internally.
  • Nightly builds only: no stable versioned release channel: Install commands pull from the nightly build tag on GitHub. There is no separate versioned stable release channel. Teams that need reproducible, pinned builds for production must pin to a specific nightly artifact and manage upgrades manually.
  • No native Windows binary: WSL2 required on Windows: Lightpanda ships Linux (x86_64 and aarch64) and macOS binaries. Windows users must install via WSL2. The Puppeteer or Playwright client can run on the Windows host; WSL2 forwards localhost:9222 automatically. Pure Windows deployments without WSL2 are not supported.
  • Web platform coverage is narrower than Chromium: CORS support is experimental (requires `--experimental-features cors`). The project publishes daily Web Platform Test results at perf.lightpanda.io/wpt, and some tests fail. Sites that depend on browser APIs not yet implemented will not render correctly. Teams with broad, unpredictable site targets may need a fallback to Chrome for edge cases.

Tech stack

Languages
Zig, HTML, Linker Script, Rust, JavaScript, Shell, Nix, Python, Makefile, Dockerfile, Go
Frameworks
—
Databases
—
Tooling
Playwright, Puppeteer

FAQ

Is Lightpanda compatible with Puppeteer and Playwright?

Yes. Lightpanda exposes a Chrome DevTools Protocol (CDP) server on port 9222. To connect Puppeteer, replace `puppeteer.launch()` with `puppeteer.connect({ browserWSEndpoint: 'ws://127.0.0.1:9222' })` and the rest of your script runs unchanged. Playwright and other CDP-compatible clients connect the same way. WebDriver Bidi is also supported via `--protocol webdriver`.

How much faster and lighter is Lightpanda than headless Chrome?

On a published benchmark of 933 real web pages on an AWS EC2 m5.large instance, Lightpanda completes 100 pages in 5 seconds with a peak memory of 123MB. Headless Chrome completes the same task in 46 seconds using 2GB of memory: roughly 9x faster and 16x less memory. The benchmark code is public in the lightpanda-io/demo repository.

Is Lightpanda free to self-host?

Yes. Lightpanda is AGPL-3.0 licensed. You can download, run, and use it for internal purposes, including internal commercial team use, at no cost. If you build an external managed service on top of Lightpanda and distribute it to external users, AGPL-3.0 requires publishing your source modifications. A commercial license is available for teams that need to avoid AGPL obligations.

Does Lightpanda run on Windows?

Not natively. Lightpanda ships Linux (x86_64 and aarch64) and macOS binaries. On Windows, install via WSL2 using the standard Linux steps. Your Puppeteer or Playwright client can run on the Windows host; WSL2 forwards localhost:9222 automatically. Docker Desktop on Windows with a WSL2 backend also works using the official lightpanda/browser image.

What is Lightpanda's agent mode?

Agent mode (`lightpanda agent`) lets you drive the browser by describing tasks in plain English or with slash commands. The agent navigates pages, clicks through flows, fills forms, and extracts structured data. It supports Anthropic, OpenAI, Gemini, Mistral, and any OpenAI-compatible endpoint. Sessions export a PandaScript file you can replay in production without an LLM at runtime.

Similar tools

More in Web Developers