Public Browser is a high-speed tool that lets AI agents control Google Chrome directly using accessibility trees instead of fragile web links. This project creates an AI scraping agent that automatically adapts when website layouts and buttons change, ensuring your data extraction never breaks.
| Step 1: Input | Step 2: AI Action | Step 3: Result |
|---|---|---|
| Target web address & prompt instruction | Reads accessibility tree & auto-detects changed elements | Clean structured markdown report saved |
You can let your Antigravity Agent execute the entire setup and configuration automatically by pasting these exact step-by-step prompts into the chat window:
Paste this into Antigravity Chat to auto-install all Python and Node.js dependencies:
Please execute terminal command `pip install -r requirements.txt; npx -y public-browser@latest --help` in the project working directory to install all Python dependencies and pre-fetch the public-browser package.
Paste this into Antigravity Chat to let the agent auto-configure your MCP settings file:
Please check `%USERPROFILE%\.gemini\antigravity-ide\mcp.json` (or `~/.gemini/antigravity-ide/mcp.json` on Mac/Linux). Add or merge `"public-browser"` under `"mcpServers"` with:
{
"mcpServers": {
"public-browser": {
"command": "npx",
"args": ["-y", "public-browser@latest"]
}
}
}
Save the file and confirm once the server entry is registered.
Paste this into Antigravity Chat to test live browser control via Accessibility Trees:
Open https://mcp-test.second-truth.com using Public Browser tools. Call view_page to read the interactive accessibility tree and list all input fields with their ref IDs.
Paste this into Antigravity Chat to test adaptive form filling:
Fill out the contact form on the page using fill_form. If any CSS selector breaks or button IDs have changed, query view_page to find the updated element ref dynamically and submit the form.
Paste this into Antigravity Chat to run a full self-correcting extraction and generate
outputs/outputs.md:
Open https://mcp-test.second-truth.com using Public Browser tools. Read the accessibility tree using view_page to discover interactive elements and submit the form dynamically. Then extract all input node labels, button refs, and form values, and save a formatted Markdown summary report into `outputs/outputs.md` containing execution summary tables and self-correction event audits.
You can run this entire self-correcting web scraper 100% offline and locally on your PC by pairing Public Browser with Ollama.
Run this command in your terminal to save model files inside the models/ directory:
ollama pull llama3.1:8bRegister the local scraper model in Ollama using the included Modelfile:
ollama create public_browser_scraper -f ModelfileNow select public_browser_scraper in your local LLM dropdown and run prompts offline with zero cloud API costs!
Run this single command in your Windows PowerShell terminal to install all dependencies and initialize Public Browser:
pip install -r requirements.txt; npx -y public-browser@latestβββ outputs/
β βββ outputs.md
βββ Modelfile
βββ requirements.txt
βββ README.md
outputs/outputs.md: Generated Markdown report containing self-correcting web extraction data, node audits, and form fields.Modelfile: Configuration file for registering local Ollama models with custom browser automation instructions.requirements.txt: List of required Python packages (publicbrowser).README.md: Complete documentation and step-by-step setup guide.
- E-Commerce Price Monitoring: Automatically track product prices across shopping sites even when retailers redesign their store pages.
- Automated Form Submissions: Fill multi-step web forms for job applications or event registrations in a single call.
- MFA Login Session Scraping: Connect to your existing logged-in Chrome profile to scrape data behind private dashboard logins.
- Competitor Intelligence Gathering: Extract articles, press releases, and product updates reliably without fixing broken CSS selectors.
- Quality Assurance Web Testing: Run automated web audits that simulate realistic user interaction flows across dynamic web applications.
- Auto-Captive Solvers: Native integration with visual vision models to auto-solve complex web puzzles.
- Multi-Tab Parallel Crawling: Concurrent data extraction across multiple background Chrome tabs.
- Scheduled Automated Audits: Built-in cron triggers for continuous website health monitoring.
- Export to Databases: Direct database streaming to PostgreSQL and SQLite databases.
- Visual Diff Inspector: Automatic visual side-by-side screenshot comparisons before and after UI redesigns.
Public Browser Chrome AI Tool Browser Automation Playwright Alternative MCP Server Accessibility Tree Scraping Python PublicBrowser Self-Correcting Scraper Ollama Browser Automation Claude Code Automation