Moli
Moli is a production-ready, open-source headless browser for AI agents, built in Rust. It fetches and extracts web pages, searches the web, and automates browser tasks via CLI, CDP, and WebDriver with a structure-first design.
Visit lexmount/moliOverview
Moli is a production-ready open-source headless browser for AI agents, built in Rust. It is designed for web access and browser automation, using structure-first operations that avoid layout and paint unless needed. Moli can fetch and extract pages, search the web, and automate browser tasks, and it can be used standalone or with Lexmount Browser as a managed cloud runtime.
Key Features
- Complete web runtime with streaming HTML parsing, native DOM, V8 JavaScript, iframes and workers, CSS cascade, Fetch/XHR/WebSocket, cookies, WebCrypto, and profile-scoped storage.
- Extraction-optimized CLI output in HTML, Markdown, JSON, semantic text trees, and frame-aware serialization, with selector, script, and response waits and network tracing.
- A unified automation binary serves CDP, WebDriver Classic, and WebDriver BiDi from the same kernel and scheduler, without separate ChromeDriver, geckodriver, or browser installation.
- On-demand visual capabilities via --layout include layout-backed hit-testing and input, viewport screenshots, full-page screenshots, PDF output, and low-frequency DevTools screencast frames.
- Operational controls cover profiles, cookies, HTTP cache, proxies, resource families, connection limits, timeouts, private-network policy, user-agent overrides, and diagnostic logging.
- Structure-first performance skips layout and paint for most automation requests and generates layout and pixels only when needed.
Use Cases
- Fetching and extracting web pages for AI agents and retrieval pipelines.
- Running browser automation tasks through CDP, WebDriver Classic, or WebDriver BiDi.
- Searching the web and controlling isolated cloud browser sessions with Lexmount Browser when using managed infrastructure.
- Crawling, browser-use agents, evaluation environments, and reinforcement-learning workloads.
Getting Started
- Install the latest prebuilt Moli binary using the provided shell installer on Linux or macOS, or the PowerShell installer on Windows; alternatively, use the README prompt with an AI agent to install the skills and binary.
- Use moli fetch with options such as --dump markdown, --dump semantic_tree_text, or --layout with screenshot or PDF output to extract or render a page.
- Start the automation server with moli serve; add --layout for geometry, coordinate input, and screenshots, or --layout --resource to fetch optional visual and media resource families.
- Connect automation clients through CDP, WebDriver Classic, or WebDriver BiDi; Playwright can connect over CDP when the server is running.
Deployment & Requirements
- Moli supports Linux, macOS, and Windows.
- The open-source headless browser can run standalone and is fully usable without Lexmount Browser; Lexmount Browser is an optional managed cloud runtime and control plane.
- The unified automation binary does not require separate ChromeDriver, geckodriver, or browser installation for CDP, WebDriver Classic, and WebDriver BiDi.
Before You Adopt
- License: Apache-2.0. Review its terms before using, modifying, or distributing the project.
- Moli is described as production-ready within its documented agent-browser scenarios and remains under active development.
- Moli intentionally does not pursue pixel-for-pixel Chrome parity or high-fidelity Canvas, WebGL, and media playback.
- Expensive browser operations such as layout, rendering, and optional resource fetching require explicit opt-in and are not enabled by default.
- Unsupported protocol paths return explicit errors rather than implying that a browser action, event, network observation, or visual result occurred.