platonai/Browser4
Browser4 — an AI-native browser engine for autonomous agents, intelligent extraction, and large-scale web automation.
🤖 Browser4 – What It Is
Browser4 is an AI‑native browser automation engine. It lets large‑language‑model agents (or humans) drive a real Chromium‑based browser via a fast Rust‑written CLI (browser4‑cli). The system combines traditional web‑automation (click, fill, scroll, screenshot) with zero‑token extraction – deterministic data extraction using X‑SQL and CSS selectors, plus optional LLM‑powered extraction. It also ships a WebMiner pipeline that clusters HTML pages into spreadsheets without any LLM calls.
Key Capabilities (from the README)
| Capability | What it means |
|---|---|
| Agent Browser | Agents can open a browser, interact (click, fill, snapshot), run batch jobs, and loop over pages. |
| Zero‑Token Extraction | Use X‑SQL + CSS selectors or WebMiner ML clustering to turn pages into structured tables without spending LLM tokens. |
| Hybrid Intelligence | Mix LLM extraction, ML clustering, and a reusable selector store. |
| High‑Performance Runtime | Coroutine‑safe, CDP‑native engine designed for 100k‑200k page visits per machine per day, supporting swarm/crawl scale‑out. |
| Enterprise‑Scale Automation | Swarm crawling, batch/loop jobs, stateful sessions, plugins, runtime skills, browser extensions, and an HTTP‑based MCP. |
| Programming‑Agent Kernel | 50+ coding.* tools for agents to generate, validate, and self‑develop Browser4 artifacts. |
How It Works (Architecture Overview)
- Backend – a Java/Kotlin runtime (published on Maven Central as
browser4‑core) that talks to Chrome/Edge via the Chrome DevTools Protocol (CDP). It manages sessions, plugins, skills, and a Pulsar SDK for agent state. - CLI (
browser4‑cli) – a Rust wrapper that sends HTTP/MCP commands to the backend. It provides a shell‑like interface (open,click,snapshot,htmlsnapshot,crawl,swarm, …) usable by humans or AI agents. - Modules – include a programming‑agent kernel (
browser4‑coding), a test fixture server (MockSite), and integration with the WebMiner ML clustering tool.
Typical Use Cases
- Autonomous agents – Prompt an LLM (e.g., Claude, DeepSeek) with a short skill file, have it call
browser4‑clito navigate a site, fill forms, and extract data. - Zero‑token data pipelines – Crawl a list of URLs, run
htmlsnapshot query --sql …orwebminerto produce Excel/HTML reports without any LLM cost. - Large‑scale crawling – Use
swarm create+swarm queryto distribute tens of thousands of page visits across machines. - Human‑in‑the‑loop testing – Open a headed browser, inspect element refs (
snapshot -i --boxes), then script further actions.
Getting Started (Quick‑Start Steps)
- Install –
npm install -g browser4-clithenbrowser4-cli install(or run the provided curl/PowerShell script). - Open a browser –
browser4-cli open --headed https://example.com. - Inspect –
browser4-cli snapshot --boxesto see element refs likee15. - Interact –
browser4-cli click e15,browser4-cli fill e16 "text" --submit. - Extract –
browser4-cli get text "h1"orbrowser4-cli htmlsnapshot query --sql @query.sql. - Scale – Use
crawl,swarm, orloopcommands for batch or periodic jobs.
Ecosystem & Integration
- DeepSeek Harness – A plugin (
dsh-browser4) lets the dsh agent framework call Browser4 directly. - WebMiner – Runs locally (SMILE ML library) to cluster HTML into spreadsheets; commercial version uses Apache Spark for >1k pages.
- Plugins & Skills – Extend functionality via the built‑in plugin system; view with
browser4-cli plugin-list. - LLM Providers – Supports DeepSeek, OpenRouter, Volcengine, OpenAI‑compatible, and Aliyun Qwen via environment variables.
Documentation & Support
- Website – https://browser4.io
- GitHub – Issues, releases, CI badge, Maven Central artifact.
- CLI Help –
browser4-cli --helpandbrowser4-cli help <command>. - Status Dashboard –
http://127.0.0.1:18182/statusshows live health, sessions, swarm tasks, etc. - Community – Support links listed under “Support & Community” in the repo.
License
Apache‑2.0.
Bottom line: Browser4 is a full‑stack, high‑performance browser automation platform designed for AI agents and large‑scale web data extraction, offering both traditional Selenium‑style interactions and token‑free, ML‑driven structuring of web content.
Related
- Project
- Project
- Project
- Project
- Project