Moli: A Fast Headless Rust Browser for AI Agents and Web Scraping
GitHub Open Source
Moli is a headless Rust browser built for AI agents that skips visual layout until you actually need pixels.
Repository snapshot
- Repository: lexmount/moli
- Language: Rust
- License: Apache-2.0
- Stars: 23 001
- Forks: 638
Daily open-source picks: GitHub Open Source on Telegram
What it is
Moli is a production-ready headless browser written in Rust designed specifically for AI agents, web crawling, and automated testing workloads. Rather than forcing continuous visual rendering, it treats the native DOM and style state as the primary source of truth, performing layout and software paint operations strictly on demand.
Why it matters
Most browser automation tasks require page structure rather than a rendered visual viewport. Traditional tools continuously maintain a visual state that wastes CPU cycles and memory. Moli optimizes this cost model by reading runtime state directly for text extraction, DOM queries, and JavaScript execution, only triggering box construction and Taffy layout when visual outputs like screenshots or coordinate inputs are explicitly requested.
Key features
- Execute CDP, WebDriver Classic, and WebDriver BiDi through a single unified automation binary.
- Dump pages directly to HTML, Markdown, JSON, or compact semantic text trees via CLI.
- Run full V8 JavaScript, CSS cascade, Fetch/XHR/WebSocket, and profile-scoped storage.
- Enable full box construction and Taffy layout on demand by passing the --layout flag.
- Connect Playwright directly over Chrome DevTools Protocol without extra drivers.
Quick start
On Linux or macOS:
curl --proto '=https' --tlsv1.2 -fsSL \
https://github.com/lexmount/moli/releases/latest/download/moli-installer.sh | shOn Windows, run in PowerShell:
powershell -ExecutionPolicy ByPass -c "irm https://github.com/lexmount/moli/releases/latest/download/moli-installer.ps1 | iex"Who should try it
Developers building autonomous web agents, heavy scraping pipelines, or automated test suites who want to reduce the resource overhead associated with running traditional browser binaries.
Verdict
Moli offers a pragmatic architecture for text-heavy agent workflows and scraping pipelines, though teams requiring complex browser extensions should test thoroughly before migrating.
Continue exploring
Get the next pick in Telegram: Follow GitHub Open Source
Curated from the repository README and metadata. No hands-on test is claimed; evaluate it in a sandbox before production use.