What you’ll build
A script that:- Launches a BrowserBox with Chromium
- Connects via Playwright or Puppeteer
- Navigates to a page and takes a screenshot
- Scrapes content from the page
Prerequisites
- Python (Playwright)
- Node.js (Puppeteer)
Step 1: Launch a BrowserBox
Create a BrowserBox and get a connection endpoint.- Python (Playwright)
- Node.js (Puppeteer)
browser.py
Connection modes
BrowserBox has two mutually exclusive connection modes:Supported browsers
Step 2: Take a screenshot
Connect to the browser and capture a screenshot.- Python (Playwright)
- Node.js (Puppeteer)
screenshot.py
Step 3: Scrape a page
Extract content from a web page using standard DOM queries.- Python (Playwright)
- Node.js (Puppeteer)
scrape.py
Step 4: Interact with a page
Read content, click links, and handle navigation.- Python (Playwright)
- Node.js (Puppeteer)
interact.py
What’s next?
Connect to an LLM
Give your LLM agent the ability to browse the web by combining BrowserBox with function calling.
BrowserBox API reference
Full API docs for BrowserBox, BrowserBoxOptions, and connection endpoints.
AI agent integration
Production patterns for using BoxLite with AI agents.

