> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://platform.bctrl.ai/llms.txt.
> For full documentation content, see https://platform.bctrl.ai/llms-full.txt.

# Runtime cloud for AI agents

> Launch managed remote runtimes and connect to them through native protocols like CDP. BCTRL handles the infrastructure around the runtime.

Launch managed remote browser runtimes for your AI agents and connect to them through native protocols like CDP. BCTRL handles everything around the runtime: profiles, proxies, credentials, files, recordings, live view, artifacts, and observability.

<CardGroup cols={3}>
  <Card title="Quickstart" icon="fa-duotone fa-rocket" href="/sdk/getting-started/browser-quickstart">
    Install, authenticate, and launch your first runtime in 60 seconds.
  </Card>

  <Card title="API Reference" icon="fa-duotone fa-code" href="/api">
    Every endpoint, schema, and example for the public HTTP API.
  </Card>

  <Card title="Cookbook" icon="fa-duotone fa-book-open" href="/cookbook">
    Task-shaped recipes for common agent workflows.
  </Card>
</CardGroup>

## A working example

```ts
import { Bctrl } from '@bctrl/sdk';
import { chromium } from 'playwright';

const bctrl = new Bctrl({ apiKey: process.env.BCTRL_API_KEY! });

const space = await bctrl.spaces.create({ name: 'first-run' });
const runtime = await space.runtimes.browser('demo', { mode: 'ephemeral' });
const { endpoint } = await runtime.connections.create({ protocol: 'cdp' });

const browser = await chromium.connectOverCDP(endpoint.url);
const context = await browser.newContext();
const page = await context.newPage();
await page.goto('https://example.com');

await runtime.stop();
```

## What's inside

<CardGroup cols={3}>
  <Card title="Spaces" icon="fa-duotone fa-folder-open" href="/sdk/core-concepts/spaces">
    Isolated environments for agent work. Scope credentials, storage, and limits per space; issue thousands of sub-user keys from one organization.
  </Card>

  <Card title="Runtimes" icon="fa-duotone fa-cube" href="/sdk/core-concepts/runtimes">
    Managed remote resources running on BCTRL infrastructure. Browsers today, more environments on the roadmap.
  </Card>

  <Card title="Connections" icon="fa-duotone fa-ethernet" href="/sdk/core-concepts/connections">
    Short-lived signed leases into a runtime. CDP today; CUA, RDP, VNC, MCP, and HTTP planned. The low-level automation path.
  </Card>

  <Card title="Agent Context" icon="fa-duotone fa-microchip-ai" href="/sdk/core-concepts/agent-context">
    Machine-readable guidance for coding agents using a space through SDKs, terminals, or raw HTTP.
  </Card>

  <Card title="Resources" icon="fa-duotone fa-layer-group" href="/sdk/resources/storage">
    Browser profiles, proxies, extensions, AI provider keys, vault secrets, and storage. Mount them into a space; runtimes inherit.
  </Card>

  <Card title="Observability" icon="fa-duotone fa-monitor-waveform" href="/sdk/core-concepts/runs">
    Live view with human takeover, full session recordings, run events, artifacts, and per-runtime usage tracking.
  </Card>
</CardGroup>

## How it fits together

A **space** is the boundary. You mount what the agent needs at creation time — browser profiles, proxies, AI provider keys, vault secrets, a storage namespace — and the space defines what's accessible inside it.

**Runtimes** launched inside a space inherit those mounts automatically. A runtime can use the space's AI credentials, decrypt vault secrets within its allowed prefixes, and read or write the space's storage without you re-passing any of it. You drive a running runtime through a native protocol — CDP today — so you can keep using your existing automation tooling.

A **run** is a runtime's lifecycle from the moment it starts to the moment it stops. Every run carries unmatched observability — live view with human takeover, full session recordings, structured event timelines, downstream artifacts, and per-runtime usage. You always know what the agent is doing, and you can replay any run afterward.

**Invocations** are hosted AI agent calls inside a runtime — observe, extract, act, and multi-step automation through Stagehand and browser-use. Durable, cancellable, awaitable.