feat: add Steel cloud browser support#36
Open
nibzard wants to merge 1 commit into
Open
Conversation
Add "steel" as a third browser_mode alongside "browserbase" and "local". The harness forwards STEEL_API_KEY to generated scripts via _browser_env, and the prompt templates teach the agent to create a Steel cloud session (POST https://api.steel.dev/v1/sessions with the Steel-Api-Key header) and connect Playwright over CDP to wss://connect.steel.dev. Steel needs no project id, only STEEL_API_KEY. Session creation uses raw httpx (already a dependency); no new package required. - local_workspace.py: forward STEEL_API_KEY; document the new mode - base.yaml / task_showcase.yaml: Steel branch in the Browser Mode section - crafted_cli.yaml: make the cloud-session helper BROWSER_MODE-aware - README: document browser_mode and required env vars - tests: cover _browser_env credential forwarding for steel/browserbase Verified end-to-end against a live Steel session: create -> CDP connect -> navigate -> screenshot -> release.
cb1d66d to
ca140f2
Compare
Author
|
@microsoft-github-policy-service agree company="Steel" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds Steel as a third
browser_modealongsidebrowserbaseand
local. Setbrowser_mode: steeland the agent's scripts open a Steel cloudsession 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()passesSTEEL_API_KEYthrough to the subprocess.base.yaml/task_showcase.yaml— the Browser Mode prompt section gets a Steelbranch with a snippet the agent copies.
crafted_cli.yaml— the cloud-session helper checksBROWSER_MODEand returns aCDP URL for whichever provider you picked.
browser_mode(it didn't before)._browser_envcredential forwarding for bothsteelandbrowserbase.There isn't much daylight between the two providers:
POST api.browserbase.com/v1/sessionsPOST api.steel.dev/v1/sessionsx-bb-api-keySteel-Api-KeyBROWSERBASE_API_KEY+BROWSERBASE_PROJECT_IDSTEEL_API_KEYconnect_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 sameway the Browserbase path does. I skipped the Steel Python SDK on purpose.
Testing
pytest tests/— 11 passed.release. Got a real page back and the session closed with a 200.
Usage