Whether Pino should be disabled for logging. This is helpful for Next.js or test environments. Pino will automatically be disabled if a custom logger is defined.
Enables self-healing mode. When set to true, Stagehand will attempt to recover from errors (eg. outdated cached element not resolving) by retrying the last action. Defaults to true. Set to false to disable LLM inference on cache errors.
Whether to preserve the user data directory after Stagehand is closed. This is useful for reusing local context with multiple sessions. Defaults to false.
Enables self-healing mode. When set to true, Stagehand will attempt to recover from errors (eg. outdated cached element not resolving) by retrying the last action. Defaults to true. Set to false to disable LLM inference on cache errors.
Whether to preserve the user data directory after Stagehand is closed. This is useful for reusing local context with multiple sessions. Defaults to false.
The constructor returns an instance of the Stagehand class configured with the specified options. However, to use Stagehand, you must still initialize it with init().
close() is a cleanup method to remove the temporary files created by Stagehand. It’s recommended that you call this explicitly when you’re done with your automation.
⌘I
{"docsConfig":{"theme":"willow","$schema":"https://mintlify.com/docs.json","name":"🤘 Stagehand","colors":{"primary":"#B88100","light":"#FFC83C","dark":"#FFC83C"},"logo":{"light":"https://mintcdn.com/readme-i18n/wcXsxm33rwhC6LZ-/logo/light_logo.png?fit=max\u0026auto=format\u0026n=wcXsxm33rwhC6LZ-\u0026q=85\u0026s=ccfd5e40372225d4bb7112bd575b54af","dark":"https://mintcdn.com/readme-i18n/wcXsxm33rwhC6LZ-/logo/dark_logo.png?fit=max\u0026auto=format\u0026n=wcXsxm33rwhC6LZ-\u0026q=85\u0026s=91fbcee700c0f917b585d0975c3d7618","href":"https://stagehand.dev"},"favicon":"/images/favicon.svg","navbar":{"links":[{"label":"Support","href":"mailto:[email protected]"}]},"footer":{"socials":{"x":"https://x.com/stagehanddev","github":"https://github.com/browserbase/stagehand","linkedin":"https://linkedin.com/company/browserbasehq","slack":"https://stagehand.dev/slack"}},"integrations":{"koala":{"publicApiKey":"pk_6e508a479e95d94298f034e98ec54590ccf4"}},"navigation":{"languages":[{"language":"en","href":"get_started/introduction"},{"language":"zh","href":"zh/get_started/introduction"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"readme-i18n","hasAudioNarration":false,"actualSubdomain":"readme-i18n","customDomains":["stagehand.readme-i18n.com"],"gitSource":{"type":"github","owner":"zdocapp","repo":"stagehand-zh","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a22014e2ad0776d24be8c00","collectionId":"1c93c516-aad2-445e-927f-da76b0b09988","schemaVersion":"v2"},"entitlements":{},"buildId":"6a22014e2ad0776d24be8c00:success","clientVersion":"0.0.4045","searchFilterCounts":[{"language":"en","tag":"Playbooks","count":8},{"language":"zh","tag":"Playbooks","count":8},{"language":"en","tag":"Reference","count":7},{"language":"zh","tag":"Reference","count":7},{"language":"en","tag":"Integrations","count":6},{"language":"zh","tag":"Integrations","count":6},{"language":"en","tag":"MCP Server","count":4},{"language":"zh","tag":"MCP Server","count":4},{"language":"en","tag":"Get Started","count":3},{"language":"zh","tag":"Get Started","count":3},{"language":"en","tag":"Concepts","count":2},{"language":"zh","tag":"Concepts","count":2}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[],"page":{"pagePath":"reference/initialization_config","slug":"/reference/initialization_config","pageMetadata":{"title":"Configuration","description":"How to configure Stagehand","icon":"gear","href":"/reference/initialization_config"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"How to configure Stagehand\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Expandable,Heading,ParamField,ResponseField,Tab,Tabs}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`stagehand-constructor`,children:`Stagehand constructor`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`84`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`84`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Basic usage`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Defaults to Browserbase; if no API key is provided, it will default to LOCAL`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Default model is gpt-4o`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` stagehand`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Stagehand`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Custom configuration`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` stagehand`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Stagehand`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tenv:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"LOCAL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`\t// env: \"BROWSERBASE\",`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // To run remotely on Browserbase (needs API keys)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tverbose:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tenableCaching:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`\tlogger`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`logLine`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` LogLine`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\t\tconsole`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`[\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`logLine`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`category`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`] `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`logLine`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`message`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\t},`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // LLM configuration`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` modelName:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"google/gemini-2.0-flash\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`/* Name of the model to use in \"provider/model\" format */`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` modelClientOptions:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` apiKey:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`GOOGLE_GENERATIVE_AI_API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`/* Model API key */`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`/* Configuration options for the model client */`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tapiKey:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`BROWSERBASE_API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tprojectId:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`BROWSERBASE_PROJECT_ID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`\t/* API keys for authentication (if you want to use Browserbase) */`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tbrowserbaseSessionID:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` undefined`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`/* Can set Session ID for resuming Browserbase sessions */`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` browserbaseSessionCreateParams:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`/* Browser Session Params */`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` projectId:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`BROWSERBASE_PROJECT_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` proxies:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`/* Using Browserbase's Proxies */`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` browserSettings:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\t\tadvancedStealth:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`/* Only available on Scale Plans */`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` blockAds:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`/* To Block Ad Popups (defaults to False) */`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` viewport:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Browser Size (ie 1920x1080, 1024x768)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` width:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1024`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` height:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 768`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` localBrowserLaunchOptions:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headless:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Launches the browser in headless mode.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` executablePath:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '/path/to/chrome'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Custom path to the Chrome executable.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` args:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'--no-sandbox'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'--disable-setuid-sandbox'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`], `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Additional launch arguments.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` env:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`NODE_ENV:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"production\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Environment variables for the browser process.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` handleSIGHUP:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` handleSIGINT:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` handleSIGTERM:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` ignoreDefaultArgs:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// or specify an array of arguments to ignore.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` proxy:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` server:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'http://proxy.example.com:8080'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` bypass:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'localhost'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` username:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'user'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` password:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'pass'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` tracesDir:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '/path/to/traces'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Directory to store trace files.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` userDataDir:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '/path/to/user/data'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Custom user data directory.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` acceptDownloads:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` downloadsPath:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '/path/to/downloads'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` extraHTTPHeaders:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'User-Agent'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Custom Agent'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` geolocation:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`latitude:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 37.7749`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`longitude:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` -`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`122.4194`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`accuracy:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 10`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` permissions:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"geolocation\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"notifications\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` locale:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"en-US\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` viewport:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`width:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1280`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`height:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 720`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` deviceScaleFactor:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` hasTouch:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` ignoreHTTPSErrors:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` recordVideo:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`dir:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '/path/to/videos'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`size:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`width:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1280`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`height:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 720`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` recordHar:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` path:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '/path/to/har.har'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` mode:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"full\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` omitContent:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` content:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"embed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` urlFilter:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '.*'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` chromiumSandbox:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` devtools:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` bypassCSP:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\t\tcdpUrl:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'http://localhost:9222'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` preserveUserDataDir:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Whether to preserve the user data directory after Stagehand is closed. Defaults to false.`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Resume existing Browserbase session`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` stagehand`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Stagehand`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tenv:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"BROWSERBASE\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tbrowserbaseSessionID:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"existing-session-id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`84`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`84`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` stagehand `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Stagehand`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Basic usage`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Defaults to Browserbase; if no API key is provided, it will default to LOCAL`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Default model is gpt-4.1-mini`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`stagehand `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Stagehand()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Custom configuration`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` custom_logger`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`log_line`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"[`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`log_line.category`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`log_line.message`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`stagehand `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Stagehand(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` env`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"LOCAL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # env=\"BROWSERBASE\", # To run remotely on Browserbase (needs API keys)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` verbose`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` enable_caching`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` logger`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`custom_logger,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # LLM configuration`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` model_name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"google/gemini-2.0-flash\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Name of the model to use in \"provider/model\" format`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` model_api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.getenv(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GOOGLE_GENERATIVE_AI_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Model API key`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.getenv(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"BROWSERBASE_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` project_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.getenv(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"BROWSERBASE_PROJECT_ID\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # API keys for authentication (if you want to use Browserbase)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` browserbase_session_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`None`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Can set Session ID for resuming Browserbase sessions`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` browserbase_session_create_params`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{ `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Browser Session Params`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"project_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: os.getenv(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"BROWSERBASE_PROJECT_ID\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"proxies\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Using Browserbase's Proxies`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"browser_settings\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"advanced_stealth\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Only available on Scale Plans`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"block_ads\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# To Block Ad Popups (defaults to False)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"viewport\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Browser Size (ie 1920x1080, 1024x768)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"width\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1024`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"height\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`768`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` local_browser_launch_options`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"headless\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Launches the browser in headless mode.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"executable_path\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/path/to/chrome\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Custom path to the Chrome executable.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"args\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"--no-sandbox\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"--disable-setuid-sandbox\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`], `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Additional launch arguments.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"env\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"NODE_ENV\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"production\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Environment variables for the browser process.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"handle_sighup\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"handle_sigint\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"handle_sigterm\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"ignore_default_args\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`False`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# or specify a list of arguments to ignore.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"proxy\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"server\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"http://proxy.example.com:8080\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"bypass\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"localhost\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"username\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"password\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pass\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"traces_dir\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/path/to/traces\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Directory to store trace files.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"user_data_dir\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/path/to/user/data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Custom user data directory.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"accept_downloads\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"downloads_path\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/path/to/downloads\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"extra_http_headers\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"User-Agent\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Custom Agent\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"geolocation\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"latitude\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`37.7749`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"longitude\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`-`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`122.4194`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"accuracy\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`10`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"permissions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"geolocation\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"notifications\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"locale\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"en-US\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"viewport\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"width\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1280`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"height\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`720`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"device_scale_factor\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"has_touch\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`False`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"ignore_https_errors\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"record_video\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"dir\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/path/to/videos\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"size\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"width\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1280`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"height\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`720`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"record_har\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"path\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/path/to/har.har\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"mode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"full\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"omit_content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`False`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"embed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"url_filter\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\".*\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"chromium_sandbox\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"devtools\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"bypass_csp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`False`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"cdp_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"http://localhost:9222\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Resume existing Browserbase session`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`stagehand `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Stagehand(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` env`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"BROWSERBASE\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` browserbase_session_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"existing-session-id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})})]}),`\n`,_jsx(_components.p,{children:`This constructor is used to create an instance of Stagehand.`}),`\n`,_jsxs(Heading,{level:`3`,id:`arguments-constructorparams`,children:[_jsx(_components.strong,{children:`Arguments:`}),` `,_jsx(_components.a,{href:`https://github.com/browserbase/stagehand/blob/ed318846479054b6c7e3862b6c0c8aaa0bb0f42a/types/stagehand.ts#L8-L23`,children:_jsx(_components.code,{children:`ConstructorParams`})})]}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`TypeScript`,id:`typescript`,children:[_jsx(ParamField,{path:`env`,type:`'LOCAL' | 'BROWSERBASE'`,optional:true,id:`param-env`,children:_jsxs(_components.p,{children:[`Defaults to `,_jsx(_components.code,{children:`'BROWSERBASE'`})]})}),_jsx(ParamField,{path:`apiKey`,type:`string`,optional:true,id:`param-api-key`,children:_jsxs(_components.p,{children:[`Your Browserbase API key. Defaults to `,_jsx(_components.code,{children:`BROWSERBASE_API_KEY`}),` environment variable`]})}),_jsx(ParamField,{path:`projectId`,type:`string`,optional:true,id:`param-project-id`,children:_jsxs(_components.p,{children:[`Your Browserbase project ID. Defaults to `,_jsx(_components.code,{children:`BROWSERBASE_PROJECT_ID`}),` environment variable`]})}),_jsx(ParamField,{path:`experimental`,type:`boolean`,optional:true,id:`param-experimental`,children:_jsx(_components.p,{children:`Enables access to experimental features.`})}),_jsx(ParamField,{path:`useAPI`,type:`boolean`,optional:true,id:`param-use-api`,children:_jsxs(_components.p,{children:[`Whether to use the stagehand API. Defaults to `,_jsx(_components.code,{children:`true`}),` when `,_jsx(_components.code,{children:`env: \"BROWSERBASE\"`}),`.`]})}),_jsxs(ParamField,{path:`browserbaseSessionCreateParams`,type:`object`,optional:true,id:`param-browserbase-session-create-params`,children:[_jsxs(_components.p,{children:[`Configuration options for creating new Browserbase sessions. More information on browserbaseSessionCreateParams can be found `,_jsx(_components.a,{href:`https://docs.browserbase.com/reference/api/create-a-session#body-browser-settings`,children:`here`}),`.`]}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{name:`projectId`,type:`string`,children:_jsx(_components.p,{children:`The Browserbase Project ID.`})}),_jsx(ResponseField,{name:`browserSettings`,type:`object`,id:`param-browser-settings`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`browserSettings.context`,type:`object`,id:`param-browser-settings-context`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`browserSettings.context.id`,type:`string`,id:`param-browser-settings-context-id`,children:_jsx(_components.p,{children:`The Context ID.`})}),_jsx(ResponseField,{name:`browserSettings.context.persist`,type:`boolean`,id:`param-browser-settings-context-persist`,children:_jsx(_components.p,{children:`Whether or not to persist the context after browsing. Defaults to false.`})})]})}),_jsx(ResponseField,{name:`browserSettings.extensionId`,type:`string`,id:`param-browser-settings-extension-id`,children:_jsxs(_components.p,{children:[`The uploaded Extension ID. See `,_jsx(_components.a,{href:`https://docs.browserbase.com/reference/api/upload-an-extension`,children:`Upload Extension`}),`.`]})}),_jsxs(ResponseField,{name:`browserSettings.fingerprint`,type:`object`,id:`param-browser-settings-fingerprint`,children:[_jsxs(_components.p,{children:[`See usage examples in the `,_jsx(_components.a,{href:`https://docs.browserbase.com/features/stealth-mode#fingerprinting`,children:`Stealth Mode page`}),`.`]}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`browserSettings.fingerprint.httpVersion`,type:`enum\u003cnumber>`,id:`param-browser-settings-fingerprint-http-version`,children:_jsxs(_components.p,{children:[`Available options: `,_jsx(_components.code,{children:`1`}),`, `,_jsx(_components.code,{children:`2`})]})}),_jsx(ResponseField,{name:`browserSettings.fingerprint.browsers`,type:`enum\u003cstring>[]`,id:`param-browser-settings-fingerprint-browsers`,children:_jsxs(_components.p,{children:[`Available options: `,_jsx(_components.code,{children:`chrome`}),`, `,_jsx(_components.code,{children:`edge`}),`, `,_jsx(_components.code,{children:`firefox`}),`, `,_jsx(_components.code,{children:`safari`})]})}),_jsx(ResponseField,{name:`browserSettings.fingerprint.devices`,type:`enum\u003cstring>[]`,id:`param-browser-settings-fingerprint-devices`,children:_jsxs(_components.p,{children:[`Available options: `,_jsx(_components.code,{children:`desktop`}),`, `,_jsx(_components.code,{children:`mobile`})]})}),_jsx(ResponseField,{name:`browserSettings.fingerprint.locales`,type:`string[]`,id:`param-browser-settings-fingerprint-locales`,children:_jsxs(_components.p,{children:[`Full list of locales available `,_jsx(_components.a,{href:`https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language`,children:`here`}),`.`]})}),_jsx(ResponseField,{name:`browserSettings.fingerprint.operatingSystems`,type:`enum\u003cstring>[]`,id:`param-browser-settings-fingerprint-operating-systems`,children:_jsxs(_components.p,{children:[`Note: `,_jsx(_components.code,{children:`operatingSystems`}),` set to `,_jsx(_components.code,{children:`ios`}),` or `,_jsx(_components.code,{children:`android`}),` requires `,_jsx(_components.code,{children:`devices`}),` to include `,_jsx(_components.code,{children:`\"mobile\"`}),`.\nAvailable options: `,_jsx(_components.code,{children:`android`}),`, `,_jsx(_components.code,{children:`ios`}),`,`,_jsx(_components.code,{children:`linux`}),`, `,_jsx(_components.code,{children:`macos`}),`, `,_jsx(_components.code,{children:`windows`})]})}),_jsx(ResponseField,{name:`browserSettings.fingerprint.screen`,type:`object`,id:`param-browser-settings-fingerprint-screen`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`browserSettings.fingerprint.maxHeight`,type:`integer`,id:`param-browser-settings-fingerprint-max-height`}),_jsx(ResponseField,{name:`browserSettings.fingerprint.maxWidth`,type:`integer`,id:`param-browser-settings-fingerprint-max-width`}),_jsx(ResponseField,{name:`browserSettings.fingerprint.minHeight`,type:`integer`,id:`param-browser-settings-fingerprint-min-height`}),_jsx(ResponseField,{name:`browserSettings.fingerprint.minWidth`,type:`integer`,id:`param-browser-settings-fingerprint-min-width`})]})})]})]}),_jsx(ResponseField,{name:`browserSettings.viewport`,type:`object`,id:`param-browser-settings-viewport`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`browserSettings.viewport.width`,type:`integer`,id:`param-browser-settings-viewport-width`}),_jsx(ResponseField,{name:`browserSettings.viewport.height`,type:`integer`,id:`param-browser-settings-viewport-height`})]})}),_jsx(ResponseField,{name:`browserSettings.blockAds`,type:`boolean`,id:`param-browser-settings-block-ads`,children:_jsxs(_components.p,{children:[`Enable or disable ad blocking in the browser. Defaults to `,_jsx(_components.code,{children:`false`}),`.`]})}),_jsx(ResponseField,{name:`browserSettings.solveCaptchas`,type:`boolean`,id:`param-browser-settings-solve-captchas`,children:_jsxs(_components.p,{children:[`Enable or disable captcha solving in the browser. Defaults to `,_jsx(_components.code,{children:`true`}),`.`]})}),_jsx(ResponseField,{name:`browserSettings.recordSession`,type:`boolean`,id:`param-browser-settings-record-session`,children:_jsxs(_components.p,{children:[`Enable or disable session recording. Defaults to `,_jsx(_components.code,{children:`true`}),`.`]})}),_jsx(ResponseField,{name:`browserSettings.advancedStealth`,type:`boolean`,id:`param-browser-settings-advanced-stealth`,children:_jsx(_components.p,{children:`Advanced Browser Stealth Mode.`})})]})}),_jsx(ResponseField,{name:`extensionId`,type:`string`,id:`param-extension-id`,children:_jsxs(_components.p,{children:[`The uploaded Extension ID. See `,_jsx(_components.a,{href:`https://docs.browserbase.com/reference/api/upload-an-extension`,children:`Upload Extension`}),`.`]})}),_jsx(ResponseField,{name:`keepAlive`,type:`boolean`,id:`param-keep-alive`,children:_jsx(_components.p,{children:`Set to true to keep the session alive even after disconnections. This is available on the Browserbase Startup plan only.`})}),_jsx(ResponseField,{name:`proxies`,type:`boolean`,id:`param-proxies`,children:_jsx(_components.p,{children:`Proxy configuration. Can be true for default proxy, or an array of proxy configurations.`})}),_jsx(ResponseField,{name:`region`,type:`enum\u003cstring>`,id:`param-region`,children:_jsxs(_components.p,{children:[`The region where the Session should run. Available options: `,_jsx(_components.code,{children:`us-west-2`}),`, `,_jsx(_components.code,{children:`us-east-1`}),`, `,_jsx(_components.code,{children:`eu-central-1`}),`, `,_jsx(_components.code,{children:`ap-southeast-1`})]})}),_jsx(ResponseField,{name:`timeout`,type:`number`,id:`param-timeout`,children:_jsxs(_components.p,{children:[`Duration in seconds after which the session will automatically end. Defaults to the Project’s defaultTimeout.\nRequired range: `,_jsx(_components.code,{children:`60 \u003c x \u003c 21600`})]})}),_jsxs(ResponseField,{name:`userMetadata`,type:`object`,id:`param-user-metadata`,children:[_jsxs(_components.p,{children:[`Arbitrary user metadata to attach to the session. For more information about user metadata, see `,_jsx(_components.a,{href:`https://docs.browserbase.com/features/sessions#user-metadata`,children:`UserMetadata`})]}),_jsx(Expandable,{title:`Properties`,children:_jsxs(_components.p,{children:[`userMetadata.`,_jsx(_components.code,{children:`{key}`}),` `,_jsx(_components.code,{children:`any`})]})})]})]})]}),_jsx(ParamField,{path:`browserbaseSessionID`,type:`string`,optional:true,id:`param-browserbase-session-id`,children:_jsx(_components.p,{children:`ID of an existing Browserbase session to resume`})}),_jsx(ParamField,{path:`modelName`,type:`string`,optional:true,id:`param-model-name`,children:_jsxs(_components.p,{children:[`Specifying the default language model to use. Format supported is `,_jsx(_components.code,{children:`{provider}/{modelName}`}),`. For a list of supported providers, see `,_jsx(_components.a,{href:`/examples/custom_llms#providers`,children:`Available Providers`}),`.`]})}),_jsx(ParamField,{path:`modelClientOptions`,type:`object`,optional:true,id:`param-model-client-options`,children:_jsxs(_components.p,{children:[`Configuration options for the language model client (i.e. `,_jsx(_components.code,{children:`apiKey`}),`)`]})}),_jsx(ParamField,{path:`enableCaching`,type:`boolean`,optional:true,id:`param-enable-caching`,children:_jsxs(_components.p,{children:[`Enables caching of LLM responses. When set to `,_jsx(_components.code,{children:`true`}),`, the LLM requests will be cached on disk and reused for identical requests. Defaults to `,_jsx(_components.code,{children:`false`})]})}),_jsx(ParamField,{path:`domSettleTimeoutMs`,type:`integer`,optional:true,id:`param-dom-settle-timeout-ms`,children:_jsxs(_components.p,{children:[`Specifies the timeout in milliseconds for waiting for the DOM to settle. Defaults to `,_jsx(_components.code,{children:`30_000`}),` (30 seconds)`]})}),_jsx(ParamField,{path:`logger`,type:`(message: LogLine) => void`,optional:true,id:`param-logger`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`message`}),` is a `,_jsx(_components.code,{children:`LogLine`}),` object. Handles log messages. Useful for custom logging implementations. For more information, see the `,_jsx(_components.a,{href:`/reference/logging`,children:`Logging`}),` page`]})}),_jsx(ParamField,{path:`disablePino`,type:`boolean`,optional:true,id:`param-disable-pino`,children:_jsxs(_components.p,{children:[`Whether Pino should be disabled for logging. This is helpful for Next.js or test environments. Pino will automatically be disabled if a custom `,_jsx(_components.code,{children:`logger`}),` is defined.`]})}),_jsxs(ParamField,{path:`verbose`,type:`integer`,optional:true,id:`param-verbose`,children:[_jsx(_components.p,{children:`Enables several levels of logging during automation:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`0`}),`: `,_jsx(_components.strong,{children:`ERROR`}),` (limited to no logging)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`1`}),`: `,_jsx(_components.strong,{children:`INFO`}),` (SDK-level logging)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`2`}),`: `,_jsx(_components.strong,{children:`DEBUG`}),` (Detailed logging and tracing)`]}),`\n`]})]}),_jsx(ParamField,{path:`llmClient`,type:`LLMClient`,optional:true,id:`param-llm-client`,children:_jsxs(_components.p,{children:[`A custom LLM client implementation that conforms to the `,_jsx(_components.a,{href:`https://github.com/arihanv/stagehand/blob/main/lib/llm/LLMClient.ts`,children:_jsx(_components.code,{children:`LLMClient`})}),` abstract class`]})}),_jsx(ParamField,{path:`systemPrompt`,type:`string`,optional:true,id:`param-system-prompt`,children:_jsx(_components.p,{children:`A custom system prompt to use for the LLM in addition to the default system prompt for act, extract, and observe methods.`})}),_jsx(ParamField,{path:`selfHeal`,type:`boolean`,optional:true,id:`param-self-heal`,children:_jsxs(_components.p,{children:[`Enables self-healing mode. When set to `,_jsx(_components.code,{children:`true`}),`, Stagehand will attempt to recover from errors (eg. outdated cached element not resolving) by retrying the last action. Defaults to `,_jsx(_components.code,{children:`true`}),`. Set to `,_jsx(_components.code,{children:`false`}),` to disable LLM inference on cache errors.`]})}),_jsxs(ResponseField,{name:`localBrowserLaunchOptions`,type:`LocalBrowserLaunchOptions`,id:`param-local-browser-launch-options`,children:[_jsx(_components.p,{children:`Provides comprehensive options for local browser instances.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`args`,type:`string[]`,id:`param-args`,children:_jsx(_components.p,{children:`Additional command-line arguments to pass to the browser.`})}),_jsx(ResponseField,{name:`chromiumSandbox`,type:`boolean`,id:`param-chromium-sandbox`,children:_jsx(_components.p,{children:`Enable or disable Chromium’s sandbox.`})}),_jsx(ResponseField,{name:`devtools`,type:`boolean`,id:`param-devtools`,children:_jsx(_components.p,{children:`Open the browser’s developer tools on launch.`})}),_jsx(ResponseField,{name:`env`,type:`Record\u003cstring, string | number | boolean>`,id:`param-env-1`,children:_jsx(_components.p,{children:`Environment variables for the browser process.`})}),_jsx(ResponseField,{name:`executablePath`,type:`string`,id:`param-executable-path`,children:_jsx(_components.p,{children:`Path to the browser executable.`})}),_jsx(ResponseField,{name:`handleSIGHUP`,type:`boolean`,id:`param-handle-sighup`,children:_jsx(_components.p,{children:`Option to handle the SIGHUP signal.`})}),_jsx(ResponseField,{name:`handleSIGINT`,type:`boolean`,id:`param-handle-sigint`,children:_jsx(_components.p,{children:`Option to handle the SIGINT signal.`})}),_jsx(ResponseField,{name:`handleSIGTERM`,type:`boolean`,id:`param-handle-sigterm`,children:_jsx(_components.p,{children:`Option to handle the SIGTERM signal.`})}),_jsx(ResponseField,{name:`headless`,type:`boolean`,id:`param-headless`,children:_jsx(_components.p,{children:`Launches the browser in headless mode.`})}),_jsx(ResponseField,{name:`ignoreDefaultArgs`,type:`boolean | string[]`,id:`param-ignore-default-args`,children:_jsx(_components.p,{children:`Ignore all default arguments or specify an array to ignore.`})}),_jsx(ResponseField,{name:`proxy`,type:`object`,id:`param-proxy`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`server`,type:`string`,id:`param-server`,children:_jsx(_components.p,{children:`Proxy server URL.`})}),_jsx(ResponseField,{name:`bypass`,type:`string`,optional:true,id:`param-bypass`,children:_jsx(_components.p,{children:`Hosts to bypass the proxy.`})}),_jsx(ResponseField,{name:`username`,type:`string`,optional:true,id:`param-username`,children:_jsx(_components.p,{children:`Username for proxy authentication.`})}),_jsx(ResponseField,{name:`password`,type:`string`,optional:true,id:`param-password`,children:_jsx(_components.p,{children:`Password for proxy authentication.`})})]})}),_jsx(ResponseField,{name:`tracesDir`,type:`string`,id:`param-traces-dir`,children:_jsx(_components.p,{children:`Directory to store trace files.`})}),_jsx(ResponseField,{name:`userDataDir`,type:`string`,id:`param-user-data-dir`,children:_jsx(_components.p,{children:`Custom user data directory.`})}),_jsx(ResponseField,{name:`acceptDownloads`,type:`boolean`,id:`param-accept-downloads`,children:_jsx(_components.p,{children:`Allow file downloads.`})}),_jsx(ResponseField,{name:`downloadsPath`,type:`string`,id:`param-downloads-path`,children:_jsx(_components.p,{children:`Directory where downloads are saved.`})}),_jsx(ResponseField,{name:`extraHTTPHeaders`,type:`Record\u003cstring, string>`,id:`param-extra-http-headers`,children:_jsx(_components.p,{children:`Additional HTTP headers to send with each request.`})}),_jsx(ResponseField,{name:`geolocation`,type:`object`,id:`param-geolocation`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`latitude`,type:`number`,id:`param-latitude`,children:_jsx(_components.p,{children:`Latitude coordinate.`})}),_jsx(ResponseField,{name:`longitude`,type:`number`,id:`param-longitude`,children:_jsx(_components.p,{children:`Longitude coordinate.`})}),_jsx(ResponseField,{name:`accuracy`,type:`number`,optional:true,id:`param-accuracy`,children:_jsx(_components.p,{children:`Accuracy of the geolocation measurement.`})})]})}),_jsx(ResponseField,{name:`hasTouch`,type:`boolean`,id:`param-has-touch`,children:_jsx(_components.p,{children:`Indicates if the device has touch capabilities.`})}),_jsx(ResponseField,{name:`ignoreHTTPSErrors`,type:`boolean`,id:`param-ignore-https-errors`,children:_jsx(_components.p,{children:`Whether to ignore HTTPS errors.`})}),_jsx(ResponseField,{name:`locale`,type:`string`,id:`param-locale`,children:_jsx(_components.p,{children:`Sets the browser’s locale.`})}),_jsx(ResponseField,{name:`permissions`,type:`string[]`,id:`param-permissions`,children:_jsx(_components.p,{children:`Array of permissions to grant (e.g., “geolocation”, “notifications”).`})}),_jsx(ResponseField,{name:`recordHar`,type:`object`,id:`param-record-har`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`path`,type:`string`,id:`param-path`,children:_jsx(_components.p,{children:`File path for the HAR.`})}),_jsx(ResponseField,{name:`mode`,type:`\"full\" | \"minimal\"`,optional:true,id:`param-mode`,children:_jsx(_components.p,{children:`Mode for HAR recording.`})}),_jsx(ResponseField,{name:`omitContent`,type:`boolean`,optional:true,id:`param-omit-content`,children:_jsx(_components.p,{children:`Whether to omit content in HAR recording.`})}),_jsx(ResponseField,{name:`content`,type:`\"omit\" | \"embed\" | \"attach\"`,optional:true,id:`param-content`,children:_jsx(_components.p,{children:`Content mode for HAR recording.`})}),_jsx(ResponseField,{name:`urlFilter`,type:`string | RegExp`,optional:true,id:`param-url-filter`,children:_jsx(_components.p,{children:`Filter for URLs to include in the HAR.`})})]})}),_jsx(ResponseField,{name:`recordVideo`,type:`object`,id:`param-record-video`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`dir`,type:`string`,id:`param-dir`,children:_jsx(_components.p,{children:`Directory to save videos.`})}),_jsx(ResponseField,{name:`size`,type:`object`,optional:true,id:`param-size`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`width`,type:`number`,id:`param-width`,children:_jsx(_components.p,{children:`Width of the recorded video.`})}),_jsx(ResponseField,{name:`height`,type:`number`,id:`param-height`,children:_jsx(_components.p,{children:`Height of the recorded video.`})})]})})]})}),_jsx(ResponseField,{name:`viewport`,type:`object`,id:`param-viewport`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`width`,type:`number`,id:`param-width-1`,children:_jsx(_components.p,{children:`Width of the viewport.`})}),_jsx(ResponseField,{name:`height`,type:`number`,id:`param-height-1`,children:_jsx(_components.p,{children:`Height of the viewport.`})})]})}),_jsx(ResponseField,{name:`deviceScaleFactor`,type:`number`,id:`param-device-scale-factor`,children:_jsx(_components.p,{children:`Device scale factor for high-DPI displays.`})}),_jsx(ResponseField,{name:`timezoneId`,type:`string`,id:`param-timezone-id`,children:_jsx(_components.p,{children:`Timezone to emulate (e.g., “America/Los_Angeles”).`})}),_jsx(ResponseField,{name:`bypassCSP`,type:`boolean`,id:`param-bypass-csp`,children:_jsx(_components.p,{children:`Whether to bypass Content Security Policy.`})}),_jsx(ResponseField,{name:`cookies`,type:`Cookie[]`,id:`param-cookies`,children:_jsx(_components.p,{children:`Array of cookies to initialize the browser session.`})}),_jsx(ResponseField,{name:`cdpUrl`,type:`string`,id:`param-cdp-url`,children:_jsx(_components.p,{children:`URL for the Chrome DevTools Protocol. Useful for connecting to a running browser instance.`})}),_jsx(ResponseField,{name:`preserveUserDataDir`,type:`boolean`,id:`param-preserve-user-data-dir`,children:_jsx(_components.p,{children:`Whether to preserve the user data directory after Stagehand is closed. This is useful for reusing local context with multiple sessions. Defaults to false.`})})]})]})]}),_jsxs(Tab,{title:`Python`,id:`python`,children:[_jsx(ParamField,{path:`env`,type:`'LOCAL' | 'BROWSERBASE'`,optional:true,id:`param-env-2`,children:_jsxs(_components.p,{children:[`Defaults to `,_jsx(_components.code,{children:`'BROWSERBASE'`})]})}),_jsx(ParamField,{path:`api_key`,type:`string`,optional:true,id:`param-api-key-1`,children:_jsxs(_components.p,{children:[`Your Browserbase API key. Defaults to `,_jsx(_components.code,{children:`BROWSERBASE_API_KEY`}),` environment variable`]})}),_jsx(ParamField,{path:`project_id`,type:`string`,optional:true,id:`param-project-id-1`,children:_jsxs(_components.p,{children:[`Your Browserbase project ID. Defaults to `,_jsx(_components.code,{children:`BROWSERBASE_PROJECT_ID`}),` environment variable`]})}),_jsx(ParamField,{path:`experimental`,type:`boolean`,optional:true,id:`param-experimental-1`,children:_jsx(_components.p,{children:`Enables access to experimental features.`})}),_jsx(ParamField,{path:`use_api`,type:`boolean`,optional:true,id:`param-use-api-1`,children:_jsxs(_components.p,{children:[`Whether to use the stagehand API. Defaults to `,_jsx(_components.code,{children:`true`}),` when `,_jsx(_components.code,{children:`env: \"BROWSERBASE\"`}),`.`]})}),_jsxs(ParamField,{path:`browserbase_session_create_params`,type:`object`,optional:true,id:`param-browserbase-session-create-params-1`,children:[_jsxs(_components.p,{children:[`Configuration options for creating new Browserbase sessions. More information on browserbaseSessionCreateParams can be found `,_jsx(_components.a,{href:`https://docs.browserbase.com/reference/api/create-a-session#body-browser-settings`,children:`here`}),`.`]}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{name:`projectId`,type:`string`,children:_jsx(_components.p,{children:`The Browserbase Project ID.`})}),_jsx(ResponseField,{name:`browserSettings`,type:`object`,id:`param-browser-settings-1`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`browserSettings.context`,type:`object`,id:`param-browser-settings-context-1`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`browserSettings.context.id`,type:`string`,id:`param-browser-settings-context-id-1`,children:_jsx(_components.p,{children:`The Context ID.`})}),_jsx(ResponseField,{name:`browserSettings.context.persist`,type:`boolean`,id:`param-browser-settings-context-persist-1`,children:_jsx(_components.p,{children:`Whether or not to persist the context after browsing. Defaults to false.`})})]})}),_jsx(ResponseField,{name:`browserSettings.extensionId`,type:`string`,id:`param-browser-settings-extension-id-1`,children:_jsxs(_components.p,{children:[`The uploaded Extension ID. See `,_jsx(_components.a,{href:`https://docs.browserbase.com/reference/api/upload-an-extension`,children:`Upload Extension`}),`.`]})}),_jsxs(ResponseField,{name:`browserSettings.fingerprint`,type:`object`,id:`param-browser-settings-fingerprint-1`,children:[_jsxs(_components.p,{children:[`See usage examples in the `,_jsx(_components.a,{href:`https://docs.browserbase.com/features/stealth-mode#fingerprinting`,children:`Stealth Mode page`}),`.`]}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`browserSettings.fingerprint.httpVersion`,type:`enum\u003cnumber>`,id:`param-browser-settings-fingerprint-http-version-1`,children:_jsxs(_components.p,{children:[`Available options: `,_jsx(_components.code,{children:`1`}),`, `,_jsx(_components.code,{children:`2`})]})}),_jsx(ResponseField,{name:`browserSettings.fingerprint.browsers`,type:`enum\u003cstring>[]`,id:`param-browser-settings-fingerprint-browsers-1`,children:_jsxs(_components.p,{children:[`Available options: `,_jsx(_components.code,{children:`chrome`}),`, `,_jsx(_components.code,{children:`edge`}),`, `,_jsx(_components.code,{children:`firefox`}),`, `,_jsx(_components.code,{children:`safari`})]})}),_jsx(ResponseField,{name:`browserSettings.fingerprint.devices`,type:`enum\u003cstring>[]`,id:`param-browser-settings-fingerprint-devices-1`,children:_jsxs(_components.p,{children:[`Available options: `,_jsx(_components.code,{children:`desktop`}),`, `,_jsx(_components.code,{children:`mobile`})]})}),_jsx(ResponseField,{name:`browserSettings.fingerprint.locales`,type:`string[]`,id:`param-browser-settings-fingerprint-locales-1`,children:_jsxs(_components.p,{children:[`Full list of locales available `,_jsx(_components.a,{href:`https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language`,children:`here`}),`.`]})}),_jsx(ResponseField,{name:`browserSettings.fingerprint.operatingSystems`,type:`enum\u003cstring>[]`,id:`param-browser-settings-fingerprint-operating-systems-1`,children:_jsxs(_components.p,{children:[`Note: `,_jsx(_components.code,{children:`operatingSystems`}),` set to `,_jsx(_components.code,{children:`ios`}),` or `,_jsx(_components.code,{children:`android`}),` requires `,_jsx(_components.code,{children:`devices`}),` to include `,_jsx(_components.code,{children:`\"mobile\"`}),`.\nAvailable options: `,_jsx(_components.code,{children:`android`}),`, `,_jsx(_components.code,{children:`ios`}),`,`,_jsx(_components.code,{children:`linux`}),`, `,_jsx(_components.code,{children:`macos`}),`, `,_jsx(_components.code,{children:`windows`})]})}),_jsx(ResponseField,{name:`browserSettings.fingerprint.screen`,type:`object`,id:`param-browser-settings-fingerprint-screen-1`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`browserSettings.fingerprint.maxHeight`,type:`integer`,id:`param-browser-settings-fingerprint-max-height-1`}),_jsx(ResponseField,{name:`browserSettings.fingerprint.maxWidth`,type:`integer`,id:`param-browser-settings-fingerprint-max-width-1`}),_jsx(ResponseField,{name:`browserSettings.fingerprint.minHeight`,type:`integer`,id:`param-browser-settings-fingerprint-min-height-1`}),_jsx(ResponseField,{name:`browserSettings.fingerprint.minWidth`,type:`integer`,id:`param-browser-settings-fingerprint-min-width-1`})]})})]})]}),_jsx(ResponseField,{name:`browserSettings.viewport`,type:`object`,id:`param-browser-settings-viewport-1`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`browserSettings.viewport.width`,type:`integer`,id:`param-browser-settings-viewport-width-1`}),_jsx(ResponseField,{name:`browserSettings.viewport.height`,type:`integer`,id:`param-browser-settings-viewport-height-1`})]})}),_jsx(ResponseField,{name:`browserSettings.blockAds`,type:`boolean`,id:`param-browser-settings-block-ads-1`,children:_jsxs(_components.p,{children:[`Enable or disable ad blocking in the browser. Defaults to `,_jsx(_components.code,{children:`false`}),`.`]})}),_jsx(ResponseField,{name:`browserSettings.solveCaptchas`,type:`boolean`,id:`param-browser-settings-solve-captchas-1`,children:_jsxs(_components.p,{children:[`Enable or disable captcha solving in the browser. Defaults to `,_jsx(_components.code,{children:`true`}),`.`]})}),_jsx(ResponseField,{name:`browserSettings.recordSession`,type:`boolean`,id:`param-browser-settings-record-session-1`,children:_jsxs(_components.p,{children:[`Enable or disable session recording. Defaults to `,_jsx(_components.code,{children:`true`}),`.`]})}),_jsx(ResponseField,{name:`browserSettings.advancedStealth`,type:`boolean`,id:`param-browser-settings-advanced-stealth-1`,children:_jsx(_components.p,{children:`Advanced Browser Stealth Mode.`})})]})}),_jsx(ResponseField,{name:`extensionId`,type:`string`,id:`param-extension-id-1`,children:_jsxs(_components.p,{children:[`The uploaded Extension ID. See `,_jsx(_components.a,{href:`https://docs.browserbase.com/reference/api/upload-an-extension`,children:`Upload Extension`}),`.`]})}),_jsx(ResponseField,{name:`keepAlive`,type:`boolean`,id:`param-keep-alive-1`,children:_jsx(_components.p,{children:`Set to true to keep the session alive even after disconnections. This is available on the Browserbase Startup plan only.`})}),_jsx(ResponseField,{name:`proxies`,type:`boolean`,id:`param-proxies-1`,children:_jsx(_components.p,{children:`Proxy configuration. Can be true for default proxy, or an array of proxy configurations.`})}),_jsx(ResponseField,{name:`region`,type:`enum\u003cstring>`,id:`param-region-1`,children:_jsxs(_components.p,{children:[`The region where the Session should run. Available options: `,_jsx(_components.code,{children:`us-west-2`}),`, `,_jsx(_components.code,{children:`us-east-1`}),`, `,_jsx(_components.code,{children:`eu-central-1`}),`, `,_jsx(_components.code,{children:`ap-southeast-1`})]})}),_jsx(ResponseField,{name:`timeout`,type:`number`,id:`param-timeout-1`,children:_jsxs(_components.p,{children:[`Duration in seconds after which the session will automatically end. Defaults to the Project’s defaultTimeout.\nRequired range: `,_jsx(_components.code,{children:`60 \u003c x \u003c 21600`})]})}),_jsxs(ResponseField,{name:`userMetadata`,type:`object`,id:`param-user-metadata-1`,children:[_jsxs(_components.p,{children:[`Arbitrary user metadata to attach to the session. For more information about user metadata, see `,_jsx(_components.a,{href:`https://docs.browserbase.com/features/sessions#user-metadata`,children:`UserMetadata`})]}),_jsx(Expandable,{title:`Properties`,children:_jsxs(_components.p,{children:[`userMetadata.`,_jsx(_components.code,{children:`{key}`}),` `,_jsx(_components.code,{children:`any`})]})})]})]})]}),_jsx(ParamField,{path:`browserbase_session_id`,type:`string`,optional:true,id:`param-browserbase-session-id-1`,children:_jsx(_components.p,{children:`ID of an existing Browserbase session to resume`})}),_jsx(ParamField,{path:`model_name`,type:`string`,optional:true,id:`param-model-name-1`,children:_jsxs(_components.p,{children:[`Specifying the default language model to use. Format supported is `,_jsx(_components.code,{children:`{provider}/{model_name}`}),`. For a list of supported providers, see `,_jsx(_components.a,{href:`/examples/custom_llms#providers`,children:`Available Providers`}),`.`]})}),_jsx(ParamField,{path:`model_client_options`,type:`object`,optional:true,id:`param-model-client-options-1`,children:_jsxs(_components.p,{children:[`Configuration options for the language model client (i.e. `,_jsx(_components.code,{children:`apiKey`}),`)`]})}),_jsx(ParamField,{path:`dom_settle_timeout_ms`,type:`integer`,optional:true,id:`param-dom-settle-timeout-ms-1`,children:_jsxs(_components.p,{children:[`Specifies the timeout in milliseconds for waiting for the DOM to settle. Defaults to `,_jsx(_components.code,{children:`30_000`}),` (30 seconds)`]})}),_jsx(ParamField,{path:`logger`,type:`Callable[[LogLine], None]`,optional:true,id:`param-logger-1`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`message`}),` is a `,_jsx(_components.code,{children:`LogLine`}),` object. Handles log messages. Useful for custom logging implementations. For more information, see the `,_jsx(_components.a,{href:`/reference/logging`,children:`Logging`}),` page`]})}),_jsxs(ParamField,{path:`verbose`,type:`integer`,optional:true,id:`param-verbose-1`,children:[_jsx(_components.p,{children:`Enables several levels of logging during automation:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`0`}),`: `,_jsx(_components.strong,{children:`ERROR`}),` (limited to no logging)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`1`}),`: `,_jsx(_components.strong,{children:`INFO`}),` (SDK-level logging)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`2`}),`: `,_jsx(_components.strong,{children:`DEBUG`}),` (Detailed logging and tracing)`]}),`\n`]})]}),_jsx(ParamField,{path:`system_prompt`,type:`string`,optional:true,id:`param-system-prompt-1`,children:_jsx(_components.p,{children:`A custom system prompt to use for the LLM in addition to the default system prompt for act, extract, and observe methods.`})}),_jsx(ParamField,{path:`self_heal`,type:`boolean`,optional:true,id:`param-self-heal-1`,children:_jsxs(_components.p,{children:[`Enables self-healing mode. When set to `,_jsx(_components.code,{children:`true`}),`, Stagehand will attempt to recover from errors (eg. outdated cached element not resolving) by retrying the last action. Defaults to `,_jsx(_components.code,{children:`true`}),`. Set to `,_jsx(_components.code,{children:`false`}),` to disable LLM inference on cache errors.`]})}),_jsx(ParamField,{path:`act_timeout_ms`,type:`integer`,optional:true,id:`param-act-timeout-ms`,children:_jsxs(_components.p,{children:[`Specifies the timeout in milliseconds for act commands. Defaults to `,_jsx(_components.code,{children:`30_000`}),` (30 seconds)`]})}),_jsx(ParamField,{path:`headless`,type:`boolean`,optional:true,id:`param-headless-1`,children:_jsx(_components.p,{children:`Launches the browser in headless mode.`})}),_jsx(ParamField,{path:`use_rich_logging`,type:`boolean`,optional:true,id:`param-use-rich-logging`,children:_jsxs(_components.p,{children:[`Whether to use Rich for colorized logging. Defaults to `,_jsx(_components.code,{children:`true`}),`.`]})}),_jsxs(ResponseField,{name:`localBrowserLaunchOptions`,type:`LocalBrowserLaunchOptions`,id:`param-local-browser-launch-options-1`,children:[_jsx(_components.p,{children:`Provides comprehensive options for local browser instances.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`args`,type:`string[]`,id:`param-args-1`,children:_jsx(_components.p,{children:`Additional command-line arguments to pass to the browser.`})}),_jsx(ResponseField,{name:`chromiumSandbox`,type:`boolean`,id:`param-chromium-sandbox-1`,children:_jsx(_components.p,{children:`Enable or disable Chromium’s sandbox.`})}),_jsx(ResponseField,{name:`devtools`,type:`boolean`,id:`param-devtools-1`,children:_jsx(_components.p,{children:`Open the browser’s developer tools on launch.`})}),_jsx(ResponseField,{name:`env`,type:`Record\u003cstring, string | number | boolean>`,id:`param-env-3`,children:_jsx(_components.p,{children:`Environment variables for the browser process.`})}),_jsx(ResponseField,{name:`executablePath`,type:`string`,id:`param-executable-path-1`,children:_jsx(_components.p,{children:`Path to the browser executable.`})}),_jsx(ResponseField,{name:`handleSIGHUP`,type:`boolean`,id:`param-handle-sighup-1`,children:_jsx(_components.p,{children:`Option to handle the SIGHUP signal.`})}),_jsx(ResponseField,{name:`handleSIGINT`,type:`boolean`,id:`param-handle-sigint-1`,children:_jsx(_components.p,{children:`Option to handle the SIGINT signal.`})}),_jsx(ResponseField,{name:`handleSIGTERM`,type:`boolean`,id:`param-handle-sigterm-1`,children:_jsx(_components.p,{children:`Option to handle the SIGTERM signal.`})}),_jsx(ResponseField,{name:`headless`,type:`boolean`,id:`param-headless-2`,children:_jsx(_components.p,{children:`Launches the browser in headless mode.`})}),_jsx(ResponseField,{name:`ignoreDefaultArgs`,type:`boolean | string[]`,id:`param-ignore-default-args-1`,children:_jsx(_components.p,{children:`Ignore all default arguments or specify an array to ignore.`})}),_jsx(ResponseField,{name:`proxy`,type:`object`,id:`param-proxy-1`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`server`,type:`string`,id:`param-server-1`,children:_jsx(_components.p,{children:`Proxy server URL.`})}),_jsx(ResponseField,{name:`bypass`,type:`string`,optional:true,id:`param-bypass-1`,children:_jsx(_components.p,{children:`Hosts to bypass the proxy.`})}),_jsx(ResponseField,{name:`username`,type:`string`,optional:true,id:`param-username-1`,children:_jsx(_components.p,{children:`Username for proxy authentication.`})}),_jsx(ResponseField,{name:`password`,type:`string`,optional:true,id:`param-password-1`,children:_jsx(_components.p,{children:`Password for proxy authentication.`})})]})}),_jsx(ResponseField,{name:`tracesDir`,type:`string`,id:`param-traces-dir-1`,children:_jsx(_components.p,{children:`Directory to store trace files.`})}),_jsx(ResponseField,{name:`userDataDir`,type:`string`,id:`param-user-data-dir-1`,children:_jsx(_components.p,{children:`Custom user data directory.`})}),_jsx(ResponseField,{name:`acceptDownloads`,type:`boolean`,id:`param-accept-downloads-1`,children:_jsx(_components.p,{children:`Allow file downloads.`})}),_jsx(ResponseField,{name:`downloadsPath`,type:`string`,id:`param-downloads-path-1`,children:_jsx(_components.p,{children:`Directory where downloads are saved.`})}),_jsx(ResponseField,{name:`extraHTTPHeaders`,type:`Record\u003cstring, string>`,id:`param-extra-http-headers-1`,children:_jsx(_components.p,{children:`Additional HTTP headers to send with each request.`})}),_jsx(ResponseField,{name:`geolocation`,type:`object`,id:`param-geolocation-1`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`latitude`,type:`number`,id:`param-latitude-1`,children:_jsx(_components.p,{children:`Latitude coordinate.`})}),_jsx(ResponseField,{name:`longitude`,type:`number`,id:`param-longitude-1`,children:_jsx(_components.p,{children:`Longitude coordinate.`})}),_jsx(ResponseField,{name:`accuracy`,type:`number`,optional:true,id:`param-accuracy-1`,children:_jsx(_components.p,{children:`Accuracy of the geolocation measurement.`})})]})}),_jsx(ResponseField,{name:`hasTouch`,type:`boolean`,id:`param-has-touch-1`,children:_jsx(_components.p,{children:`Indicates if the device has touch capabilities.`})}),_jsx(ResponseField,{name:`ignoreHTTPSErrors`,type:`boolean`,id:`param-ignore-https-errors-1`,children:_jsx(_components.p,{children:`Whether to ignore HTTPS errors.`})}),_jsx(ResponseField,{name:`locale`,type:`string`,id:`param-locale-1`,children:_jsx(_components.p,{children:`Sets the browser’s locale.`})}),_jsx(ResponseField,{name:`permissions`,type:`string[]`,id:`param-permissions-1`,children:_jsx(_components.p,{children:`Array of permissions to grant (e.g., “geolocation”, “notifications”).`})}),_jsx(ResponseField,{name:`recordHar`,type:`object`,id:`param-record-har-1`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`path`,type:`string`,id:`param-path-1`,children:_jsx(_components.p,{children:`File path for the HAR.`})}),_jsx(ResponseField,{name:`mode`,type:`\"full\" | \"minimal\"`,optional:true,id:`param-mode-1`,children:_jsx(_components.p,{children:`Mode for HAR recording.`})}),_jsx(ResponseField,{name:`omitContent`,type:`boolean`,optional:true,id:`param-omit-content-1`,children:_jsx(_components.p,{children:`Whether to omit content in HAR recording.`})}),_jsx(ResponseField,{name:`content`,type:`\"omit\" | \"embed\" | \"attach\"`,optional:true,id:`param-content-1`,children:_jsx(_components.p,{children:`Content mode for HAR recording.`})}),_jsx(ResponseField,{name:`urlFilter`,type:`string | RegExp`,optional:true,id:`param-url-filter-1`,children:_jsx(_components.p,{children:`Filter for URLs to include in the HAR.`})})]})}),_jsx(ResponseField,{name:`recordVideo`,type:`object`,id:`param-record-video-1`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`dir`,type:`string`,id:`param-dir-1`,children:_jsx(_components.p,{children:`Directory to save videos.`})}),_jsx(ResponseField,{name:`size`,type:`object`,optional:true,id:`param-size-1`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`width`,type:`number`,id:`param-width-2`,children:_jsx(_components.p,{children:`Width of the recorded video.`})}),_jsx(ResponseField,{name:`height`,type:`number`,id:`param-height-2`,children:_jsx(_components.p,{children:`Height of the recorded video.`})})]})})]})}),_jsx(ResponseField,{name:`viewport`,type:`object`,id:`param-viewport-1`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`width`,type:`number`,id:`param-width-3`,children:_jsx(_components.p,{children:`Width of the viewport.`})}),_jsx(ResponseField,{name:`height`,type:`number`,id:`param-height-3`,children:_jsx(_components.p,{children:`Height of the viewport.`})})]})}),_jsx(ResponseField,{name:`deviceScaleFactor`,type:`number`,id:`param-device-scale-factor-1`,children:_jsx(_components.p,{children:`Device scale factor for high-DPI displays.`})}),_jsx(ResponseField,{name:`timezoneId`,type:`string`,id:`param-timezone-id-1`,children:_jsx(_components.p,{children:`Timezone to emulate (e.g., “America/Los_Angeles”).`})}),_jsx(ResponseField,{name:`bypassCSP`,type:`boolean`,id:`param-bypass-csp-1`,children:_jsx(_components.p,{children:`Whether to bypass Content Security Policy.`})}),_jsx(ResponseField,{name:`cookies`,type:`Cookie[]`,id:`param-cookies-1`,children:_jsx(_components.p,{children:`Array of cookies to initialize the browser session.`})}),_jsx(ResponseField,{name:`cdpUrl`,type:`string`,id:`param-cdp-url-1`,children:_jsx(_components.p,{children:`URL for the Chrome DevTools Protocol. Useful for connecting to a running browser instance.`})}),_jsx(ResponseField,{name:`preserveUserDataDir`,type:`boolean`,id:`param-preserve-user-data-dir-1`,children:_jsx(_components.p,{children:`Whether to preserve the user data directory after Stagehand is closed. This is useful for reusing local context with multiple sessions. Defaults to false.`})})]})]})]})]}),`\n`,_jsxs(Heading,{level:`3`,id:`returns-stagehand-object`,children:[_jsx(_components.strong,{children:`Returns:`}),` Stagehand object`]}),`\n`,_jsxs(_components.p,{children:[`The constructor returns an instance of the `,_jsx(_components.code,{children:`Stagehand`}),` class configured with the specified options. However, to use Stagehand, you must still initialize it with `,_jsx(_components.a,{href:`#init`,children:_jsx(_components.code,{children:`init()`})}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`stagehand-init`,children:_jsx(_components.code,{children:`stagehand.init()`})}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` stagehand`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`init`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`1`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` stagehand.init()`})]}),`\n`]})})})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`init()`}),` asynchronously initializes the Stagehand instance. It should be called before any other methods.`]}),`\n`,_jsx(Heading,{level:`2`,id:`stagehand-close`,children:_jsx(_components.code,{children:`stagehand.close()`})}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` stagehand`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`close`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`1`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` stagehand.close()`})]}),`\n`]})})})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`close()`}),` is a cleanup method to remove the temporary files created by Stagehand. It’s recommended that you call this explicitly when you’re done with your automation.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Configuration","description":"How to configure Stagehand","icon":"gear","href":"/reference/initialization_config"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Stagehand constructor","slug":"stagehand-constructor","depth":2,"children":[{"title":"Arguments: ConstructorParams","slug":"arguments-constructorparams","depth":3,"children":[]},{"title":"Returns: Stagehand object","slug":"returns-stagehand-object","depth":3,"children":[]}]},{"title":"stagehand.init()","slug":"stagehand-init","depth":2,"children":[]},{"title":"stagehand.close()","slug":"stagehand-close","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"readme-i18n","siteName":"🤘 Stagehand","title":"Configuration - 🤘 Stagehand","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/reference/initialization_config","matchLevel":0},"zh":{"href":"/zh/reference/initialization_config","matchLevel":1}}},"lastModified":"2026-01-07T10:01:46.160Z","originalFileLocation":"reference/initialization_config.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"How to configure Stagehand\">\u003cmeta data-mint-head name=\"application-name\" content=\"🤘 Stagehand\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/readme-i18n/c_-QTtbCCpYigpiT/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/readme-i18n/c_-QTtbCCpYigpiT/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/readme-i18n/c_-QTtbCCpYigpiT/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/readme-i18n/c_-QTtbCCpYigpiT/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/readme-i18n/c_-QTtbCCpYigpiT/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/readme-i18n/c_-QTtbCCpYigpiT/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/readme-i18n/c_-QTtbCCpYigpiT/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/readme-i18n/c_-QTtbCCpYigpiT/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/readme-i18n/c_-QTtbCCpYigpiT/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Configuration - 🤘 Stagehand\">\u003cmeta data-mint-head property=\"og:description\" content=\"How to configure Stagehand\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"🤘 Stagehand\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://stagehand.readme-i18n.com/reference/initialization_config\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://readme-i18n.mintlify.app/_mintlify/api/og/v2?division=Reference\u0026amp;title=Configuration\u0026amp;description=How+to+configure+Stagehand\u0026amp;theme=ede5b11649d541544d9ac6d0\u0026amp;signature=dcf68579629626c42153896f9801c2f57f48b488cf76307f21728640935d60fb\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Configuration - 🤘 Stagehand\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"How to configure Stagehand\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://readme-i18n.mintlify.app/_mintlify/api/og/v2?division=Reference\u0026amp;title=Configuration\u0026amp;description=How+to+configure+Stagehand\u0026amp;theme=ede5b11649d541544d9ac6d0\u0026amp;signature=dcf68579629626c42153896f9801c2f57f48b488cf76307f21728640935d60fb\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/readme-i18n/c_-QTtbCCpYigpiT/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"🤘 Stagehand\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#B88100\">\u003clink data-mint-head rel=\"canonical\" href=\"https://stagehand.readme-i18n.com/reference/initialization_config\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/reference/initialization_config.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://stagehand.readme-i18n.com/reference/initialization_config\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://stagehand.readme-i18n.com/zh/reference/initialization_config\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://stagehand.readme-i18n.com/reference/initialization_config\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://stagehand.readme-i18n.com/#organization\",\"name\":\"🤘 Stagehand\",\"url\":\"https://stagehand.readme-i18n.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/readme-i18n/wcXsxm33rwhC6LZ-/logo/light_logo.png?fit=max\u0026auto=format\u0026n=wcXsxm33rwhC6LZ-\u0026q=85\u0026s=ccfd5e40372225d4bb7112bd575b54af\"}},{\"@type\":\"WebSite\",\"@id\":\"https://stagehand.readme-i18n.com#website\",\"name\":\"🤘 Stagehand\",\"url\":\"https://stagehand.readme-i18n.com\",\"publisher\":{\"@id\":\"https://stagehand.readme-i18n.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://stagehand.readme-i18n.com/reference/initialization_config#webpage\",\"url\":\"https://stagehand.readme-i18n.com/reference/initialization_config\",\"name\":\"Configuration\",\"description\":\"How to configure Stagehand\",\"dateModified\":\"2026-01-07T10:01:46.160Z\",\"isPartOf\":{\"@id\":\"https://stagehand.readme-i18n.com#website\"},\"breadcrumb\":{\"@id\":\"https://stagehand.readme-i18n.com/reference/initialization_config#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://stagehand.readme-i18n.com/reference/initialization_config#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"🤘 Stagehand\",\"item\":\"https://stagehand.readme-i18n.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Configuration\",\"item\":\"https://stagehand.readme-i18n.com/reference/initialization_config\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://stagehand.readme-i18n.com/reference/initialization_config#article\",\"headline\":\"Configuration\",\"name\":\"Configuration\",\"description\":\"How to configure Stagehand\",\"url\":\"https://stagehand.readme-i18n.com/reference/initialization_config\",\"mainEntityOfPage\":{\"@id\":\"https://stagehand.readme-i18n.com/reference/initialization_config#webpage\"},\"dateModified\":\"2026-01-07T10:01:46.160Z\",\"publisher\":{\"@id\":\"https://stagehand.readme-i18n.com/#organization\"},\"isPartOf\":{\"@id\":\"https://stagehand.readme-i18n.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"🤘 Stagehand\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"🤘 Stagehand","nav":{"global":null,"languages":[{"language":"en","groups":[{"group":"Get Started","pages":[{"title":"What is Stagehand?","icon":"hand-horns","href":"/get_started/introduction"},{"title":"Quickstart","icon":"rocket","href":"/get_started/quickstart"},{"title":"Install Stagehand","icon":"download","href":"/get_started/integrate_stagehand"}]},{"group":"Concepts","pages":[{"title":"Interact with a website","icon":"arrow-pointer","href":"/concepts/act"},{"title":"Build a web browsing agent","icon":"robot","href":"/concepts/agent"}]},{"group":"Playbooks","pages":[{"title":"Best Practices","href":"/examples/best_practices"},{"title":"Caching Actions","href":"/examples/caching"},{"title":"Telemetry and Evaluations","href":"/examples/running_evals"},{"title":"Stagehand in Next.js","href":"/examples/nextjs"},{"title":"LLM Customization","href":"/examples/custom_llms"},{"title":"Browser Customization","href":"/examples/customize_browser"},{"title":"Computer Use Agents","href":"/examples/computer_use"},{"title":"Contribute to Stagehand","description":"Best practices for making a meaningful contribution to Stagehand","href":"/examples/contributing"}]},{"group":"Reference","pages":[{"title":"Configuration","icon":"gear","href":"/reference/initialization_config"},{"title":"Agent","description":"Web AI agents for any task","icon":"robot","href":"/reference/agent"},{"title":"Act","icon":"arrow-pointer","href":"/reference/act"},{"title":"Extract","icon":"brain-circuit","href":"/reference/extract"},{"title":"Observe","icon":"lightbulb","href":"/reference/observe"},{"title":"Playwright Interoperability","icon":"right-to-bracket","href":"/reference/playwright_interop"},{"title":"TypeScript Playbook","icon":"code","href":"/integrations/guides"}]},{"group":"Integrations","pages":[{"group":"MCP Server","pages":[{"title":"Browserbase MCP Server","sidebarTitle":"Introduction","href":"/integrations/mcp/introduction"},{"title":"Browserbase MCP Server Setup","sidebarTitle":"Setup","href":"/integrations/mcp/setup"},{"title":"Browserbase MCP Server Tools","sidebarTitle":"Tools","href":"/integrations/mcp/tools"},{"title":"Browserbase MCP Server Configuration","sidebarTitle":"Configuration","href":"/integrations/mcp/configuration"}]},{"title":"Langchain JS","icon":"brain-circuit","href":"/integrations/langchain"},{"title":"CrewAI Integration","icon":"people-group","href":"/integrations/crew-ai"}]}],"global":{"anchors":[{"anchor":"Changelog","icon":"scroll","href":"https://github.com/browserbase/stagehand/releases"},{"anchor":"Reference","icon":"code","href":"https://docs.stagehand.dev/reference/introduction"}]}},{"language":"zh","pages":[{"title":"zh","href":"/zh/reference/initialization_config"}]}]},"basePath":"","title":"Configuration - 🤘 Stagehand","buildId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","deploymentId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","dynamics":[],"chunks":[]}