Lightpanda Browser

A from-scratch browser engine in Zig that your existing Puppeteer and Playwright scripts can drive

Lightpanda: the headless browser designed for AI and automation

Category
Developer tools
Audience
Developers
Language
Zig
Licence
AGPL-3.0

Updated

Lightpanda is a headless browser written from scratch in Zig for AI agents, crawlers and automation pipelines that load web pages by the thousand. It is not a Chromium fork and not a patched WebKit, which is the project's central claim: rather than trimming an engine built for people looking at screens, it builds a new one around what a script actually needs. The audience is developers running scraping jobs, agent loops or automation fleets at a scale where headless Chrome's memory footprint and start-up cost have become a line item worth attacking.

What it does

Lightpanda runs web pages without a display and speaks the Chrome DevTools Protocol, the same protocol the mainstream automation clients already use. In practice that means pointing Puppeteer or Playwright at Lightpanda instead of at a Chrome instance and leaving the rest of your script untouched — the project's pitch is zero rewrites. It also ships an agent mode you can run straight from the terminal, for cases where you would rather have the browser do the crawling itself than stand up a Node client around it.

The performance claims come from the project's own benchmark: 933 real web pages requested over the network on an AWS EC2 m5.large instance.

  • Peak memory over 100 pages: 123 MB, against 2 GB for headless Chrome — roughly sixteen times less.
  • Execution time for 100 pages: 5 seconds, against 46 seconds — roughly nine times faster.

The methodology is published alongside the numbers in a companion demo repository. As with any vendor benchmark, the useful move is to re-run it against your own target pages before planning capacity on it.

How it works

The difference is architectural rather than a matter of tuning flags. Mainstream headless browsers are the same engines that power interactive browsing, started with the window turned off, so they carry the machinery that exists for a human audience and the process model that protects that audience. Lightpanda's premise is that an agent fetching a page and running the JavaScript behind it is a narrower job, and that an engine written for that job can be much smaller.

The implementation language matters here too. Zig has no garbage collector and gives the author explicit control over allocation — exactly the kind of decision that shows up in a peak-memory figure rather than in a design document.

Compatibility is handled at the protocol boundary instead of by sharing code with Chromium. Because CDP is what Puppeteer and Playwright already speak, implementing that protocol is enough to slot into the existing ecosystem without asking anyone to adopt a new client library or rewrite their selectors.

Getting started

Distribution is currently through nightly builds. With Homebrew:

brew install lightpanda-io/browser/lightpanda

On Arch Linux, from the user repository:

yay -S lightpanda-nightly-bin

Binaries are also published directly on the repository's nightly releases page. From there you start Lightpanda, connect an existing Puppeteer or Playwright script to it over CDP, or use the terminal agent mode. The project runs a Discord server, which is the practical place to ask when something a site does is not yet handled.

When to use it / when not

Reach for it when volume is the constraint: an agent that opens hundreds or thousands of pages, a crawler on a small instance, a scraping pipeline whose cloud bill is mostly RAM. That is the shape of workload the benchmark models, and the CDP compatibility means trying it is cheap — you keep the script and change the endpoint.

Be more careful when breadth of web-platform support matters more than throughput. A browser built from scratch is a younger codebase than an engine with two decades of edge cases behind it, and the material here publishes speed numbers rather than a compatibility matrix, so the honest test is your own pages. The AGPL-3.0 license is worth reading early if you plan to embed the browser in a hosted product; it is not the permissive license most tooling in this space ships under.

Alternatives

The incumbent is headless Chrome or Chromium driven by Puppeteer or Playwright, and it is the comparison the project makes directly. That stack is the safe default: near-perfect fidelity with what users see, and every scraping guide on the internet assumes it. What it costs you is memory and time per page, which is tolerable for a test suite and expensive for a crawler. Lightpanda's bet is that a large class of automation never needed the fidelity it is paying for.

Anyone running browser automation at volume — agent builders, scraping teams, anyone whose crawler bill is dominated by Chrome processes — should try Lightpanda on their own workload, because the switching cost is a changed connection string and the upside the project measures is close to an order of magnitude on both time and memory. Teams whose automation is small, occasional, or dependent on exotic browser behaviour have less to gain and should stay on Chrome until the engine's coverage is proven against their own sites. With nearly 35,000 stars and active development, it is at least a project worth watching even if today is not the day you move.

More in Developer tools

All of Developer tools →