StagehandOptions
Index
Properties
browserbase_api_key
API key for authenticating with Browserbase when env='BROWSERBASE'. If not provided, read from
the BROWSERBASE_API_KEY environment variable.
dom_settle_timeout_ms
Maximum time to wait for the DOM to settle before performing an action, in milliseconds.
env
Execution environment. 'LOCAL' - Stagehand runs a local Chromium browser. 'BROWSERBASE' - Stagehand uses a Browserbase cloud browser session.
local_ready_timeout_s
Maximum time to wait for the local Stagehand browser to be ready, in seconds.
model
The AI model to use for page operations.
model_api_key
API key for the AI model provider (e.g. OpenAI, Anthropic). Must be provided explicitly - unlike Browserbase credentials
project_id
Browserbase project ID, required when env='BROWSERBASE'. If not provided, read from
the BROWSERBASE_PROJECT_ID environment variable.
self_heal
When True, Stagehand automatically retries failed actions.
system_prompt
Optional system prompt to guide the AI's behavior in sessions.
verbose
Verbosity level for logging Stagehand session activity. 0 - quiet 1 - normal 2 - debug
Configuration options for Stagehand AI-powered browser automation.
Controls the execution environment (local or Browserbase cloud), the AI model used for page operations, and session-level behaviour such as self-healing and DOM settling.