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

# Mounts & Inheritance

> How storage, vault, AI connections, and other resources flow from spaces to runtimes.

Spaces define the resource boundary. Runtimes inherit that boundary from their space.

```txt
Space
  storage namespace
  vault prefixes
  AI connection allowlist
  browser resources

Runtime
  inherits the space boundary
```

Use space mounts to make durable resources available to runtimes and hosted invocations.

## Storage

Use space storage for durable files: inputs, downloads, reports, screenshots, and artifacts.

```ts
const space = await bctrl.spaces.create({
  name: "invoice-agent",
  mounts: {
    storage: {
      space: "shared-invoices",
    },
  },
});
```

```ts
const uploaded = await space.storage.files.upload(invoicePdf, {
  path: "inputs/invoice.pdf",
});
```

Storage paths are durable cloud paths. They are not runtime-local file paths. Use runtime file staging when a browser or agent needs a real file path inside the runtime.

```ts
const staged = await runtime.files.stage({
  fileId: uploaded.id,
});

console.log(staged.path);
```

## Vault

Use the vault for credentials, API keys, and TOTP seeds.

```ts
await bctrl.vault.set("clients/acme/quickbooks", {
  username: "bot@example.com",
  password: process.env.QUICKBOOKS_PASSWORD!,
  totp: process.env.QUICKBOOKS_TOTP_SEED!,
});
```

Mount only the prefixes the space should access.

```ts
const space = await bctrl.spaces.create({
  name: "acme-invoice-ops",
  mounts: {
    vault: {
      allow: ["clients/acme/"],
    },
  },
});
```

## AI connections

AI connections are provider credentials for hosted agent flows.

```ts
const ai = await bctrl.aiConnections.create({
  provider: "anthropic",
  label: "Anthropic production",
  apiKey: process.env.ANTHROPIC_API_KEY!,
  defaultModel: "claude-sonnet-4-5",
});

const space = await bctrl.spaces.create({
  name: "research-agent",
  mounts: {
    ai: {
      allowConnections: [ai.id],
      defaults: {
        stagehand: {
          connection: ai.id,
          model: "claude-sonnet-4-5",
        },
      },
    },
  },
});
```

## Runtime configuration

Runtime configuration chooses the browser resources for a specific launch, such as profile, extensions, proxy, stealth, humanization, and CAPTCHA behavior.

```ts
const runtime = await space.runtimes.browser.launch({
  name: "quickbooks",
  profile: "prof_sales_bot",
  extensionIds: ["ext_internal_tools"],
  config: {
    stealth: "high",
    humanize: true,
    proxy: {
      mode: "saved",
      id: "proxy_us_residential",
    },
  },
});
```

## Related

* [Spaces](/sdk/core-concepts/spaces)
* [Runtimes](/sdk/core-concepts/runtimes)
* [Storage](/sdk/core-concepts/storage)
* [Vault](/sdk/resources/vault)