- Beato Engineering Blog/
- All Articles/
- Moli vs. Obscura: How to Choose a Headless Browser for AI Agents/
Moli vs. Obscura: How to Choose a Headless Browser for AI Agents
Table of Contents
Chromium is almost the default answer for browser automation: it has the best compatibility, the most mature tool chain, and the least worry when encountering complex web pages. But its price is equally obvious - many processes, high memory usage, and slow cold start. These costs can be quickly amplified for AI agents, web retrieval systems, and crawlers that need to run a large number of sessions simultaneously.
Both Moli and Obscura attempt to solve this problem. They are both built using Rust and do not rely on Chromium, but they have taken two different routes:Moli prioritizes task success rate and complex page compatibility, while Obscura puts lightweight, concurrent crawling and invisibility capabilities at a higher priority.
The data in this article was compiled in September 2026. Browser engines are still iterating rapidly, and performance numbers and compatibility conclusions should be understood in conjunction with the specific version, test environment, and target website.
Let’s talk about the conclusion first #
If you just want a simplified answer:
- General AI Agent, complex SPA, micro front-end, interactive automation: Moli is preferred.
- Massive URL crawling, resource-constrained environments, requiring built-in stealth and MCP: Prioritize Obscura.
- The target website must be stable and available, or rely on full Web API, Canvas, WebGL, media capabilities: continue to use Chromium.
Neither the Moli nor the Obscura are “smaller Chromes.” They intentionally give up some capabilities for a human browsing experience in exchange for lower CPU, memory, and startup costs. What really needs to be weighed is not which project scores higher, but whether your task falls within the capabilities of the web platform they have implemented.
The core positioning of the two projects #
Moli: structure first, pixels generated on demand #
Moli positions itself as a production-grade headless browser for AI Agents. Its most critical design is on-demand layout and rendering (on-demand layout and rendering).
Most Agent tasks only need to read DOM, extract Markdown, query elements, execute JavaScript, or observe network requests. They do not need to continuously maintain a complete layout tree, nor do they need to draw pixels every frame. Moli therefore uses the DOM and style state as the source of truth, calculating layout and drawing results only when the task actually requires geometric information, coordinate clicks, screenshots or PDFs.
Moli’s core components include:
- V8: execute JavaScript;
- html5ever: parse HTML;
- Servo/Stylo: handles selectors, cascades and calculated styles;
- Taffy and Parley: Working with box models and text layout;
- AnyRender/Vello: Complete software rendering.
Moli supports CDP, WebDriver Classic and WebDriver BiDi simultaneously. For projects already using Playwright, Puppeteer, Selenium or other automation clients, this protocol coverage means lower migration costs.
Obscura: Lightweight crawling and stealth priority #
Obscura is a standalone headless browser also written in Rust, runs JavaScript through V8, and is compatible with Puppeteer and Playwright through CDP. It emphasizes three things more:low resource usage, concurrent crawling and stealth capabilities.
Obscura’s --stealth mode uses a web client with browser TLS fingerprinting, loads a tracker block list, and provides consistent User-Agent, platform, time zone, and geolocation configuration. It cannot bypass interactive challenges, CAPTCHA, or IP-based throttling, but provides out-of-the-box handling of basic TLS fingerprinting and third-party trace detection.
In addition, Obscura directly provides parallel scrape commands and MCP Server, which is suitable for embedding the browser into the Agent workflow as a lightweight tool without having to build an additional protocol adaptation layer.
How should
How should you interpret the benchmarks? #
Moli’s README cites two sets of tests for the Lexbench-Headless-Browser. The first set uses 1,308 comparable tasks covering native CDP, 13 automation tools, and web platform semantic testing:
| browser | Number of tasks passed | mission success rate |
|---|---|---|
| Chrome | 1,306 / 1,308 | 99.85% |
| Moli | 1,071 / 1,308 | 81.88% |
| Lightpanda | 697 / 1,308 | 53.29% |
| Obscura | 587 / 1,308 | 44.88% |
The most important message from this set of data is not how much faster Moli is than Obscura, but that it completes more automated actions on the same set of tasks. For the Agent, failure usually means retrying, downgrading to Chromium, or even interrupting the entire task, so the task success rate is often more important than the limit time of a single request.
The second set of resource tests only counts 1,045 task attempts in which all four local engines successfully completed:
| browser | CPU median time | Peak PSS Median |
|---|---|---|
| Chrome | 686.95 ms | 697.14 MiB |
| Moli | 100.61 ms | 92.12 MiB |
| Lightpanda | 36.48 ms | 33.55 MiB |
| Obscura | 38.44 ms | 38.74 MiB |
A clear trade-off can be seen here: Obscura is more resource-efficient on jointly successful tasks, but Moli has significantly better coverage on the complete task set. In other words, the Obscura is lighter and the Moli is more likely to get the job done.
It is important to note that these data are provided by benchmarks maintained by projects owned by Moli. The test code and reports are public, but the results are not a substitute for validating your own sites, scripts, and deployment environments.
Public website crawling performance #
Moli also provides a set of crawling tests covering 192 Chinese and English public websites. A page is considered successful only if it produces meaningful content after JavaScript execution; simply returning an HTTP 200, a challenge page, a login wall, an empty response, or an empty application shell does not count as a success.
| browser | valid page | success rate | Median time consumption | Median RSS |
|---|---|---|---|---|
| Moli | 103 | 53.6% | 1.43 s | 73 MiB |
| Chrome Headless | 101 | 52.6% | 1.43 s | 773 MiB |
| Lightpanda | 85 | 44.3% | 0.97 s | 40 MiB |
| Obscura | 57 | 29.7% | 1.30 s | 39 MiB |
This set of results shows that low resource usage does not necessarily mean high crawling throughput. If an engine frequently gets empty shell pages and is unable to execute key scripts, subsequent retries and rollbacks will offset the resources saved in a single run.
It also doesn’t prove that Moli is more compatible than Chrome on all real websites. The sample only has 192 URLs, and the results are highly dependent on website status, network environment, and criteria. A more reasonable interpretation is: In this test set, Moli got close to Chrome’s number of effective pages with about one-tenth the memory.
Complex page compatibility #
The hardest part of browser compatibility is often not parsing HTML, but the long-tail behavior of modern front-end frameworks combined with a host of web APIs: Mounting and routing switching of
- SPA;
- Micro front-end sandbox and cross-Frame communication;
- Infinite scrolling, lazy loading and observer;
- Dynamic styles, fonts, layouts and coordinate clicks;
- Cookie, IndexedDB, OPFS and other state capabilities;
- Automation client-dependent CDP event order and field semantics.
The advantages of Moli are mainly reflected here. It provides a complete DOM, CSS, layout, storage and network runtime and has passed approximately 1.612 million tests within the currently selected Web Platform Tests range. The approximately 37 percentage point success rate gap in Lexbench also illustrates its broader coverage of automation tools and web platform semantics.
But Moli still doesn’t strive for pixel-level consistency with Chrome, nor does it have a GPU compositor, making it unsuitable for high-fidelity Canvas, WebGL, video playback, or tasks that rely on full Chrome printing behavior.
Obscura already supports native screenshots, scroll-aware layouts, screencasts, and PDFs, but its long-tail Web API and CSS behavior may still differ from Chromium. If the target website is mainly a clearly structured content page, product page or list page, this difference may not matter; if the page relies on a complex front-end runtime, site-level compatibility testing must be done first.
function comparison #
| Dimensions | Moli | Obscura |
|---|---|---|
| core orientation | Compatibility and Mission Success Rate | Lightweight, concurrent crawling and stealth |
| JavaScript | V8 | V8 |
| automation protocol | CDP、WebDriver Classic、WebDriver BiDi | CDP |
| layout and rendering | Default structure takes precedence; use --layout to enable true layout, screenshots and PDFs | native rendering; supports screenshots, PDF and screencast |
| Extract output | HTML, Markdown, JSON, semantic tree, etc. | Markdown, structured extraction, etc. |
| stealth ability | supports agent, User-Agent and other controls, but does not use invisibility as its core selling point | --stealth provides TLS fingerprinting, identity configuration and tracker interception |
| parallel capability | serve can host automation clients | serve --workers and scrape --concurrency |
| MCP | official README does not provide built-in MCP Server | has built-in MCP Server, covering navigation, extraction, interaction, screenshots, storage and tab tools |
| container deployment | can be containerized by itself | provides a non-root image based on distroless |
The common statement in previous information that “Obscura MCP provides 14 tools” is outdated. The current official documentation lists significantly more tools, so a more safe statement is: it has built-in MCP toolset covering browser life cycle, reading, interaction, diagnosis, visual output, storage and tab management.
How to choose #
Choose Moli if you care more about task completion rate #
Consider this option in the following scenarios:
- To build a universal browser Agent, you need to face unknown websites;
- The target site contains a complex SPA, micro-frontend, or a large number of dynamic interactions;
- Already using Playwright, Puppeteer, Selenium or WebDriver BiDi;
- wants to significantly reduce Chrome’s resource consumption, but is unwilling to sacrifice compatibility too much;
- requires DOM, network, storage, layout and screenshot capabilities to work together in the same runtime.
The trade-off is that Moli has a higher memory footprint than Obscura and Lightpanda, and it still can’t replace Chrome’s full visual and media capabilities.
Choose Obscura if you care more about unit resource throughput #
Consider this option in the following scenarios:
- batch crawls a large number of pages with relatively standard structures;
- The memory budget of the container or edge node is very tight;
- hopes to use
scrape --concurrencyto distribute the URL directly; - needs built-in MCP Server to quickly access clients such as Claude Code;
- requires basic TLS fingerprint masquerading, browser identity configuration and tracker blocking.
The price is: less compatibility with complex sites and automation tools. It is best to establish a sample set of target URLs before going online and prepare a fallback path to Chromium.
Keep using Chromium, failure is the most expensive #
The following situations are not worth replacing the engine to save tens or hundreds of MiB of memory:
- requires as complete a Web API and browser behavior as possible;
- relies on high-fidelity screenshots, Canvas, WebGL, audio and video, or GPU compositing;
- The target website changes frequently and there is no ability to maintain a compatibility regression set;
- The value of a single session is very high, and any compatibility failure is more expensive than the resource cost;
- relies on browser extensions, Chrome-specific capabilities, or long-lasting authentication sessions.
A more reliable engineering solution: hierarchical routing #
In a production system, Moli, Obscura, and Chromium are not necessarily a choice of three. A more practical solution is to layer by task complexity:
- static HTML is first processed with a normal HTTP client and text extractor;
- Standard pages that require JavaScript are handed over to Obscura;
- Leave complex interaction tasks to Moli;
- Fallback to Chromium when encountering an unsupported web API, vision task, or continuous failure.
In this way, resource costs can be controlled without placing all compatibility risks on a new browser engine. The key is to have well-defined success conditions, such as body length, key elements present, the page is not a challenge page, and the target action actually produced a state change, rather than just checking for an HTTP 200.
Other noteworthy choices #
Lightpanda #
Lightpanda is built from scratch using Zig, and the official benchmark claims that the peak memory when crawling 100 pages is about 1/16 of Chrome, and the execution time is about 9 times faster. It supports CDP and WebDriver BiDi, and the current version also supports text-oriented PNG/PDF output, so the old statement of “no screenshot support at all” is no longer accurate.
Its advantage is extreme resource efficiency, but the risks are the same as other new engines: complex websites, long-tail web APIs, and automated client compatibility require site-by-site verification.
Kitesurf #
Kitesurf is a stateless browser built by Cloudflare for Agent. It runs on Workers and currently provides beta services through Browser Run. It’s suitable for bursty, one-time HTML extraction, PDF, and screenshot tasks, but doesn’t offer native executables, and isn’t suitable for video, WebGL, real-world TLS fingerprinting challenges, or sessions that require long-term persistent state.
In a 14 URL test published by Cloudflare, Kitesurf consumed less CPU and memory than warmed-up Chromium, but had longer wall clock times. This once again shows that “saving resources” and “faster single response” are two different indicators.
Final Recommendations #
Moli and Obscura represent two clear engineering trade-offs:
- Moli uses a moderate increase in resource usage in exchange for a higher task success rate, wider protocol support and better complex page compatibility.
- Obscura puts lightness, concurrency and stealth capabilities first, and is more suitable for large-scale crawling with clear goals and relatively standard page structures.
If your goal is to “let the Agent complete unknown web page tasks as reliably as possible”, Moli is a safer starting point; if the goal is to “crawl a large number of known pages with as few resources as possible”, Obscura is more suitable. Whichever one you choose, you should benchmark against your own URL samples and real automation scripts, rather than taking the numbers in the project README as production commitments.
References #
- Moli Project and Official Description
- Obscura Project
- Obscura official document
- Lexbench five-engine mission success rate report
- Lexbench four-engine resource test report
- Lightpanda Project and Benchmark Description
- Cloudflare:Introducing Kitesurf
Written by Jermine. View original text.