The browser image is large. Its first pull and Python package install can take a few minutes. Use a snapshot to avoid repeating that setup.
Run Browser Use
1
Create the agent
Save this as
browser-use-task.py:2
Start the sandbox
Save msb-trust.sh
beside The agent prints its final result and exits. The Browser Use browser session uses the Chromium already included in the image, so it does not download a second browser.The script configures Chromium’s certificate trust for TLS interception used by
browser-use-task.py. Export a Browser Use API key, then run the task. The secret stays on the host and can only be substituted into requests to Browser Use’s model endpoint.--secret. See Trusting certificates in applications.3
Clean up
Remove the stopped sandbox and unset the API key: