Install dependencies
- TypeScript
- Python
- Go
Configure environment
Set your Browserbase API key. When no model is configured, Model Gateway selects one automatically, so no model provider key is required:Stagehand does not read environment variables on your behalf, and it does not auto-load env files.This also applies to API routing: pass non-production Browserbase and Stagehand API URLs explicitly rather than setting
BROWSERBASE_BASE_URL or STAGEHAND_API_URL. See API endpoint overrides.- TypeScript
- Python
- Go
Use in your codebase
Add Stagehand where you need browser automation.- TypeScript
- Python
- Go
Next steps
Configuration
Browser sources, Browserbase vs local, logging, timeouts, LLM customization
Act
Perform precise actions with natural language
Extract
Typed data extraction with schemas
Observe
Discover elements and suggested actions

