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.2.tar.gz (13.5 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.2-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bctrl-0.1.2.tar.gz
  • Upload date:
  • Size: 13.5 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.2.tar.gz
Algorithm Hash digest
SHA256 5dfd97155011065ddbb7134768cc9a3b298644b25c3b9450aeaa39890e5bc757
MD5 01f23b5d113bdc631a7ec4d60c38d983
BLAKE2b-256 cefbcd3c6e05c0198f1bcbb52d58ed1f235df2c822d6b8dda65eff9897ee07af

See more details on using hashes here.

Provenance

The following attestation bundles were made for bctrl-0.1.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: bctrl-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 15.4 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3d99b9390c0400c71596b96d978a94f118bb941501c6b9fb6149478a80fad642
MD5 99770a7559a291139e322476519295d5
BLAKE2b-256 4e556c38a96a45caf74d977b09833717e18596937a68caec8757e8ae96119bd8

See more details on using hashes here.

Provenance

The following attestation bundles were made for bctrl-0.1.2-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

0.1.3

2 files

This release

0.1.2 This release

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