CLI tool
lightpanda-io/browser avatar
lightpanda-io/browser

Lightpanda: a Zig headless browser built from scratch for AI agents and automation

Lightpanda: the headless browser designed for AI and automation. Start a CDP server Once the CDP server started, you can run a Puppeteer script by configuring the browserWSEndpoint.

42,040 stars2,115 forksZigAGPL-3.0

At a glance

What is it?
Lightpanda is a from-scratch headless browser written in Zig, aimed at AI agents and automation workloads. It ships a CDP server, a native agent mode, and a script format called PandaScript, and describes its png and pdf dumps as a text-only rendering of the page.
Who is it for?
Adopt Lightpanda if your workload is high-volume scraping, structured extraction, or AI agent navigation where page count and memory dominate. Do not adopt it if you need faithful image or PDF rendering, since the png and pdf dumps are described as a text-only rendering of the page.
Can I use it commercially?
Yes, with strict conditions. AGPL-3.0 is a network copyleft licence: if people use a modified version over a network, for example as a hosted service, you must offer them its source code under the same licence.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly Zig, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 14, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • lightpanda-io/browser42,040 ★ · +9,010
Star history
Repository2026-07-302026-11-14
lightpanda-io/browser33k42k

9,010 Stars in the last 107 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

What Lightpanda actually is

Lightpanda is a headless browser written in Zig, not a wrapper around Chromium or WebKit. The README is explicit: "Not a Chromium fork. Not a WebKit patch. A new browser." The target user is someone building AI agents or automation scripts that need to navigate pages, click elements, fill forms, and extract data, but who does not need a full desktop browser. The project positions itself as a faster, lighter alternative to headless Chrome for exactly those workloads. It is not trying to replace the browser you use for development or debugging. It is a server that speaks Chrome DevTools Protocol and accepts connections from Puppeteer or Playwright clients, plus a native agent mode that does not need an external driver.

How the CDP server and Puppeteer integration work

The core mechanism is a CDP server started with the `serve` subcommand. You run `./lightpanda serve --obey-robots --log-format pretty --log-level info --host 127.0.0.1 --port 9222`, and then a Puppeteer script connects via `browserWSEndpoint: "ws://127.0.0.1:9222"`. The README shows a script using `puppeteer-core` where the rest of the Puppeteer API, like `createBrowserContext`, `newPage`, `goto`, and `evaluate`, stays the same. That is a significant compatibility promise. The browser implements enough of the CDP protocol for Puppeteer to drive it. The `fetch` subcommand is a simpler path: it dumps a URL to html, markdown, png, or pdf, with flags for waiting (`--wait-until`, `--wait-ms`, `--wait-selector`, `--wait-script`). For automation, the CDP route is the one that matters because it lets your existing Puppeteer or Playwright code run against a different backend.

The agent mode and PandaScript

Beyond CDP, Lightpanda has a native agent mode. `lightpanda agent` lets you drive the browser with a native agent, described in plain English or with slash commands. Because the agent runs in the same process as the browser, every tool call is a direct operation, which is how it keeps the speed and memory advantage. The output of a session is a PandaScript file, which the README describes as "vanilla JavaScript with a small set of native browser primitives." You save it with `/save` and replay it with `lightpanda run <script>.js`. The claim is that scripts are deterministic and token-free, so you can prototype with an LLM and then run the script without a model. That is a practical design: the LLM is a development tool, not a runtime dependency. The trade-off is that the agent is only as good as the underlying browser's ability to handle the pages you point it at.

Memory and speed claims, and what they do not tell you

The README includes a benchmark table: requesting 933 real web pages on an AWS EC2 m5.large instance, Lightpanda used 123MB peak memory for 100 pages versus 2GB for headless Chrome, and took 5 seconds versus 46 seconds. That is roughly 16 times less memory and 9 times faster. These are striking numbers, but they come from a single instance type and a specific page set. The README links to a demo repository with benchmark details, but the table alone does not say which pages were excluded or how many failed to render. You should run the benchmark on your own workload before trusting the numbers for your use case.

Installation paths and the glibc trap

You can install Lightpanda via Homebrew (`brew install lightpanda-io/browser/lightpanda`), Arch AUR (`yay -S lightpanda-nightly-bin`), or download a nightly binary from GitHub releases. There are Linux and macOS builds for x86_64 and aarch64. The README gives a curl command for Linux and macOS, followed by a `version` check to verify the binary. A notable constraint: the Linux binaries are linked against glibc, so they fail on musl-based distros like Alpine with `cannot execute: required file not found`. The README suggests using a glibc base image like `ubuntu:24.04` (`debian:bookworm-slim` works on x86_64 only), or building from source. Windows has no native binary; you must use WSL2, and the README notes that WSL forwards `localhost:9222` automatically, so your automation client can run on the Windows host. There is also an official Docker image: `docker run -d --name lightpanda -p 127.0.0.1:9222:9222 lightpanda/browser:latest`. The Docker route is the cleanest for a server deployment, but the `latest` tag means you are tracking a moving target.

Native MCP support and its limits

Lightpanda includes an MCP server: the README refers to an MCP `structuredData` tool, which `--dump structured_data` mirrors. That lets an AI assistant or agent framework use the browser as a tool.

A real alternative: headless Chrome or Playwright's own browser

The obvious alternative is headless Chrome itself, which the benchmark compares against. Chrome gives you full web compatibility, every CDP method, and years of debugging. The cost is memory and speed, as the benchmark shows. Another alternative is Playwright's bundled Chromium, which is similar to Chrome but with a different automation API. The difference in approach is fundamental: Chrome is a complete browser with a headless mode, while Lightpanda is a minimal browser built for a specific niche. If your automation must work on any site, including those with heavy JavaScript, Chrome is the safer choice. If your workload is bulk extraction from many pages where most are static or lightly scripted, Lightpanda's lower memory footprint could let you run more concurrent instances on the same hardware. You should treat it as a specialized tool, not a drop-in replacement.

Licence and maintenance considerations

Lightpanda is licensed under AGPL-3.0. That is a strong copyleft licence: if you modify the browser and offer it as a network service, you may need to release your modifications. For internal automation that does not distribute the software, it is less of a concern, but you should check with your legal team if you plan to offer a hosted service built on Lightpanda. The project is actively maintained, with releases 1.0.0 on 2026-10-02, 1.0.1 on 2026-10-15 and 1.0.2 on 2026-10-23, and the last push on the default branch on 2026-11-02. That suggests a steady release cadence. You should pin a specific version in your deployment and test upgrades before rolling them out.

Editorial conclusion

Adopt Lightpanda if your workload is high-volume scraping, structured extraction, or AI agent navigation where page count and memory dominate. Do not adopt it if you need faithful image or PDF rendering, since the png and pdf dumps are described as a text-only rendering of the page. Before committing, verify that your target pages load and that the dump modes (html, markdown, png, pdf) produce what you need, and check the AGPL-3.0 license against your distribution plans. Follow the benchmark details in the demo repository on your own hardware, because the published numbers come from one EC2 instance and may not reflect your traffic.

Frequently asked questions

Does Lightpanda run on Alpine Linux or on Android?

Not from the release binaries. They are linked against glibc, so on musl distributions such as Alpine and on Android or Termux the binary fails with `cannot execute: required file not found`. Use a glibc base image such as `FROM ubuntu:24.04` (`FROM debian:bookworm-slim` works on x86_64 only), or build from sources.

How do I connect Puppeteer to Lightpanda?

Start the CDP server with `serve`, for example on `--host 127.0.0.1 --port 9222`, and point the client at it with the `browserWSEndpoint` option set to `ws://127.0.0.1:9222`. The rest of the Puppeteer script stays the same, and a Docker run exposes the same port 9222.

What is a PandaScript, and do I need an LLM in production?

It is the output of an agent session: vanilla JavaScript with a small set of native browser primitives built directly into Lightpanda. Run `/save` in the session to export one and replay it with `lightpanda run <script>.js`, and because the scripts are deterministic and token-free you can ship them with no model at runtime.

Is there a native Lightpanda build for Windows?

No native Windows binary exists, so it is installed inside WSL following the Linux steps. WSL forwards `localhost:9222` automatically, which lets your automation client run either inside WSL or on the Windows host.

What licence is Lightpanda released under?

The repository is licensed under AGPL-3.0 and carries a separate LICENSING.md alongside the LICENSE file, so the terms worth reading before you integrate it are in those two files rather than in the README.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
  4. Release notes
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/lightpanda-io-browser.svg)](https://hysenlabs.com/projects/lightpanda-io-browser)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/lightpanda-io-browser.svg)](https://hysenlabs.com/projects/lightpanda-io-browser)

Was this useful?