*** title: Browser Runtimes description: Launch profile-backed or ephemeral browser runtimes inside a workspace. ------------------------------------------------------------------------------------ Browser automation now starts from a workspace, not from a root browser client. ## Start a profile-backed runtime ```ts const workspace = await bctrl.workspaces.create({ name: 'sales-workflow' }); const runtime = await workspace.runtimes.browser('crm').playwright({ launch: { mode: 'profile', profileId: 'sales-bot', }, }); ``` ## Start an ephemeral runtime ```ts const runtime = await workspace.runtimes.browser('quick').playwright({ launch: { mode: 'ephemeral', }, }); ``` ## Start an ephemeral runtime with config ```ts const runtime = await workspace.runtimes.browser('scrape').playwright({ launch: { mode: 'ephemeral', config: { humanize: true, solveCaptchas: true, }, }, }); ``` ## Work with the runtime ```ts await runtime.page.goto('https://example.com'); const live = await runtime.live({ interactive: true }); const recording = await runtime.recording(); await runtime.stop(); ``` ## Long-running agents Use the same runtime for long-running agent calls: ```ts const op = await runtime.browserUse.agent.execute('Export the latest invoices'); const latest = await workspace.operations.wait(op.id, { until: 'completed' }); ``` ## Related references * Browser capability reference covers `page.goto`, `locator.click`, event listeners, Stagehand, and browser-use. * API reference covers workspaces, runtimes, operations, artifacts, and browser profiles.