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
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.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.
3
Clean up
Remove the stopped sandbox and unset the API key: