# ๐ค Browser4
--- English | [็ฎไฝไธญๆ](README.zh.md) | [ไธญๅฝ้ๅ](https://gitee.com/platonai_galaxyeye/Browser4) > โญ **Finding Browser4 useful?** Run `browser4-cli star` โ it stars this repo for you if the GitHub CLI is signed in, otherwise it opens the repo in your browser. **Table of Contents** - [๐ค Browser4](#-browser4) - [๐ Introduction](#-introduction) - [โจ Key Capabilities](#-key-capabilities) - [Quick Start](#quick-start) - [๐ฅ๏ธ Two Ways to Interact](#๏ธ-two-ways-to-interact) - [Option 1: Web Agent Console (`agent.html`)](#option-1-web-agent-console-agenthtml) - [Option 2: Interactive Terminal Session (`agent run -i`)](#option-2-interactive-terminal-session-agent-run--i) - [Shared: the session ID](#shared-the-session-id) - [DeepSeek Harness integration](#deepseek-harness-integration) - [๐งญ Tool Selection Guide](#-tool-selection-guide) - [How to Interact with a Page](#how-to-interact-with-a-page) - [How to Extract Data](#how-to-extract-data) - [How to Process at Scale](#how-to-process-at-scale) - [How to Turn HTML into Spreadsheets โ Zero LLM Tokens](#how-to-turn-html-into-spreadsheets--zero-llm-tokens) - [๐ฆ Installation](#-installation) - [๐ก CLI Guide for Humans](#-cli-guide-for-humans) - [Quick start](#quick-start-1) - [Mental model](#mental-model) - [Global options](#global-options) - [Key concepts before the command list](#key-concepts-before-the-command-list) - [Command cheat sheet](#command-cheat-sheet) - [Timeout environment variables](#timeout-environment-variables) - [State persistence](#state-persistence) - [๐ Build from Source](#-build-from-source) - [Architecture](#architecture) - [๐ฆ Modules Overview](#-modules-overview) - [๐งฉ Programming-Agent Kernel (browser4-coding)](#-programming-agent-kernel-browser4-coding) - [๐งช Test Fixture Server (MockSite)](#-test-fixture-server-mocksite) - [๐ค Support & Community](#-support--community) - [๐ Documentation](#-documentation) - [๐ง Proxy Configuration](#-proxy-configuration---unblock-website-access) - [License](#license) - [Links](#links) ## ๐ Introduction ๐ **Browser4 โ an AI-native browser engine for autonomous agents, intelligent extraction, and large-scale web automation.** ๐ ### โจ Key Capabilities * ๐ค **Agent Browser** โ AI agents and humans drive real browsers via a Rust CLI, MCP, and an agentic backend: navigate, click, fill, snapshot, crawl, and loop. * ๐งฌ **Zero-Token Extraction** โ X-SQL + CSS selectors for deterministic extraction from live pages or stored HTML snapshots; WebMiner ML clustering turns HTML corpora into spreadsheet and report views with no LLM tokens. * ๐ง **Hybrid Intelligence** โ Combine LLM extraction, ML clustering, X-SQL, and a progressive experience store that reuses learned selectors and blockers. * โก **High-Performance Runtime** โ Coroutine-safe, CDP-native engine designed for 100kโ200k complex page visits per machine per day via swarm/crawl scale-out. * ๐ฆ **Enterprise-Scale Automation** โ Swarm crawling, batch/loop jobs, stateful sessions, plugins, runtime skills, browser extension, and an opt-in MCP-over-HTTP endpoint. * ๐ ๏ธ **Programming-Agent Kernel** โ 50+ `coding.*` tools (sandboxed shell/fs, scaffolding, validation, self-development) for agents building Browser4 artifacts โ or Browser4 itself. * ๐ฅ๏ธ **Web Agent Console** โ A zero-setup web UI (`agent.html`) shipped with the backend for running tasks, watching every step live, steering mid-execution, and reading formatted results โ no terminal needed. ## Quick Start Paste the following instruction to your favorite AI agent like dsh, claude, codex, workbuddy or openclaw and run it: ``` Read https://browser4.io/SKILL.md, install or upgrade browser4-cli for browser automation, perform the following task: 1. Open the browser in headed mode (`open --headed`) so the window is visible โ this is a human-facing demo 2. go to amazon.com 3. search for pens to draw on whiteboards 4. compare the first 4 ones 5. write the result to a markdown file ``` `https://browser4.io/SKILL.md` is the published copy of [skills/browser4-cli/SKILL.md](skills/browser4-cli/SKILL.md) in this repository. If you already have the checkout, point the agent at that local path instead so it reads the version matching your code. ## ๐ฅ๏ธ Two Ways to Interact Both modes share the same engine and session store โ mix them freely. ### Option 1: Web Agent Console (`agent.html`) A zero-setup static page served by the backend at `http://127.0.0.1:18182/`. Sessions sidebar, task composer (Ctrl+Enter), live intent/tool trace via SSE, and formatted result cards โ all in one browser tab. ```bash browser4-cli status # confirm backend is running start "" "http://127.0.0.1:18182/" # open in browser (Windows) ``` ### Option 2: Interactive Terminal Session (`agent run -i`) ```bash browser4-cli agent run -i # start interactive session # โธ type your task, /help for commands, Ctrl+C to cancel # โธ /status /stats /tasks /result /quit # most useful commands ``` Resume later with `agent run -i --continue`. ### Shared: the session ID Each session has a unique id. The terminal banner prints the web console URL with the id baked in โ open it to jump straight into the same session in the browser (context, task list, and live trace all sync automatically). Multiple tabs on the same id see identical real-time updates via SSE. --- ## DeepSeek Harness integration https://github.com/platonai/dsh-browser4 ``` dsh plugin --profile web add dsh-browser4 # npm registry dsh plugin --profile web add github:platonai/dsh-browser4 # GitHub ``` ## ๐งญ Tool Selection Guide Choosing the right tool for your task: ### How to Interact with a Page Use `snapshot -i --boxes` to see clickable/typeable elements with refs like `e15`, then `click `, `fill "