
Rewriting the browser using Zig results in extremely low memory usage: Lightpanda can now independently browse and perform tasks online.
This is not a Chromium branch or a WebKit patch: Lightpanda, built from scratch using Zig, can browse 100 pages and consume only 123MB of memory, completing the task in just 5 seconds. The new agent mode allows you to save the browsing process as a script that can be replayed, eliminating the need for a model when launching.
Related tags
The typical approach for teams is to grab Chromium and embed it in a container. Lightpanda took a different, more challenging path: writing a browser from scratch using Zig, specifically designed for automation, rather than a Chromium branch or WebKit patch. Today, it has gained 929 stars and generated $38,763 in revenue.
The advantage over standard solutions comes from the official benchmarks: fetching 933 real pages on AWS EC2 m5.large resulted in a peak memory usage of 123MB for the headless Chrome, compared to 2GB; and reduced the time from 5 seconds to 46 seconds. This translates to approximately 16 times less memory consumption and about 9 times faster speed. For a crawler that needs to handle dozens or hundreds of concurrent pages, these figures directly determine its throughput and cost.
It's not a simplified implementation that "just downloads HTML": html5ever handles parsing, v8 executes JavaScript, while also providing both CDP and WebDriver Bidi protocols. Features like clicking, filling forms, handling cookies, setting custom request headers, using proxies, blocking ads, and respecting robots.txt are all implemented. The output format is also optimized for pipelines: in addition to `--dump html`, it can directly output Markdown, PNG, PDF, and structured data, which converts JSON-LD, OpenGraph, Twitter cards, and meta tags into JSON.
The real innovation lies in its ability to "browse on its own." The `lightpanda agent` uses a native agent mode, allowing you to control the browser's navigation, workflows, and data extraction using natural language or slash commands. Because the agent runs within the same process as the browser, each call is direct and efficient, without any overhead from process boundaries.
The design of the output is also noteworthy. Each agent session generates a PandaScript file – a standard JavaScript file containing native browser primitives. It can be exported using `/save`, and then run with `lightpanda run session.js` to replay the script, which is deterministic and consumes no tokens. The official approach is to "use an LLM for prototyping, and deploy the output without the model": the model is only used for initial exploration, and repeated executions are free and non-random.
The model side has virtually no limitations: Anthropic, OpenAI, Gemini, Vertex AI, Mistral, Hugging Face, and Vercel AI Gateway, along with aggregators like OpenRouter, can all be used. Any OpenAI compatible endpoint (OPENAI_BASE_URL), including local Ollama, llama.cpp, and LLMD, can be used directly. If you don't want to use a model, simply specify `--no-llm`.
Support for multiple agents has also been added. The MCP service supports both stdio and lightpanda mcp --port 9223, allowing communication via HTTP: clients can send JSON-RPC POST requests to /mcp without the Mcp-Session-Id, which automatically assigns a new session. Each session has its own pages, cookies, and memory, preventing agents from interfering with each other's browsing context. Sessions can also be explicitly managed using `session_new, session_list, and session_close.
Important limitations to keep in mind: It only supports Linux x86_64/aarch64 and macOS nightly binaries (linked with glibc, musl-based distributions like Alpine require manual compilation or a different base image), Windows only works through WSL2, and Android/Termux does not have native builds. The license is AGPL-3.0, so be sure to review the terms before commercial use.
The browser aspect has long been "forced" to be compatible with everything, at the cost of size and memory consumption. Lightpanda's bet is that when the caller becomes an agent rather than a human, the compatibility list can be significantly reduced, leaving only speed as the priority.
Repository address: https://github.com/lightpanda-io/browser
More News
Want to see more quality content?
Browse all news