Webwright icon indicating copy to clipboard operation
Webwright copied to clipboard

feat: add Steel cloud browser support

Open nibzard opened this issue 6 months ago • 1 comments

What

Adds Steel as a third browser_mode alongside browserbase and local. Set browser_mode: steel and the agent's scripts open a Steel cloud session and drive it over CDP.

Why

Same idea as the existing Browserbase support, just a second provider to pick from. Steel wants one API key and no project id, so there's slightly less to configure.

How

Turns out the harness was already set up for this — Steel slotted in as a mode, not a new subsystem:

  • local_workspace.py — _browser_env() passes STEEL_API_KEY through to the subprocess.
  • base.yaml / task_showcase.yaml — the Browser Mode prompt section gets a Steel branch with a snippet the agent copies.
  • crafted_cli.yaml — the cloud-session helper checks BROWSER_MODE and returns a CDP URL for whichever provider you picked.
  • README — now documents browser_mode (it didn't before).
  • tests — cover _browser_env credential forwarding for both steel and browserbase.

There isn't much daylight between the two providers:

Browserbase Steel
Create session POST api.browserbase.com/v1/sessions POST api.steel.dev/v1/sessions
Auth header x-bb-api-key Steel-Api-Key
Credentials BROWSERBASE_API_KEY + BROWSERBASE_PROJECT_ID STEEL_API_KEY
Connect connect_over_cdp(session["connectUrl"]) connect_over_cdp("wss://connect.steel.dev?apiKey=...&sessionId=...")

No new dependencies. Session creation uses httpx, which is already a dep, the same way the Browserbase path does. I skipped the Steel Python SDK on purpose.

Testing

  • pytest tests/ — 11 passed.
  • All config templates load and render through Jinja2.
  • Ran it against a real Steel session: create, connect over CDP, navigate, screenshot, release. Got a real page back and the session closed with a 200.

Usage

export STEEL_API_KEY=...
# set browser_mode: steel in your config, then:
python -m webwright.run.cli -c base.yaml -c model_claude.yaml \
    -t "..." --start-url https://example.com -o outputs/default

nibzard avatar May 29 '26 09:05 nibzard

@microsoft-github-policy-service agree company="Steel"

nibzard avatar May 29 '26 09:05 nibzard