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:
llm_openai_model: primary browser-control model. Default:o3.page_extraction_llm_openai_model: page extraction model. Default:gpt-5-mini.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 fromredacted_dict()output.extend_system_message: optional system prompt extension.vision_detail_level:auto,low, orhigh. Default:auto.llm_timeout_in_s: optional LLM timeout.step_timeout_in_s: per-step browser timeout. Default:180.agent_kwargs: additionalbrowser_use.Agentconstructor arguments. It cannot override client-managed arguments such as the task, LLMs, browser session,sensitive_data, or timeouts.enable_cloud_sync: controlsbrowser-usecloud sync. Default:False.logging_level:debug,info,warning,error, orresult. Default:info.max_session_retries: recoverable session retries. Default:2.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:
STEEL_API_KEY: used bySteelBrowserInfrastructure()whenapi_keyis not passed.OPENSANDBOX_DOMAIN: OpenSandbox control-plane host. Default:localhost:8080.OPENSANDBOX_API_KEY: required for shared OpenSandbox clusters; optional for local insecure servers.OBJECT_STORAGE_URL: MinIO/S3 endpoint, for examplelocalhost:9001orhttps://storage.example.OBJECT_STORAGE_USERNAME: object storage access key.OBJECT_STORAGE_PASSWORD: object storage secret key.OBJECT_STORAGE_BUCKET_NAME: target bucket name.OBJECT_STORAGE_DIRECTORY_PREFIX: optional object key prefix.OBJECT_STORAGE_SECURE:truefor 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:
run(task): async generator that yieldsBrowserUseStreamEventvalues as work progresses.run_once(task): async method that returns oneBrowserUseRunResultand includes emitted events inresult.events.run_sync(task): blocking wrapper aroundrun_once()usingasyncio.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.
Error Contract
Failures return safe, actionable messages and preserve the legacy error string for compatibility. Error results and terminal stream events also expose error_info with:
code: a stable, library-scoped machine-readable code;message: a bounded summary that explains what failed without secrets or provider internals;next_action: the next step for the caller;retryable: whether a retry may be appropriate;reference_id: a run-level ID shared by the result, events, and structured logs; anddetails: JSON-safe diagnostic context.
Public error codes are:
gl_browser_use.error: unclassified SDK failure.gl_browser_use.dependency.missing: an optional provider dependency is unavailable.gl_browser_use.config.invalid: configuration is missing or invalid.gl_browser_use.execution.failed: browser task execution failed.gl_browser_use.task.failed: the underlying agent reported a failed task.gl_browser_use.task.output_invalid: structured task output could not be parsed or validated.gl_browser_use.session.retry_exhausted: recoverable session failures exhausted the retry budget.
Diagnostic logs use the same gl_browser_use. prefix. Recording diagnostics include gl_browser_use.recording.resolve_failed, gl_browser_use.recording.schedule_failed, gl_browser_use.recording.storage_unavailable, gl_browser_use.recording.download_failed, gl_browser_use.recording.background_failed, gl_browser_use.recording.background_unavailable, gl_browser_use.recording.navigation_failed, and gl_browser_use.recording.upload_failed. Cleanup diagnostics include gl_browser_use.cleanup.endpoint_unavailable, gl_browser_use.cleanup.recorder_failed, gl_browser_use.cleanup.eventbus_failed, gl_browser_use.cleanup.agent_failed, gl_browser_use.cleanup.browser_failed, gl_browser_use.cleanup.infrastructure_failed, and gl_browser_use.cleanup.sandbox_failed.
Terminal event content, error-event thinking_and_activity_info["data_value"], and the legacy result error combine message with next_action, so callers can act without reading logs first. Public exception strings and error messages are bounded, sanitized summaries; detailed causes remain in redacted structured diagnostics.
Reference IDs use the glbu_<hex> format and are distinct from error codes. Use the reference_id when searching centralized logs or contacting support. Configuration diagnostics are redacted recursively, including API keys, nested secret-shaped values, and URL credentials; arbitrary non-JSON values are replaced with a safe placeholder. A recoverable session retry restarts the task from the beginning, so external actions can be repeated; make retried tasks idempotent when possible. Recording is optional telemetry: a recording failure is reported in safe metadata and cannot change the primary task status.
Result Contract
BrowserUseRunResult contains:
status:success,error, orcancelled.task: normalized task string.final_output: final text extracted from the underlying agent, orTask completedwhen no final text is available.session_id: infrastructure session ID when an external browser session was used.streaming_url: browser debug or streaming URL when available.recording_url: expected recording URL when recording is configured.steps: number of browser-use steps executed.error: terminal error message for error results.events: collected stream events forrun_once().metadata: attempt, retry, and recording metadata.
Recording metadata uses these statuses:
disabled: infrastructure, storage, or browser context is not available.unsupported: the selected infrastructure does not support recording.unavailable: storage is configured but not available.scheduled: a background recording upload has been scheduled.failed: recording was eligible but could not be scheduled, resolved, or uploaded.unknown: recording may have started, but the terminal error did not include enough context to determine the final state.
Streaming Contract
BrowserUseStreamEvent contains:
event_typecontentthinking_and_activity_infois_finaltool_infometadata
Important event content values:
Receive streaming URL: emitted when a browser debug or streaming URL is available.Receive recording URL: emitted when a recording URL can be resolved.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. Each retry restarts the task from the beginning and may replay external side effects, so use idempotent tasks or set max_session_retries=0 when replay is unsafe.
Non-recoverable task failures return BrowserUseRunResult(status="error"). Recoverable failures that exhaust all attempts raise BrowserUseRetryExhaustedError.
Error types:
BrowserUseConfigurationError: missing or invalid runtime configuration.BrowserUseDependencyError: optional provider dependency problem.BrowserUseMissingDependencyError: optional provider extra is not installed.BrowserUseExecutionError: execution-time failure.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:
make test: run all tests.make test-unit: run unit tests with coverage.make test-integration: run integration-marked contract tests.make lint: run Ruff checks.make format: run Ruff fixes and formatter.make pre-commit: run pre-commit hooks.make build-check: build the package and validate artifacts with Twine.
Metadata
Release files for gl-browser-use-binary 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 5.2 MB
Release files / gl_browser_use_binary-0.1.5-cp313-cp313-win_amd64.whl
| Download URL | gl_browser_use_binary-0.1.5-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 470.2 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
2b003ccd424a5db2345d73462510d9c432139538252e6f65998c30331f6416b4
|
|
BLAKE2b-256 checksum How to use checksums |
19e5112cd43d0244ed90f30a99cc2dc3317ada807a6bbf85ffa1b5e1b155c671
|
| 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 7, 2026.
Transparency logRelease files / gl_browser_use_binary-0.1.5-cp313-cp313-manylinux_2_31_x86_64.whl
| Download URL | gl_browser_use_binary-0.1.5-cp313-cp313-manylinux_2_31_x86_64.whl |
|---|---|
| Size | 765.5 kB |
| Tags | CPython 3.13 Linux glibc 2.31+ x86-64 |
|
SHA-256 checksum How to use checksums |
e19fa2c6b40b762c407aa24037d501c4bfab1492f875247895b7fed0940fbe1e
|
|
BLAKE2b-256 checksum How to use checksums |
2423f0d6c431681341e15d253f713bd83306e2807832648b6c784e8644da777f
|
| 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.5-cp313-cp313-macosx_13_0_arm64.whl
| Download URL | gl_browser_use_binary-0.1.5-cp313-cp313-macosx_13_0_arm64.whl |
|---|---|
| Size | 524.1 kB |
| Tags | CPython 3.13 macOS 13.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
3c00510c11db7f5526f631f347c0d8502388c55dd6f9be929366deb089335628
|
|
BLAKE2b-256 checksum How to use checksums |
e399859057fa4550cfc648da4cd42c496e6d8774fefa0c5624db22bbdcbb6757
|
| 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 7, 2026.
Transparency logRelease files / gl_browser_use_binary-0.1.5-cp312-cp312-win_amd64.whl
| Download URL | gl_browser_use_binary-0.1.5-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 469.1 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
f319b85117f1538ee09ef37f919591e1b8242e51a06d03af44a37f2aa90d4171
|
|
BLAKE2b-256 checksum How to use checksums |
3ff7144fbb97722604af7b25087be4b1752badaac6ef28bd7177ba8fb641cbe3
|
| 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 7, 2026.
Transparency logRelease files / gl_browser_use_binary-0.1.5-cp312-cp312-manylinux_2_31_x86_64.whl
| Download URL | gl_browser_use_binary-0.1.5-cp312-cp312-manylinux_2_31_x86_64.whl |
|---|---|
| Size | 764.0 kB |
| Tags | CPython 3.12 Linux glibc 2.31+ x86-64 |
|
SHA-256 checksum How to use checksums |
16713215a2125eb557045aaac313f20d3f28ea7bd76d4795f5a4de465a9402a2
|
|
BLAKE2b-256 checksum How to use checksums |
0100ef4060cd456ee2ee79a8708b4d4711c777e5514911a525450ea1e8beeba3
|
| 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.5-cp312-cp312-macosx_13_0_arm64.whl
| Download URL | gl_browser_use_binary-0.1.5-cp312-cp312-macosx_13_0_arm64.whl |
|---|---|
| Size | 508.6 kB |
| Tags | CPython 3.12 macOS 13.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
510ef20ba5da85f19acd97e57f75ebfd9c58342bc50768c0e8c2de25f746b153
|
|
BLAKE2b-256 checksum How to use checksums |
165c9fe4bc3da24035473754e465c2347ec52d2eb4587cc85fea8e29934a6d8a
|
| 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 7, 2026.
Transparency logRelease files / gl_browser_use_binary-0.1.5-cp311-cp311-win_amd64.whl
| Download URL | gl_browser_use_binary-0.1.5-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 489.8 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
8cf45a23bdde0ef11c01a52c162eff448855c99657fb04e6bf73e705dee5710a
|
|
BLAKE2b-256 checksum How to use checksums |
dc6ed5790a4cf983d0997a2856e6cb9f1b701af8a3eac5ef135bb0c00041487b
|
| 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 7, 2026.
Transparency logRelease files / gl_browser_use_binary-0.1.5-cp311-cp311-manylinux_2_31_x86_64.whl
| Download URL | gl_browser_use_binary-0.1.5-cp311-cp311-manylinux_2_31_x86_64.whl |
|---|---|
| Size | 700.7 kB |
| Tags | CPython 3.11 Linux glibc 2.31+ x86-64 |
|
SHA-256 checksum How to use checksums |
f30443d76f94539fb2c133caf27cf61acd16ad98fcdf50192db87628044d68ef
|
|
BLAKE2b-256 checksum How to use checksums |
3c8fa3d9305c609c54484e2fb353588655637cf6ea186d578276dae78a986910
|
| 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.5-cp311-cp311-macosx_13_0_arm64.whl
| Download URL | gl_browser_use_binary-0.1.5-cp311-cp311-macosx_13_0_arm64.whl |
|---|---|
| Size | 508.5 kB |
| Tags | CPython 3.11 macOS 13.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
ec25fd278b75f01db4d3c7f0ae00b0d0d1832907c15ef3faeb5c7e469b8d47a7
|
|
BLAKE2b-256 checksum How to use checksums |
b3335eadb846f041a16e8cd627fef20b890d5f0b752ad478eda6966588d3cbe2
|
| 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 7, 2026.
Transparency log