lexmount/moli

Best headless browser for AI agents. Lite, Fast, High-Compatibility. Built in Rust

What it solves

Moli addresses the high resource overhead and inefficiency of using full-scale browsers (like Chrome) for AI agent tasks. Most agents only need a page's structure and content rather than a continuously rendered visual interface, making traditional headless browsers unnecessarily heavy in terms of memory and CPU usage.

How it works

Moli is a standalone browser kernel built in Rust (not a Chromium wrapper) that uses an "on-demand" rendering architecture. It treats the DOM and style state as the primary source of truth and only triggers expensive layout calculations or software painting when specifically requested (e.g., for a screenshot). For standard data extraction or DOM queries, it skips the visual rendering pipeline entirely, significantly reducing its resource footprint.

Who it’s for

It is designed for developers building AI agents, web crawlers, retrieval pipelines (RAG), evaluation environments, and reinforcement learning workloads that require a production-ready headless browser.

Highlights

  • Resource Efficient: Uses significantly less memory (RSS) than Chrome Headless while maintaining similar success rates for page loads.
  • Multi-Protocol Support: Compatible with CDP (Chrome DevTools Protocol), WebDriver Classic, and WebDriver BiDi, allowing it to work with tools like Playwright.
  • Extraction Optimized: Provides direct CLI options to dump pages as Markdown, JSON, or model-friendly semantic text trees.
  • Custom Rust Stack: Built using rusty_v8 for JavaScript, Servo/Stylo for CSS, and Taffy/Parley for layout.

Related

  • Project
  • Project
  • Project
  • Project
  • Project