WebBrain: Open-Source Local-First AI Browser Agent
Comprehensive breakdown of WebBrain, an open-source, local-first browser automation agent built on Manifest V3 and Manifest V2.
💡 Overview: What is WebBrain?
WebBrain is a free, MIT-licensed, open-source AI browser agent that lives directly inside your browser's side panel. It reads pages, extracts structured data, and automates complex multi-step tasks.
Unlike conventional browser copilots that require cloud endpoints and upload active web traffic to third-party servers, WebBrain is built local-first. It can interface directly with local LLM backends (such as Ollama or llama.cpp running on the user's workstation), ensuring that no page data, private sessions, or sensitive enterprise documents ever leave the local network.
⚙️ Core Modes: Ask Mode vs. Act Mode
WebBrain operates on a dual-mode control architecture, strictly separating read-only evaluation from stateful interaction:
`` ┌───────────────────────────────────┐ │ USER INTERFACES │ │ Chrome SidePanel / FF Sidebar │ └─────────────────┬─────────────────┘ │ ┌─────────────────▼─────────────────┐ │ DECISION ENGINE │ │ (Local LLM or Private Cloud API) │ └─────────┬─────────────────┬───────┘ │ │ [Ask Mode] │ │ [Act Mode] (Read-Only) │ │ (Stateful / Actions) ▼ ▼ ┌────────────────────────┐ ┌────────────────────────┐ │ CONTENT SCRIPT │ │ CHROME DEB. PROT. │ │ Standard Sandboxed │ │ (chrome.debugger API) │ │ DOM-Reading Only │ │ Clicks, Types, Forms │ └────────────────────────┘ └────────────────────────┘ ``
1. Ask Mode (Read-Only)
- Mechanism: Uses standard, non-privileged browser content scripts.
- Behavior: Reads page content, handles paywalls intelligently, dismisses standard cookie-consent banner noise, and parses PDF files.
- LLM Guidance: Runs with a fixed temperature of 0.3 for structured, predictable summaries.
- Security Boundary: Safe by design. It has zero capability to mutate page states, click buttons, input text, or submit requests.
2. Act Mode (Stateful Automation)
- Mechanism: Drives pages via the Chrome DevTools Protocol (CDP) using the
chrome.debuggerAPI. - Capabilities: Click buttons, input text, scroll, navigate pages, and execute multi-step workflows.
- Trusted Inputs: By leveraging CDP instead of synthetic JavaScript clicks (which are often blocked or ignored by modern web applications), it generates trusted OS-level input events that modern web frameworks genuinely honor. It can also bypass strict security barriers to interact with cross-origin
iframeelements and Shadow DOM roots. - LLM Guidance: Runs with a fixed temperature of 0.15 to enforce rigid step-by-step consistency and prevent command drift.
- Visual Indicator: Chrome displays its native security banner: 'WebBrain started debugging this browser' while attached.
- Note on Firefox: Because Firefox does not support a mature CDP equivalent, Firefox's Act Mode is significantly more restricted.
🛡️ Security Model & Adversarial Hardening
SME consultants must prioritize risk management when introducing browser automation. WebBrain addresses key security vulnerabilities (like those outlined in the OWASP Agentic Top 10 or indirect prompt injection) via several built-in guardrails:
- Strict Read-Only Default: The agent always starts in read-only Ask Mode. It requires explicit user approval before performing any consequential action (such as submitting a form or navigating away) unless manually bypassed in settings.
- UI-First Mutation Rule: To prevent stealthy background transactions, WebBrain refuses to call REST or GraphQL API endpoints directly to perform mutations (e.g., buying a product, sending a message). It forces all stateful modifications to go through the visible browser UI, keeping the human user in full control. A per-conversation
/allow-apioverride can be used if a complex web interface completely fails. - Local Isolation: Running entirely offline via Ollama/llama.cpp means that private data, internal intranet tools, and proprietary legal databases (e.g., law firm document portals) are never exposed to external telemetry or third-party cloud data harvesters.
🚀 SME Use Cases & Consulting Applications
For a freelance AI consultant, WebBrain represents a powerful tool to solve common SME bottlenecks with zero operational overhead:
- Secure Data Extraction & Scraping: Instead of writing custom Python BeautifulSoup scripts that break on every website layout update, SMEs can point WebBrain at catalogs, tables, or PDF reports and say: "Extract all client names, product SKUs, and prices into a clean Markdown table."
- Competitor & Price Research: Automate the gathering of product listings, pricing grids, and market intelligence. WebBrain can bypass basic paywalls and cookie banners cleanly, compiling research digests directly in the side panel.
- Repetitive Admin Form-Filling: Optional local profiles allow users to store short plaintext bios, addresses, or metadata. When presented with standard registration/ingestion forms, WebBrain uses this local context to autofill low-stakes forms.
- Autonomous Multi-Step Workflows: SMEs can delegate workflows like: "Navigate to GitHub, find trending repositories in Python, click into the top 3, and summarize their READMEs."
💻 Infrastructure & Setup
WebBrain supports a wide array of local engines and cloud endpoints:
Local Infrastructure Recommendations
- Recommended Model: Qwen 3.6 35B (
Qwen3.6-35B-A3B). It outperforms competitors on screenshot-based visual UI benchmarks. - Hardware Profile: An RTX 4090 (with INT4 AutoRound quantization) or an RTX 5090 is ideal for running these larger local models smoothly.
- Ollama Integration (Ollama serve with origin CORS bypass):
``bash OLLAMA_ORIGINS="*" ollama serve # Set WebBrain base URL in settings to: http://localhost:11434/v1 ``
- llama.cpp Setup (Configuring a 16k context window):
``bash llama-server -m your-model.gguf -c 16384 --port 8080 # Set WebBrain endpoint in settings to: http://localhost:8080 ``
⚖️ Strategic Comparison: WebBrain vs. Claude/Frameworks
SMEs often struggle to differentiate between consumer extensions and developer tools. Use this comparison to guide client architecture:
| Feature | WebBrain | Claude in Chrome | Developer SDKs (OpenClaw / Browser-Use) |
|---|---|---|---|
| Primary Audience | End-users, non-technical staff | General consumers | Software developers, system engineers |
| Licensing & Code | MIT License (Open Source) | Proprietary | Open Source / Commercial |
| Data Privacy | Absolute (Fully Offline) | Cloud-only (Anthropic) | Depends on configuration |
| Deployment Model | Desktop Browser Extension | Cloud Extension | Server, Headless Docker Containers |
| Model Selection | Any OpenAI-compatible (Local & Cloud) | Claude-only | Model-agnostic |
| Execution Path | Interactive sidebar (On-Demand) | Interactive panel | Headless cron, API-triggered, terminal |
🧠 Consultant's Strategic Takeaway for EffJay
- Sovereign Audit & Sandbox Wedge: For highly cautious SME sectors (such as your target market of boutique law firms and financial advisors), you can pitch WebBrain + Local Ollama as a zero-trust browser automation solution. They can scrape websites, summarize sensitive client-provided PDFs, and fill out internal forms without breaching GDPR or confidentiality policies.
- Zero-Ops Client Implementations: Traditional browser automation requires complex Selenium/Playwright pipelines, infrastructure hosting, and routine code maintenance. WebBrain shifts browser automation to a client-side, user-driven interface, meaning your clients get advanced automation capabilities with zero maintenance contracts for you ("never again" maintaining operational infrastructure).
- Sovereign Edge vs. Rented Intelligence: SMEs can use a standard local workstation with a single RTX 4090 to host a Qwen 3.6 35B model, providing the entire administrative team with unlimited, secure browser automation for a $0/month token fee.
🔗 Related Notes
- [[MOC - SME AI Consulting]]
- [[SME Guide to On-Premises Private AI Infrastructure (WSL2, Docker, Ollama, Open WebUI)]]
- [[The SME Consultant Bullshit Detector]]
- [[AI Building Blocks for SMEs]]
- [[Awesome OpenClaw Skills]]