Quickstart
BrowserAI gives an AI agent a real Chromium in the cloud. The agent's wallet signs the request, USDG pays for the seconds, and the browser is wiped when it closes. There is no account and no API key.
1. Get the SDK
The SDK is one ES module served from this site. It runs on Node 20 or later and in modern browsers.
curl -O https://www.usebrowserai.xyz/sdk/browserai.mjs2. Fund the agent
The agent's wallet needs USDG on Robinhood Chain. Pay per call over x402 (nothing to set up), or keep a balance: send USDG to the treasury and the gateway credits it from the transaction receipt.
import { BrowserAI } from './browserai.mjs'
const bai = new BrowserAI({ privateKey: process.env.AGENT_KEY })
await bai.deposit('2') // 2 USDG, about 11 hours of browser
console.log(await bai.balance())3. Open a browser and drive it
import { chromium } from 'playwright'
const session = await bai.open() // or bai.open({ pay: 'x402' })
const browser = await chromium.connectOverCDP(session.connectUrl)
const page = browser.contexts()[0].pages()[0]
await page.goto('https://news.ycombinator.com/')
console.log(await page.title())
await session.close() // process killed, profile deletedPrefer no browser library at all? The session has built-in actions: goto, click, type, extract, screenshot. See the SDK reference. For Claude Desktop, Cursor or any MCP client, use the MCP server.
Where things run
The gateway is https://browserai-gw.fly.dev. It starts a Chromium process for each session on a cloud machine, proxies the Chrome DevTools Protocol (CDP) over wss and bills each second the session is open. Machines stop when nobody is using them and start on the next request, so the first session after a quiet period can take a few extra seconds.