Skip to content

Commit f43aa68

Browse files
authored
[docs]: adding context id to reference example (#922)
# why I think the contexts api is really important, and it's hard to figure out the exact config in here. # what changed Added example config for context api in the ref # test plan
1 parent 36cdac1 commit f43aa68

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/reference/initialization_config.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ const stagehand = new Stagehand({
3838
browserSettings: {
3939
advancedStealth: true, /* Only available on Scale Plans */
4040
blockAds: true, /* To Block Ad Popups (defaults to False) */
41+
context: {
42+
id: "<context-id>", /* The Browserbase Context ID. Will be a 36 character uuid. */
43+
persist: true, /* Whether or not to persist the context after browsing. Defaults to false. */
44+
},
4145
viewport: { // Browser Size (ie 1920x1080, 1024x768)
4246
width: 1024,
4347
height: 768,
@@ -126,6 +130,10 @@ stagehand = Stagehand(
126130
"browser_settings": {
127131
"advanced_stealth": True, # Only available on Scale Plans
128132
"block_ads": True, # To Block Ad Popups (defaults to False)
133+
"context": {
134+
"id": "<context-id>", # The Browserbase Context ID. Will be a 36 character uuid.
135+
"persist": True, # Whether or not to persist the context after browsing. Defaults to false.
136+
},
129137
"viewport": { # Browser Size (ie 1920x1080, 1024x768)
130138
"width": 1024,
131139
"height": 768,

0 commit comments

Comments
 (0)