Conversation
Kylejeong2
approved these changes
Sep 28, 2026
Kylejeong2
left a comment
Member
There was a problem hiding this comment.
looks good, i assume you tested locally
only note is to maybe use model gateway instead
Kylejeong2
approved these changes
Sep 29, 2026
Kylejeong2
approved these changes
Sep 29, 2026
AzamAbdul
approved these changes
Sep 29, 2026
akeimach
deleted the
alyssamaruyama/ap-2918-swap-out-pw-for-stagehand-in-functions-quick-start
branch
September 30, 2026 00:07
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.
We can use Stagehand as our starter template now that we support secrets!
Testing:
pnpm build && pnpm packalias bb-dev="node $HOME/dev/sdk-functions-node/dist/cli.js"to create your local version of bbcd ~/dev && bb-dev init sdk-test && cd sdk-test. Check that index.ts is the inline Stagehand starter, that pnpm-workspace.yaml has only allowBuilds, that package.json has packageManager and no devEngines, and the printed instructions share how to upload the extension idcp ~/dev/sdk-functions-node/browserbasehq-sdk-functions-*.tgz . && pnpm add ./browserbasehq-sdk-functions-1.0.2.tgz. package.json should now show"@browserbasehq/sdk-functions": "file:browserbasehq-sdk-functions-1.0.2.tgz".browse cloud extensions upload node_modules/@browserbasehq/stagehand/dist/assets/stagehand-extension.zip,, then replaceyour-extension-idinindex.ts.envasBROWSERBASE_API_KEY=<your prod key>and also runexport BROWSERBASE_API_KEY=<your prod key>browse cloud secrets create BROWSERBASE_API_KEY --env BROWSERBASE_API_KEYpnpm bb dev index.ts, then in a new terminal:curl -X POST http://127.0.0.1:14113/v1/functions/my-function/invoke -H 'Content-Type: application/json' --data '{}'pnpm bb publish index.tsbrowse functions secrets attach <functionId> <secretId>pnpm bb invoke <functionId>and make sure you get the same result as step 8.