Browser
Every box can come with its own browser. Create a box with browser: true to get a managed, headless Chromium that you control through the SDK. You can open tabs, read pages, take screenshots, extract structured data, run AI agents on the live DOM, record sessions, and connect Playwright directly over CDP.
Everything works headless. There is no desktop, no VNC, and nothing to install. Chromium is provisioned with the box and boots on first use.
Create a box with a browser
import { Box } from "@upstash/box"const box = await Box.create({ runtime: "node", browser: true,})// Open a tab (boots Chromium on first use)const tab = await box.browser.tab.create("https://news.ycombinator.com")// Navigate the same tab and read the resultconst page = await tab.goto("https://upstash.com/docs")console.log(page.title)from upstash_box import Boxbox = Box.create(runtime="node", browser=True)# Open a tab (boots Chromium on first use)tab = box.browser.tab.create("https://news.ycombinator.com")# Navigate the same tab and read the resultpage = tab.goto("https://upstash.com/docs")print(page.title)The browser can only be provisioned when the box is created. It cannot be
enabled on an existing box. If you need a browser on a box that does not have
one, create a new box with browser: true.
How it's organized
box.browser manages the browser itself: opening and listing tabs, recordings, and the CDP endpoint. Page-level operations live on a Tab handle, the object returned by tab.create, listTabs, or getTab. A tab handle is addressed by its Chrome DevTools Protocol target id, so it stays valid across navigations. You navigate, read, screenshot, and run AI tasks through the same handle.
What you can do
Open tabs, navigate, list and re-attach to them, and close them.
Page text and links, PNG screenshots, and schema-validated data extraction.
Natural-language actions and autonomous multi-step tasks on the live DOM.
A shareable, view-only live stream of any tab that you can embed in an iframe.
Record browser sessions to replayable video with chapter markers.
Drive the same browser with Playwright, Puppeteer, or Stagehand.
The AI-powered operations use an LLM and are metered:
extract and observe, act,
run. They need an API key for the model's
provider (Anthropic, OpenAI, OpenRouter, Vercel, or OpenCode) on the box or
your account.
You can also watch and control the browser from the Browser tab on your box's page in the Upstash Console. It shows the live view, runs AI tasks, and includes the SDK snippet for everything you do there.