lightpanda-browser
aradotso/trending-skills
Lightweight headless browser built in Zig—9x less memory, 11x faster than Chrome, with CDP compatibility for AI agents and web scraping.
What is lightpanda-browser?
Lightpanda is a headless browser built from scratch in Zig, designed for AI agents, web scraping, and automation. It offers significant performance and memory advantages over Chrome while maintaining CDP (Chrome DevTools Protocol) compatibility with Playwright, Puppeteer, and chromedp. Use it when you need efficient, resource-constrained browser automation.
- Start a CDP server for programmatic browser control via WebSocket
- Fetch and render URLs to HTML via CLI with robots.txt compliance
- Execute JavaScript via V8 engine and extract DOM data
- Integrate with Playwright, Puppeteer, chromedp, and Python async clients
- Batch scrape multiple pages with minimal memory overhead
- Support network interception, cookies, and proxy configuration
How to install lightpanda-browser
npx skills add https://github.com/aradotso/trending-skills --skill lightpanda-browser- macOS (Apple Silicon), Linux (x86_64), or Docker environment
- Node.js (for Playwright/Puppeteer integration) or Python/Go as needed
- Port 9222 available for CDP server (or custom port via --port flag
How to use lightpanda-browser
- 1.Download and extract the Lightpanda binary for your platform (macOS, Linux, or Docker)
- 2.Start the CDP server with ./lightpanda serve --host 127.0.0.1 --port 9222
- 3.Connect your automation tool (Playwright, Puppeteer, chromedp, or Python) to ws://127.0.0.1:9222
- 4.Use standard browser automation APIs to navigate, extract data, and interact with pages
- 5.Optionally use ./lightpanda fetch for direct CLI-based HTML rendering and robots.txt compliance
Use cases
- AI agents that need to browse and extract web content at scale
- Batch web scraping in resource-constrained environments like containers
- Form submission and data extraction automation
- Running multiple concurrent browser instances with low memory footprint
- Headless testing and automation where visual rendering is not required
- AI/ML engineers building web-capable agents
- DevOps and infrastructure teams running scrapers in containers
- Backend developers automating web interactions
- Data engineers performing large-scale web scraping
- QA automation engineers focused on functional testing
lightpanda-browser FAQ
Lightpanda uses 9x less memory and runs 11x faster than Chrome headless. It is not based on Chromium, Blink, or WebKit—it is a clean-slate implementation in Zig with V8 for JavaScript execution.
Yes. Start the Lightpanda CDP server and connect your Playwright or Puppeteer client to ws://127.0.0.1:9222. The CDP protocol is compatible, so minimal code changes are needed.
No. Lightpanda is optimized for headless automation and data extraction. It does not provide pixel-perfect screenshots or PDF generation—use Chrome/Playwright for those use cases.
Lightpanda supports DOM manipulation, JavaScript execution, XMLHttpRequest, Fetch API, cookies, network interception, and proxy support. Coverage is expanding but not yet complete compared to Chrome.
Yes. Use docker run -d --name lightpanda -p 9222:9222 lightpanda/browser:nightly for amd64 and arm64 architectures. Docker Compose examples are provided in the documentation.
Full instructions (SKILL.md)
Source of truth, from aradotso/trending-skills.
name: lightpanda-browser description: Expert skill for Lightpanda — the headless browser built in Zig for AI agents and automation. 9x less memory, 11x faster than Chrome. Installation, CLI, CDP server, Playwright/Puppeteer integration, and web scraping. triggers:
- lightpanda
- headless browser for AI
- lightweight headless browser
- CDP automation
- web scraping automation
- zig browser
- lightpanda browser
- fast headless browser
Lightpanda — Headless Browser for AI & Automation
Skill by ara.so — Daily 2026 Skills collection
Lightpanda is a headless browser built from scratch in Zig, designed for AI agents, web scraping, and automation. It uses 9x less memory and runs 11x faster than Chrome headless.
Key facts:
- Not based on Chromium, Blink, or WebKit — clean-slate Zig implementation
- JavaScript execution via V8 engine
- CDP (Chrome DevTools Protocol) compatible — works with Playwright, Puppeteer, chromedp
- Respects
robots.txtvia--obey_robotsflag - Beta status, actively developed
- License: AGPL-3.0
Installation
macOS (Apple Silicon)
curl -L -o lightpanda https://github.com/lightpanda-io/browser/releases/download/nightly/lightpanda-aarch64-macos
chmod a+x ./lightpanda
Linux (x86_64)
curl -L -o lightpanda https://github.com/lightpanda-io/browser/releases/download/nightly/lightpanda-x86_64-linux
chmod a+x ./lightpanda
Docker
# Supports amd64 and arm64
docker run -d --name lightpanda -p 9222:9222 lightpanda/browser:nightly
CLI Usage
Fetch a URL (dump rendered HTML)
./lightpanda fetch --obey_robots --log_format pretty --log_level info https://example.com
Start CDP Server
./lightpanda serve --obey_robots --log_format pretty --log_level info --host 127.0.0.1 --port 9222
This launches a WebSocket-based CDP server for programmatic control.
CLI Flags
| Flag | Description |
|---|---|
--obey_robots | Respect robots.txt rules |
--log_format pretty | Human-readable log output |
--log_level info | Log verbosity: debug, info, warn, error |
--host 127.0.0.1 | Bind address for CDP server |
--port 9222 | Port for CDP server |
--insecure_disable_tls_host_verification | Disable TLS verification (testing only) |
Playwright Integration
Start the CDP server, then connect Playwright to it:
import { chromium } from 'playwright-core';
const browser = await chromium.connectOverCDP('http://127.0.0.1:9222');
const context = await browser.contexts()[0] || await browser.newContext();
const page = await context.newPage();
await page.goto('https://example.com', { waitUntil: 'networkidle' });
const title = await page.title();
const content = await page.content();
console.log(`Title: ${title}`);
console.log(`HTML length: ${content.length}`);
await browser.close();
Puppeteer Integration
import puppeteer from 'puppeteer-core';
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://example.com', { waitUntil: 'networkidle0' });
const title = await page.title();
const text = await page.evaluate(() => document.body.innerText);
console.log(`Title: ${title}`);
console.log(`Body text: ${text.substring(0, 200)}`);
await page.close();
await browser.close();
Go (chromedp) Integration
package main
import (
"context"
"fmt"
"log"
"github.com/chromedp/chromedp"
)
func main() {
allocCtx, cancel := chromedp.NewRemoteAllocator(context.Background(), "ws://127.0.0.1:9222")
defer cancel()
ctx, cancel := chromedp.NewContext(allocCtx)
defer cancel()
var title string
err := chromedp.Run(ctx,
chromedp.Navigate("https://example.com"),
chromedp.Title(&title),
)
if err != nil {
log.Fatal(err)
}
fmt.Println("Title:", title)
}
Python Integration
import asyncio
from playwright.async_api import async_playwright
async def main():
async with async_playwright() as p:
browser = await p.chromium.connect_over_cdp("http://127.0.0.1:9222")
context = browser.contexts[0] if browser.contexts else await browser.new_context()
page = await context.new_page()
await page.goto("https://example.com", wait_until="networkidle")
title = await page.title()
content = await page.content()
print(f"Title: {title}")
print(f"HTML length: {len(content)}")
await browser.close()
asyncio.run(main())
Web Scraping Patterns
Batch Page Fetching
import { chromium } from 'playwright-core';
const browser = await chromium.connectOverCDP('http://127.0.0.1:9222');
const context = await browser.newContext();
const urls = [
'https://example.com/page1',
'https://example.com/page2',
'https://example.com/page3',
];
for (const url of urls) {
const page = await context.newPage();
await page.goto(url, { waitUntil: 'networkidle' });
const data = await page.evaluate(() => ({
title: document.title,
text: document.body.innerText,
links: [...document.querySelectorAll('a[href]')].map(a => a.href),
}));
console.log(JSON.stringify(data, null, 2));
await page.close();
}
await browser.close();
Extract Structured Data
const data = await page.evaluate(() => {
const items = document.querySelectorAll('.product-card');
return [...items].map(item => ({
name: item.querySelector('h2')?.textContent?.trim(),
price: item.querySelector('.price')?.textContent?.trim(),
link: item.querySelector('a')?.href,
}));
});
Docker Compose (with your app)
services:
lightpanda:
image: lightpanda/browser:nightly
ports:
- "9222:9222"
restart: unless-stopped
scraper:
build: .
depends_on:
- lightpanda
environment:
- BROWSER_WS_ENDPOINT=ws://lightpanda:9222
Supported Web APIs
Lightpanda supports (partial, expanding):
- DOM tree manipulation and querying
- JavaScript execution (V8)
- XMLHttpRequest (XHR)
- Fetch API
- Cookie management
- Network interception
- Proxy support
Configuration
| Environment Variable | Description |
|---|---|
LIGHTPANDA_DISABLE_TELEMETRY | Set to true to opt out of usage metrics |
Performance Comparison
| Metric | Lightpanda | Chrome Headless |
|---|---|---|
| Memory | ~9x less | Baseline |
| Speed | ~11x faster | Baseline |
| Binary size | Small (Zig) | Large (Chromium) |
| Rendering | No visual rendering | Full rendering engine |
When to Use Lightpanda
Use Lightpanda when:
- Running AI agents that need to browse the web
- Batch scraping at scale (memory/CPU savings matter)
- Automating form submissions and data extraction
- Running in containers where resources are limited
- You need CDP compatibility but not full visual rendering
Use Chrome/Playwright instead when:
- You need pixel-perfect screenshots or PDF generation
- You need full Web API coverage (Lightpanda is still partial)
- Visual regression testing
- Testing browser-specific rendering behavior
Building from Source
Requires: Zig 0.15.2, Rust, CMake, system dependencies.
# Ubuntu/Debian dependencies
sudo apt install xz-utils ca-certificates pkg-config libglib2.0-dev clang make curl
# Build
git clone https://github.com/lightpanda-io/browser.git
cd browser
zig build
# Optional: pre-build V8 snapshot for faster startup
zig build snapshot_creator -- src/snapshot.bin
zig build -Dsnapshot_path=../../snapshot.bin
Troubleshooting
Connection refused on port 9222:
- Ensure
./lightpanda serveis running - Check
--host 0.0.0.0if connecting from Docker/remote
Playwright script breaks after update:
- Lightpanda is beta — Playwright's capability detection may behave differently across versions
- Pin your Lightpanda version or use nightly consistently
Missing Web API support:
- Check the zig-js-runtime repo for current API coverage
- File issues at lightpanda-io/browser
Links
- GitHub: https://github.com/lightpanda-io/browser
- Runtime APIs: https://github.com/lightpanda-io/zig-js-runtime
Related skills
More from aradotso/trending-skills and the wider catalog.

llmfit-hardware-model-matcher
Detect your hardware and get instant LLM model recommendations that actually fit your system.

mac-code-local-ai-agent
Run a free 35B AI coding agent on Apple Silicon Macs using local LLMs via llama.cpp or MLX with web search, shell, and file tools.

marketingskills-ai-agents
CRO, copywriting, SEO, analytics, and growth engineering skills for AI coding agents.

markit-markdown-converter
Convert files, URLs, and media to markdown using the markit-ai CLI and SDK with pluggable converters and LLM support.

mcp-brasil-public-apis
MCP Server connecting AI agents to 28 Brazilian public APIs covering economy, legislation, transparency, judiciary, elections, environment, health, and more

memory-lancedb-pro-openclaw
Expert skill for memory-lancedb-pro — a production-grade LanceDB-backed long-term memory plugin for OpenClaw agents with hybrid retrieval, cross-encoder reranking, multi-scope isolation, and smart auto-capture.