Skip to main content

GL Browser Use

GL Browser Use is a typed Python package for running browser automation tasks through browser-use. It provides a stable client facade, structured stream events, explicit result objects, optional Steel or OpenSandbox browser infrastructure, optional MinIO/S3-compatible recording storage, and bounded retries for recoverable browser-session failures.

Installation

Published binary package

Install the published binary distribution for normal application use:

pip install gl-browser-use-binary

Supported Python versions are 3.11, 3.12, and 3.13.

Install optional providers with the binary package only when you need them:

pip install "gl-browser-use-binary[steel]"           # Steel browser infrastructure
pip install "gl-browser-use-binary[opensandbox]"     # OpenSandbox browser infrastructure
pip install "gl-browser-use-binary[infrastructure]"  # All browser infrastructure providers
pip install "gl-browser-use-binary[minio]"           # MinIO/S3-compatible object storage
pip install "gl-browser-use-binary[storage]"         # All object storage providers
pip install "gl-browser-use-binary[full]"            # Infrastructure + storage providers

Use the concrete extras (steel, opensandbox, minio) in application dependency files when you want to pin exactly which provider you depend on. The slot extras (infrastructure, storage, full) are convenience aliases and may include more providers later.

The repository project is named gl-browser-use; the release workflow compiles and publishes it as gl-browser-use-binary. Both use the same gl_browser_use import namespace.

Local development

From the repository checkout, install the source project and development dependencies with uv:

cd libs/gl-browser-use
uv sync --all-extras --group dev

Quick Start

BrowserUseClient supports streaming and non-streaming execution. API keys can be passed directly or read from environment variables.

import asyncio

from gl_browser_use import BrowserUseClient, BrowserUseClientConfig
from gl_browser_use.infrastructure import SteelBrowserInfrastructure
from gl_browser_use.storage import MinIOS3CompatibleStorage


async def main() -> None:
    client = BrowserUseClient(
        config=BrowserUseClientConfig(
            llm_openai_api_key="...",
            page_extraction_llm_openai_api_key="...",
            max_session_retries=2,
            session_retry_delay_in_s=3.0,
        ),
        infrastructure=SteelBrowserInfrastructure(),  # reads STEEL_API_KEY by default
        storage=MinIOS3CompatibleStorage.from_environment(),
    )

    async for event in client.run("Open Hacker News and list five article titles"):
        print(event.content)


asyncio.run(main())

For a single aggregated result:

from gl_browser_use import BrowserUseClient, BrowserUseClientConfig
from gl_browser_use.infrastructure import SteelBrowserInfrastructure

client = BrowserUseClient(
    config=BrowserUseClientConfig(
        llm_openai_api_key="...",
        page_extraction_llm_openai_api_key="...",
    ),
    infrastructure=SteelBrowserInfrastructure(),
)

result = client.run_sync("Open Hacker News and list five article titles")

print(result.status)
print(result.final_output)
print(result.session_id)
print(result.streaming_url)
print(result.recording_url)
print(result.metadata)

Configuration

BrowserUseClientConfig validates required values when the client is created. If llm_openai_api_key or page_extraction_llm_openai_api_key is not passed, both default to OPENAI_API_KEY.

Common client options:

  1. llm_openai_model: primary browser-control model. Default: o3.
  2. page_extraction_llm_openai_model: page extraction model. Default: gpt-5-mini.
  3. sensitive_data: optional browser-use placeholder map. It accepts either a flat placeholder-to-value map or a domain-scoped map. Values are excluded from normal config serialization and redacted from redacted_dict() output.
  4. extend_system_message: optional system prompt extension.
  5. vision_detail_level: auto, low, or high. Default: auto.
  6. llm_timeout_in_s: optional LLM timeout.
  7. step_timeout_in_s: per-step browser timeout. Default: 180.
  8. agent_kwargs: additional browser_use.Agent constructor arguments. It cannot override client-managed arguments such as the task, LLMs, browser session, sensitive_data, or timeouts.
  9. enable_cloud_sync: controls browser-use cloud sync. Default: False.
  10. logging_level: debug, info, warning, error, or result. Default: info.
  11. max_session_retries: recoverable session retries. Default: 2.
  12. session_retry_delay_in_s: delay between retries. Default: 3.0.

Sensitive data and Agent options

config = BrowserUseClientConfig(
    llm_openai_api_key="...",
    page_extraction_llm_openai_api_key="...",
    sensitive_data={"username": "example-user", "password": "example-password"},
    agent_kwargs={"use_vision": False, "max_actions_per_step": 2},
)

Keep one configured client per credential scope. Browser-use also accepts domain-scoped sensitive_data maps. Never put real values in logs, serialized configuration, or agent_kwargs.

When supplying sensitive data, restrict browser navigation to the expected domains (for example, through the infrastructure session's browser-use BrowserProfile(allowed_domains=...)) to reduce prompt-injection exfiltration risk. agent_kwargs cannot override browser/session ownership (browser, browser_profile, and browser_session are reserved); configure those controls through the selected infrastructure instead.

Optional provider environment variables:

  1. STEEL_API_KEY: used by SteelBrowserInfrastructure() when api_key is not passed.
  2. OPENSANDBOX_DOMAIN: OpenSandbox control-plane host. Default: localhost:8080.
  3. OPENSANDBOX_API_KEY: required for shared OpenSandbox clusters; optional for local insecure servers.
  4. OBJECT_STORAGE_URL: MinIO/S3 endpoint, for example localhost:9001 or https://storage.example.
  5. OBJECT_STORAGE_USERNAME: object storage access key.
  6. OBJECT_STORAGE_PASSWORD: object storage secret key.
  7. OBJECT_STORAGE_BUCKET_NAME: target bucket name.
  8. OBJECT_STORAGE_DIRECTORY_PREFIX: optional object key prefix.
  9. OBJECT_STORAGE_SECURE: true for HTTPS when the endpoint has no scheme.

Copy .env.example to .env for local development, then load it with your application environment manager.

Runtime API

The client exposes three run methods:

  1. run(task): async generator that yields BrowserUseStreamEvent values as work progresses.
  2. run_once(task): async method that returns one BrowserUseRunResult and includes emitted events in result.events.
  3. run_sync(task): blocking wrapper around run_once() using asyncio.run().

Do not call run_sync() from an already running event loop. Use await run_once() or async for event in run() in async applications.

Cancelling the stream by breaking from async for or calling await stream.aclose() cancels the underlying run task. Browser sessions and infrastructure sessions are released in cleanup.

Result Contract

BrowserUseRunResult contains:

  1. status: success, error, or cancelled.
  2. task: normalized task string.
  3. final_output: final text extracted from the underlying agent, or Task completed when no final text is available.
  4. session_id: infrastructure session ID when an external browser session was used.
  5. streaming_url: browser debug or streaming URL when available.
  6. recording_url: expected recording URL when recording is configured.
  7. steps: number of browser-use steps executed.
  8. error: terminal error message for error results.
  9. events: collected stream events for run_once().
  10. metadata: attempt, retry, and recording metadata.

Recording metadata uses these statuses:

  1. disabled: infrastructure, storage, or browser context is not available.
  2. unsupported: the selected infrastructure does not support recording.
  3. unavailable: storage is configured but not available.
  4. scheduled: a background recording upload has been scheduled.
  5. unknown: recording may have started, but the terminal error did not include enough context to determine the final state.

Streaming Contract

BrowserUseStreamEvent contains:

  1. event_type
  2. content
  3. thinking_and_activity_info
  4. is_final
  5. tool_info
  6. metadata

Important event content values:

  1. Receive streaming URL: emitted when a browser debug or streaming URL is available.
  2. Receive recording URL: emitted when a recording URL can be resolved.
  3. Task completed: emitted for the final successful step.

Activity events encode iframe URLs in thinking_and_activity_info["data_value"] as a JSON string:

{"type": "iframe", "message": "<url>"}

Step events include serialized tool calls in tool_info["tool_calls"].

Retries And Errors

The client retries only classified recoverable browser-session failures, such as browser closure or websocket disconnect messages. Before each retry, it emits a retry status event. Retries are bounded by max_session_retries, so total attempts are max_session_retries + 1.

Non-recoverable task failures return BrowserUseRunResult(status="error"). Recoverable failures that exhaust all attempts raise BrowserUseRetryExhaustedError.

Error types:

  1. BrowserUseConfigurationError: missing or invalid runtime configuration.
  2. BrowserUseDependencyError: optional provider dependency problem.
  3. BrowserUseMissingDependencyError: optional provider extra is not installed.
  4. BrowserUseExecutionError: execution-time failure.
  5. BrowserUseRetryExhaustedError: recoverable session retries were exhausted.

Optional Providers

Optional providers are lazy-loaded. Importing gl_browser_use does not require Steel, OpenSandbox, or MinIO to be installed.

from gl_browser_use.infrastructure import OpenSandboxBrowserInfrastructure, SteelBrowserInfrastructure
from gl_browser_use.storage import MinIOS3CompatibleStorage

SteelBrowserInfrastructure creates Steel browser sessions and provides CDP/streaming URLs.

OpenSandboxBrowserInfrastructure provisions the repo-committed Chrome example image (opensandbox/chrome:latest, built from examples/opensandbox/chrome) through a local or shared OpenSandbox server, exposes noVNC inspection URLs, connects over proxied CDP, and uploads WebM session recordings to object storage with the same deferred recording_url semantics as Steel. Pass storage to BrowserUseClient when recording is enabled.

DevTools note: the Chrome image exposes CDP on 0.0.0.0:9222 (--remote-debugging-address=0.0.0.0 plus a socat forward for Chromium M113+). Rebuild from examples/opensandbox/chrome after pulling changes; GL Browser Use discovers CDP via sandbox.get_endpoint(9222). See examples/opensandbox/chrome/README.md.

OpenSandbox local setup:

DOCKER_HOST=unix://${HOME}/.docker/desktop/docker.sock \
  OPENSANDBOX_INSECURE_SERVER=YES opensandbox-server

cd libs/gl-browser-use/examples/opensandbox/chrome
docker build -t opensandbox/chrome:latest .
playwright install chromium

MinIOS3CompatibleStorage uploads session recordings to MinIO or an S3-compatible service and returns presigned URLs.

Development

From libs/gl-browser-use:

make install-dev
make test-unit
make test-integration
make lint
make build-check

Useful targets:

  1. make test: run all tests.
  2. make test-unit: run unit tests with coverage.
  3. make test-integration: run integration-marked contract tests.
  4. make lint: run Ruff checks.
  5. make format: run Ruff fixes and formatter.
  6. make pre-commit: run pre-commit hooks.
  7. make build-check: build the package and validate artifacts with Twine.

Metadata

Release files for gl-browser-use-binary 0.1.4.post1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for gl-browser-use-binary 0.1.4.post1
File
gl_browser_use_binary-0.1.4.post1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
gl_browser_use_binary-0.1.4.post1-cp313-cp313-manylinux_2_31_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.31+ x86-64 Details
gl_browser_use_binary-0.1.4.post1-cp313-cp313-macosx_13_0_arm64.whl CPython 3.13 CPython 3.13 macOS 13.0+ ARM64 Details
gl_browser_use_binary-0.1.4.post1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
gl_browser_use_binary-0.1.4.post1-cp312-cp312-manylinux_2_31_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.31+ x86-64 Details
gl_browser_use_binary-0.1.4.post1-cp312-cp312-macosx_13_0_arm64.whl CPython 3.12 CPython 3.12 macOS 13.0+ ARM64 Details
gl_browser_use_binary-0.1.4.post1-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
gl_browser_use_binary-0.1.4.post1-cp311-cp311-manylinux_2_31_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.31+ x86-64 Details
gl_browser_use_binary-0.1.4.post1-cp311-cp311-macosx_13_0_arm64.whl CPython 3.11 CPython 3.11 macOS 13.0+ ARM64 Details

Total release size: 4.7 MB

Release files / gl_browser_use_binary-0.1.4.post1-cp313-cp313-win_amd64.whl

Download URL gl_browser_use_binary-0.1.4.post1-cp313-cp313-win_amd64.whl
Size 416.7 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
9318b43f99889fbc6d8d6244cd9170758f1202d75cf286c8c6d092b5380d9caf
BLAKE2b-256 checksum
How to use checksums
d4504e47e7267418d3ed973d646f51d6055a28ece7278dd9c4eb395e937ba675
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Release files / gl_browser_use_binary-0.1.4.post1-cp313-cp313-manylinux_2_31_x86_64.whl

Download URL gl_browser_use_binary-0.1.4.post1-cp313-cp313-manylinux_2_31_x86_64.whl
Size 697.5 kB
Tags CPython 3.13 Linux glibc 2.31+ x86-64
SHA-256 checksum
How to use checksums
c988a81c96bcd58d0b8e869ff7b4a87d85aeff8304583c46c0a61ed66d3f0cb8
BLAKE2b-256 checksum
How to use checksums
45da608f96c314e7f0305e98bd27721a723590939dbb0c1ef5fdce293e4c5f52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.24

Release files / gl_browser_use_binary-0.1.4.post1-cp313-cp313-macosx_13_0_arm64.whl

Download URL gl_browser_use_binary-0.1.4.post1-cp313-cp313-macosx_13_0_arm64.whl
Size 464.1 kB
Tags CPython 3.13 macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
65d7d1e991503182d72606f174b7e37fac51e8ad6357305e3d017d31a97269c4
BLAKE2b-256 checksum
How to use checksums
7b109cee86c97ff87b4a02477ddd54427b0beaf002c2f710c7499b9ce7b6effd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Release files / gl_browser_use_binary-0.1.4.post1-cp312-cp312-win_amd64.whl

Download URL gl_browser_use_binary-0.1.4.post1-cp312-cp312-win_amd64.whl
Size 416.2 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
da4e41a0fe7309419dfe4d3469b957ec5bde57c584afdecbd45b7f6779b579bf
BLAKE2b-256 checksum
How to use checksums
6fafb8a8600af95c3aaa1058e998fe738c34e6fbb8bf5400037ac7fb8244e10e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Release files / gl_browser_use_binary-0.1.4.post1-cp312-cp312-manylinux_2_31_x86_64.whl

Download URL gl_browser_use_binary-0.1.4.post1-cp312-cp312-manylinux_2_31_x86_64.whl
Size 695.6 kB
Tags CPython 3.12 Linux glibc 2.31+ x86-64
SHA-256 checksum
How to use checksums
84c1cc3beeeacaea80575dabec1009d6388891f4d86e8732183e6b59490fb446
BLAKE2b-256 checksum
How to use checksums
6803a9aa13b6958d945270afd063b49818a610cba3a20a6cab311ba5eb27e991
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.24

Release files / gl_browser_use_binary-0.1.4.post1-cp312-cp312-macosx_13_0_arm64.whl

Download URL gl_browser_use_binary-0.1.4.post1-cp312-cp312-macosx_13_0_arm64.whl
Size 450.4 kB
Tags CPython 3.12 macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
9f5fa7071643f9c2b542bab14faa7dd0418f11dd3e7e324b703975ff2424d065
BLAKE2b-256 checksum
How to use checksums
8d0f2f33255eb90579a8ae88eb0efa0dce075a7f4e93d4d605294fc55d767812
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Release files / gl_browser_use_binary-0.1.4.post1-cp311-cp311-win_amd64.whl

Download URL gl_browser_use_binary-0.1.4.post1-cp311-cp311-win_amd64.whl
Size 435.9 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
44c5659a18016162af78938e95ccefdf6875ff7109834bd24cbfa82092e22b1f
BLAKE2b-256 checksum
How to use checksums
e051beb1ed0f2dabd6eadfbc4df44e7b9d38681ff0af0f97a52cf2a58e4f6305
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Release files / gl_browser_use_binary-0.1.4.post1-cp311-cp311-manylinux_2_31_x86_64.whl

Download URL gl_browser_use_binary-0.1.4.post1-cp311-cp311-manylinux_2_31_x86_64.whl
Size 637.3 kB
Tags CPython 3.11 Linux glibc 2.31+ x86-64
SHA-256 checksum
How to use checksums
336e83057e4288c32393894c08c276ee5e3b91f0f8b1234a4cd053d1da9ea6f7
BLAKE2b-256 checksum
How to use checksums
dfd3e4b40dc61d1e71be07f421bf144e57c189b20e10b0ea36c33719d66705c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.24

Release files / gl_browser_use_binary-0.1.4.post1-cp311-cp311-macosx_13_0_arm64.whl

Download URL gl_browser_use_binary-0.1.4.post1-cp311-cp311-macosx_13_0_arm64.whl
Size 451.5 kB
Tags CPython 3.11 macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
2d66f14065f69f8fe6d8738e32256841c6dd360d6bfff31027ae5d965a9cd8f2
BLAKE2b-256 checksum
How to use checksums
a1bd0e8992a4ba83a293411fece653c6b0269caf50f9ae264efe0a6e2eb36419
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.5

9 release files

This release

0.1.4.post1 This release

9 release files

0.1.4

9 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page