Skip to main content

bctrl

Python SDK for the BCTRL public API.

Install

pip install bctrl

Quick Start

from bctrl import Bctrl

bctrl = Bctrl(api_key="bctrl_...")

with bctrl.runtimes.started_browser(name="checkout") as browser:
    print(browser.cdp_url)

    conversation = bctrl.conversations.create(
        runtime_id=browser.runtime_id,
        agent="stagehand",
    )
    bctrl.conversations.messages.create(
        conversation["id"],
        text="Extract the invoice number and total.",
    )
    for event in bctrl.conversations.stream(conversation["id"]):
        print(event)

Python methods use snake_case; the SDK sends the API's camelCase fields on the wire. For example, runtime_path becomes runtimePath.

Human-facing Views

Views are the supported way to share live progress and recordings. The bearer URL is returned only when the view is created:

view = bctrl.views.create(
    scope={"runtime_id": "runtime_..."},
    components={
        "live": {"control": "none"},
        "recordings": {},
    },
    expires_in_seconds=3600,
)

print(view["url"])

Set the chrome=none query parameter before the URL fragment when embedding the complete white-label view in your own application. Organization branding is managed with bctrl.account.get() and bctrl.account.update(...). Signed event delivery is managed through bctrl.webhooks, including secret rotation, delivery inspection, and redelivery.

Design

  • Sync-first client.
  • Route-first namespaces that mirror the API reference.
  • Raw response bodies as dictionaries.
  • Python context managers for runtime lifecycle cleanup.
  • Typed built-in Tool inputs generated from the canonical Tool registry.
  • Sync SSE iterators for Conversations and unified Run streams.
  • Explicit helpers for pagination and multipart uploads.
  • No hidden follow-up requests or stateful resource refreshes.

License

ISC

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bctrl-0.1.3.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bctrl-0.1.3-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file bctrl-0.1.3.tar.gz.

File metadata

  • Download URL: bctrl-0.1.3.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for bctrl-0.1.3.tar.gz
Algorithm Hash digest
SHA256 b38e6b99dbf81f81c339d53fe3f5325fb1cdffd8683ba05292de94f364b90f91
MD5 d0208dc0889739bcfbafba0495d4b731
BLAKE2b-256 c9ae7b633eaac5cba85c6377b44c47c9871e290f3c5c6e8c19c703f762488d14

See more details on using hashes here.

Provenance

The following attestation bundles were made for bctrl-0.1.3.tar.gz:

Publisher: publish.yml on bctrlhq/sdk-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bctrl-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: bctrl-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for bctrl-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 72afb97c878c24012df0d4500720ea5775529dc291a1543e41cf13ce25908ae8
MD5 3c00357b4202ebff09e48e98cc67cc1f
BLAKE2b-256 21a3ef945849b06787a74710e252c6c35f2fe5e434cddb92d169540bbfe26552

See more details on using hashes here.

Provenance

The following attestation bundles were made for bctrl-0.1.3-py3-none-any.whl:

Publisher: publish.yml on bctrlhq/sdk-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.5

2 files

0.1.4

2 files

This release

0.1.3 This release

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page