🎯 A customizable, anti-detection cloud browser powered by self-developed Chromium designed for web crawlers and AI Agents.πŸ‘‰Try Now
Back to Blog

What Is Lightpanda? The Zig Headless Browser for AI Agents

Alex Johnson
Alex Johnson

Senior Web Scraping Engineer

10-Jul-2026

TL;DR:

  • Lightpanda is a headless browser written from scratch in Zig β€” not a Chromium fork β€” that pairs V8 for JavaScript with its own DOM implementation, released open source under AGPL-3.0 and past 31,000 GitHub stars.
  • The project's crawler benchmark (933 real pages on an AWS m5.large) measured 123 MB peak memory over 100 pages against 2 GB for headless Chrome, and roughly 9x faster execution β€” the numbers behind its "fastest headless browser" reputation.
  • One binary does four jobs: fetch dumps a rendered page as HTML or markdown, serve exposes a CDP server for Puppeteer, agent drives the browser with an LLM in plain English, and mcp plugs it into MCP clients.
  • Lightpanda is in Beta with partial web-standards coverage β€” CORS is still an open issue and some sites crash or misrender β€” so it shines on high-volume crawling of pages it handles, not as a universal Chrome replacement.
  • When a target needs full Chromium fidelity, residential egress, or challenge handling, Scrapeless Scraping Browser picks up the same CDP workflow as a managed cloud session β€” Lightpanda for speed on the easy 80%, a managed cloud browser for the hard 20%.
  • Free to start. New Scrapeless accounts include free Scraping Browser runtime β€” sign up at app.scrapeless.com.

Introduction: what a browser looks like when you delete the parts scrapers never use

A crawler that processes a million pages never paints a pixel. It still pays for Chromium's compositor, GPU process, and media stack on every instance, because headless Chrome is a desktop browser with the window removed rather than a browser designed for machines. Lightpanda starts from the opposite end: build only what automation uses β€” an HTTP loader, an HTML parser, a DOM, and a JavaScript engine β€” and skip graphical rendering entirely.

The result is a single Zig binary that executes page JavaScript through V8, parses markup with the Servo project's html5ever parser, loads resources over libcurl, and speaks enough of the Chrome DevTools Protocol that Puppeteer treats it as a browser. It is open source under the AGPL-3.0 license and has collected more than 31,000 GitHub stars.

This guide covers installing Lightpanda, its four CLI modes, connecting Puppeteer, where its Beta boundaries sit, and how it pairs with a managed cloud browser for the targets it can't yet handle.

What is Lightpanda?

Lightpanda is an open-source headless browser engine built specifically for AI agents and web automation, with no lineage from Chromium or WebKit. Because it implements only the machinery automation touches, its footprint is a fraction of a full browser's: the project's published crawler benchmark β€” 933 real web pages requested from an AWS EC2 m5.large β€” recorded 123 MB peak memory across 100 pages versus 2 GB for headless Chrome, and finished the same 100 pages in about 5 seconds versus 46. Those are the project's own measurements; the takeaway that survives any benchmark caveat is that removing the rendering pipeline changes the cost model of running browsers at fleet scale.

The trade-off is coverage. A from-scratch browser has to reimplement decades of web-platform surface, and Lightpanda's status is explicitly Beta: many sites work, some error or crash, and features like CORS are still open issues on the tracker. That honesty matters for how you deploy it β€” more on that below.

Install Lightpanda

Nightly binaries ship for Linux and macOS on x86_64 and aarch64, plus Homebrew (brew install lightpanda-io/browser/lightpanda) and official Docker images. On Linux:

bash Copy
# Download the nightly binary and make it executable
curl -L -o lightpanda https://github.com/lightpanda-io/browser/releases/download/nightly/lightpanda-x86_64-linux && \
chmod a+x ./lightpanda

# Confirm it runs
./lightpanda version

The Linux binary links against glibc, so musl-based distros like Alpine need a glibc base image or a source build. There is no native Windows binary β€” on Windows you install it inside WSL2, which forwards localhost:9222 to the host automatically, so a Puppeteer script on the Windows side connects as if the browser were local.

One default worth knowing before your first run: Lightpanda sends usage telemetry unless you set LIGHTPANDA_DISABLE_TELEMETRY=true in the environment.

The CLI: fetch, serve, agent, mcp

Lightpanda's single binary covers four workflows. The quickest way to see the engine work is fetch, which loads a page β€” JavaScript executed β€” and dumps the rendered result:

bash Copy
# Rendered HTML to stdout; --dump markdown converts the page to markdown instead
./lightpanda fetch --obey-robots --dump html --log-level warn https://demo-browser.lightpanda.io/campfire-commerce/

On the project's demo storefront this returns the fully rendered document (<title>Outdoor Odyssey Nomad Backpack</title> and all), and --dump markdown emits a clean markdown conversion β€” useful when the page is destined for an LLM context window rather than a parser. --wait-until, --wait-ms, --wait-selector, and --wait-script tune how long the engine waits before dumping.

For automation clients, serve starts a CDP server:

bash Copy
./lightpanda serve --obey-robots --log-level warn --host 127.0.0.1 --port 9222

The remaining two modes are newer and mostly undocumented outside the repo: agent drives the browser with an LLM (Anthropic, OpenAI, Gemini, Vertex, Hugging Face, or local models via Ollama) from a plain-English task, and can export the session as a PandaScript β€” replayable JavaScript that reruns the flow deterministically with no model at runtime. mcp runs a native MCP server over stdio, so MCP-capable agents get Lightpanda as a tool without any wrapper process.

Connect Puppeteer

With serve running, puppeteer-core connects over the WebSocket endpoint. This example extracts every link from a JavaScript-rendered listing page:

js Copy
import puppeteer from 'puppeteer-core';

// browserWSEndpoint points at Lightpanda's CDP server
const browser = await puppeteer.connect({
  browserWSEndpoint: 'ws://127.0.0.1:9222',
});

const context = await browser.createBrowserContext();
const page = await context.newPage();

await page.goto('https://demo-browser.lightpanda.io/amiibo/', { waitUntil: 'networkidle0' });

// The DOM is real and V8-rendered, so evaluate works exactly as in Chrome
const links = await page.evaluate(() =>
  Array.from(document.querySelectorAll('a')).map((a) => a.getAttribute('href'))
);
console.log(links.length, 'links');

await page.close();
await context.close();
await browser.disconnect();

Against the live demo page this returns 12 links. Existing Puppeteer code largely carries over; the parts that don't are the parts that touch web-platform features Lightpanda hasn't implemented yet β€” which is the right segue.

Get your API key on the free plan: app.scrapeless.com

The Beta boundary β€” and the operational one

Two distinct limits decide where Lightpanda fits in a production pipeline, and it is worth keeping them separate.

The engine limit is temporary but real. Beta means partial web-standards coverage: CORS is an open issue, some pages error or crash, and a site leaning on unimplemented APIs will not behave like it does in Chrome. The project is transparent about this β€” the README's feature checklist is public β€” and coverage improves steadily. Until it converges, every target needs a quick compatibility check before you commit a crawler to it. Note also the license when embedding: AGPL-3.0 carries copyleft obligations that a commercial product team should review, which is one reason the company offers a hosted cloud offering on its site.

The operational limit is permanent β€” no engine solves it. Like every self-hosted browser, Lightpanda leaves egress, geo-targeting, and challenge handling to you. Requests originate from your machine's IP; a site that rate-limits datacenter ranges or serves traffic-validation interstitials responds to where the request comes from, not to how lean the browser behind it is. Speed at the engine layer does nothing for a request that never gets past the front door.

Pairing it with Scrapeless Scraping Browser

The practical production pattern is a two-tier pipeline. Lightpanda crawls the high-volume, low-resistance tier β€” sitemaps, docs, catalogs, anything its engine renders β€” at a fraction of Chrome's cost. The targets that need full Chromium fidelity, residential egress, or challenge handling route to Scrapeless Scraping Browser: an anti-detection cloud browser powered by self-developed Chromium, with residential proxies in 195+ countries selected per session and no infrastructure on your side.

Both tiers speak CDP to the same Puppeteer code, so the router is one line β€” which WebSocket endpoint you hand to connect. The Scrapeless documentation covers the SDK in full; the session mint looks like this:

js Copy
import { Scrapeless } from '@scrapeless-ai/sdk';
import puppeteer from 'puppeteer-core';

const client = new Scrapeless({ apiKey: process.env.SCRAPELESS_API_KEY });

// A cloud Chromium session with residential egress β€” the "hard targets" tier
const session = await client.browser.create({
  session_name: 'lightpanda-guide-demo',
  session_ttl: 180,
  proxy_country: 'US',
});

const browser = await puppeteer.connect({
  browserWSEndpoint: session.browserWSEndpoint,
  defaultViewport: null,
});

const page = await browser.newPage();
await page.goto('https://demo-browser.lightpanda.io/amiibo/', { waitUntil: 'domcontentloaded' });
await page.waitForSelector('a'); // the listing's anchors attach after the client render
const links = await page.evaluate(() =>
  Array.from(document.querySelectorAll('a')).map((a) => a.getAttribute('href'))
);
console.log(links.length, 'links');

await browser.close();

Same task, same client library, same result shape β€” but the session runs on full Chromium behind managed residential egress, so it also works when the target is one Lightpanda can't render or one that filters by IP. Pricing is usage-based with a free tier that covers this guide. For the detection-heavy end of the spectrum, the Playwright undetected fingerprint browser guide walks the same cloud-session pattern from the Playwright side.

Conclusion: speed where it's cheap, fidelity where it counts

Lightpanda's bet β€” a browser rebuilt from scratch for machines β€” buys an order-of-magnitude cost reduction on the pages it renders, and its agent, MCP, and PandaScript surfaces make it one of the most interesting engines in the AI-automation space. Its Beta coverage and self-hosted nature draw the boundary: verify each target renders correctly, and keep a full-Chromium path for the ones that don't or that gate on egress quality.

Run the split as a routing decision inside one codebase: Lightpanda's ws://127.0.0.1:9222 for the cheap tier, a Scrapeless Scraping Browser session for the rest. Neither tier requires rewriting the other's code β€” that is the quiet benefit of everything speaking CDP.


Ready to Build Your AI-Powered Data Pipeline?

Join our community to claim a free plan and connect with developers building hybrid crawl pipelines: Discord Β· Telegram.

Sign up at app.scrapeless.com for free Scraping Browser runtime and route your hard targets through it while Lightpanda handles the cheap ones.

FAQ

Q: Is Lightpanda a Chromium fork?
No. Lightpanda is written from scratch in Zig with its own DOM and networking, using V8 for JavaScript execution and html5ever for HTML parsing. It shares the Chrome DevTools Protocol with Chromium as a compatibility surface, not any engine code.

Q: Does Lightpanda work with Puppeteer and Playwright?
Puppeteer works over puppeteer.connect({ browserWSEndpoint }) against lightpanda serve, and that is the integration the project documents and this guide ran. Other CDP clients can speak to the same endpoint, but coverage depends on which protocol domains each client exercises β€” test your client against your target pages while the engine is in Beta.

Q: Can Lightpanda take screenshots?
No β€” Lightpanda has no graphical rendering pipeline, which is precisely where its speed and memory advantage come from. Workflows that need pixels (visual regression, screenshot capture) need a full browser; DOM extraction, link crawling, and markdown dumps are where Lightpanda fits.

Q: Is Lightpanda production-ready?
It is in Beta. The project states that many websites work and that errors or crashes are still possible; features like CORS remain open issues. Production use today means scoping it to targets you've verified it renders, with a fallback path for the rest.

Q: Why pair it with Scrapeless instead of adding proxies to Lightpanda?
Proxies alone move the IP, but hard targets also check browser fidelity and issue challenges β€” and a Beta engine with partial standards coverage is easiest to detect exactly there. Scrapeless Scraping Browser combines full self-developed Chromium, anti-detection fingerprinting, and residential proxies in 195+ countries in one managed session, so the hard tier is solved as a unit rather than assembled from parts.

At Scrapeless, we only access publicly available data while strictly complying with applicable laws, regulations, and website privacy policies. The content in this blog is for demonstration purposes only and does not involve any illegal or infringing activities. We make no guarantees and disclaim all liability for the use of information from this blog or third-party links. Before engaging in any scraping activities, consult your legal advisor and review the target website's terms of service or obtain the necessary permissions.

Most Popular Articles

Catalogue