Adding Kernel to existing Stagehand implementations
If you already have a Stagehand implementation, you can easily switch to using Kernel’s cloud browsers by updating your browser configuration.1. Install the Kernel SDK
2. Initialize Kernel and create a browser
Import the libraries and create a cloud browser session:3. Update your browser configuration
Replace your existing browser setup to use Kernel’s CDP URL:4. Use your Stagehand automation
Use Stagehand’s page methods with the Kernel-powered browser:Quick setup with our Stagehand example app
Alternatively, you can use our Kernel app template that includes a pre-configured Stagehand integration:TypeScript
as the programming language and then select Stagehand
as the template.
Then follow the Quickstart guide to deploy and run your Stagehand automation on Kernel’s infrastructure.
Benefits of using Kernel with Stagehand
- No local browser management: Run automations without installing or maintaining browsers locally
- Scalability: Launch multiple browser sessions in parallel
- Stealth mode: Built-in anti-detection features for web scraping
- Session persistence: Maintain browser state across automation runs
- Live view: Debug your automations with real-time browser viewing
Next steps
- Check out live view for debugging your automations
- Learn about stealth mode for avoiding detection
- Learn how to properly terminate browser sessions
- Learn how to deploy your Stagehand app to Kernel