> 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.

# Runtimes

> Runtimes are live execution targets inside a space.

A runtime is the running environment inside a space. Browser runtimes are the stable runtime type today.

```txt
Runtime = control
Run = observability
```

Use runtime APIs to launch, connect, invoke, move files, and stop. Use the current run to inspect what happened.

## Create a browser runtime

```ts
const runtime = await space.runtimes.browser.launch({
  name: "quickbooks",
  profile: "quickbooks-bot",
  metadata: {
    customerJobId: "job_123",
  },
});
```

The runtime name is first-class. Use names like `crm`, `quickbooks`, or `research` so scripts and agents can reason about the environment.

## Runtime metadata

```ts
console.log(runtime.id);
console.log(runtime.status);
console.log(runtime.activeRunId);
```

`activeRunId` is always present and nullable. Prefer `runtime.currentRun()` when you need the active run and its helpers.

```ts
const run = await runtime.currentRun();

await run.events.list();
await run.artifacts.list();
```

## Control the runtime through a connection

```ts
const connection = await runtime.connections.create({
  protocol: "cdp",
});
```

Then pass `connection.endpoint.url` to your native browser framework.

```ts
import { chromium } from "playwright";

const browser = await chromium.connectOverCDP(connection.endpoint.url);
```

## Stop a runtime

```ts
await runtime.stop();
```

Stopping a runtime tears down its active browser process and prevents new connection attaches.

## Runtime types

| Type        | Status  | Primary control path           |
| ----------- | ------- | ------------------------------ |
| Browser     | Current | CDP connection                 |
| Desktop     | Planned | CUA or RDP connection          |
| Spreadsheet | Planned | MCP or provider API connection |

Only browser CDP connections are requestable today.

## Related

* [Connections](/sdk/core-concepts/connections)
* [Browser Runtimes](/sdk/browser-runtimes/overview)
* [Runs](/sdk/core-concepts/runs)