About this project

Open Browser is an open-source (MIT licensed) TypeScript framework that equips AI agents with the ability to autonomously browse the web. Built on Playwright, it enables agents to click, type, scroll, navigate, and extract data from any website by simply describing a task in natural language. The project is structured as a monorepo with three packages: a core library (open-browser) containing agent logic, browser control, DOM analysis, and LLM integration; a CLI (@open-browser/cli) for running agents and issuing browser commands; and a sandbox package (@open-browser/sandbox) for resource-limited execution with CPU/memory monitoring, timeouts, and domain restrictions. Key capabilities include multi-model support via the Vercel AI SDK (OpenAI, Anthropic, and Google models swappable with a single flag), an interactive REPL for live browser sessions, stall detection, cost tracking, session management, replay recording, and comprehensive error handling. The agent loop works by sending the current page state and task to an LLM, which decides which commands to execute (25+ command types), then observes results and loops until the task is complete. Usage is available both as a CLI (open-browser run "Find the top story on Hacker News and summarize it") and as a TypeScript library with configurable viewport, model, step limits, screenshots, and URL restrictions. Sandboxed execution adds timeout, memory limits, allowed domains, and output capture for safe production deployment.