Runtimes
A runtime is a remote resource — a browser, desktop, or spreadsheet — running on BCTRL infrastructure inside a workspace. You don’t run anything locally. Your code sends commands over the network and gets results back.
Today, BCTRL supports browser runtimes. Desktop and spreadsheet runtimes are coming.
Launching a browser runtime
Every runtime needs an alias (a name you choose) and a driver (how you want to interact with it):
The alias "main" identifies this runtime within the workspace. You can run multiple runtimes concurrently — each with its own alias.
Drivers
Pick the driver that matches your automation style:
Full Playwright API — page.goto(), page.locator(), page.evaluate(). Best for structured automation with strong selector support.
Puppeteer API — familiar if you’re coming from Chrome DevTools Protocol workflows.
AI-native driver — stagehand.act(), stagehand.extract(), stagehand.observe(). Best for agents that reason about page content rather than using selectors.
WebDriver protocol — driver.get(), driver.findElement(). Familiar to enterprise automation teams.
All four drivers connect to the same remote browser — the driver just determines the API surface you use to control it.
Launch modes
Ephemeral
A fresh browser with no saved state. Destroyed when the runtime stops.
Ephemeral with config
Customize the browser’s behavior:
Profile-backed
Use a persistent browser profile with saved cookies, storage, and fingerprint:
Profiles are managed via bctrl.browserProfiles and persist across runtime restarts.
Working with a runtime
Once launched, the runtime gives you the driver’s native API surface:
See Browser Capabilities for the full reference.
AI agent execution
Runtimes with Stagehand or browser-use support agent-level commands:
Long-running agent calls return an operation that you can poll or wait on:
Viewing and embedding
Get a live interactive view or a recording of a runtime:
Multiple concurrent runtimes
A workspace can run multiple runtimes simultaneously:
Base runtime methods
These methods are available on every runtime regardless of driver. They work the same across Playwright, Puppeteer, Stagehand, and Selenium.
run(request)
Run structured automation steps directly against the runtime. This is the low-level interface that all driver methods use under the hood.
Each step has a call (method name), optional args (array), optional ref (target ID), and optional bind (alias for the result). Steps execute in order.
Returns WorkspaceExecuteResponse
stop()
Stop the runtime and release infrastructure. Profile-backed runtimes save their state before stopping.
Returns Runtime — the final runtime state.
live(options?)
Get an embeddable live view of the browser. Can be interactive (control the browser) or view-only.
Returns { iframeUrl: string }
recording()
Get a recording replay of the runtime’s session.
Returns { iframeUrl: string }
state()
Query the current state of the runtime — which pages are open, the current URL, driver info.
Returns WorkspaceStateResponse
events.list(query?)
List events that have occurred in the runtime — navigation, console logs, errors, page creation.
events.wait(request?, options?)
Wait for an event matching the given criteria. Blocks until a match or timeout.
captcha.detect(options?)
Detect captchas present on the current page.
captcha.solve(options?)
Attempt to solve a detected captcha.
stagehand.act(instruction, options?)
Execute a natural-language instruction.
stagehand.extract(instruction, schema, options?)
Extract structured data from the page using natural language.
stagehand.observe(instruction?, options?)
Observe the page and identify interactive elements.
stagehand.agent(config?)
Create a Stagehand agent for multi-step autonomous tasks.
stagehand.getMetrics() / stagehand.getHistory()
browserUse.agent(config?).execute(task, options?)
Run an autonomous browser-use agent.
browserUse.codeAgent(config?).execute(task, options?)
Run a browser-use code agent (generates and executes code).
Related
- Workspaces — the container that holds runtimes
- Scopes & Inheritance — how workspace mounts flow to runtimes
- Browser Capabilities — full driver method reference
- API Reference: Runtimes — the underlying HTTP endpoints

