← /projects

browse-multi

Concurrent headless browser automation for AI agents, with per-instance isolation.

The Problem

AI coding assistants need to browse the web, but shared browser instances break when multiple agents run in parallel or in sandboxed sub-agents. Agents need isolation, named instances, and compatibility with Claude Code's macOS Seatbelt sandbox (which blocks Chromium launch and localhost TCP from sandboxed processes).

What I Built

A three-tier framework: an MCP server (stdio JSON-RPC 2.0, runs outside the sandbox) spawns per-instance HTTP daemons (Playwright + Chromium, one per agent on ports 9400–9420) that handle DOM interaction, screenshots, navigation, and content extraction. Each agent gets its own named Chromium process with full isolation. Supports up to 21 concurrent instances, auto-shuts down after 30 min idle. Includes session management (login flow, cookie export/import), a @ref DOM annotation system for element selection, and ring buffers for console/network inspection.

Notable

Architecture prioritizes sandbox compatibility over simplicity. The CLI uses HTTP (fails in sandboxed sub-agents); the MCP interface works everywhere by running outside the sandbox. The login mode disables Playwright automation flags to bypass Google/Gmail bot detection, connecting via Chrome DevTools Protocol directly. Zero npm dependencies beyond Playwright itself.

Stack

Node.js 18+Playwright (pinned)ChromiumMCPNode stdlib

Status

Open source at github.com/blaizew/browse-multi.