Overview
Stagehand is an AI-powered browser automation framework with methods likeobserve(), extract(), and act().
This guide walks you through deploying and running a Stagehand project on Intuned. You’ll build a sample scraper that extracts book data—without writing Playwright selectors or custom parsing logic. The same patterns apply to any automation you build with the framework.
This guide assumes you have a basic understanding of Intuned projects. If you’re new to Intuned, start with the getting started guide.
When to use AI automation
Intuned supports AI-powered browser automation frameworks like Stagehand, Browser Use, and others. Use AI automation when:- Pages are dynamic — Elements change position, structure, or content unpredictably
- You don’t know the exact page structure — Scraping sites you haven’t mapped in detail
- You want natural language control — Describe what to do instead of writing precise selectors
- Traditional Playwright code is too brittle for your case — AI agents adapt to minor UI changes automatically
Guide
Let’s build agetBooks API with AI. The template handles all the Stagehand setup for you.
You can develop with Stagehand in two ways:
- Online IDE — Zero setup. Write, test, and deploy directly from your browser.
- CLI — Use your favorite IDE with full version control.
- Online IDE
- CLI
1
Create a project
- Go to Intuned dashboard
- Select + New Project > Templates > Stagehand
- Select your language (Python or TypeScript)
- Name it and select Create Project

2
Explore the project
The template includes a book scraper API that combines Playwright with AI agents.Project structure:The automation code:
- TypeScript
- Python
Python
What this does: Navigates to https://books.toscrape.com, optionally uses an AI agent to navigate to a specific category, then extracts all book details with type-safe schemas (Pydantic for Python, Zod for TypeScript).
3
Run your automation
Run the book scraper to test your setup.
- In the Online IDE, select the API from the dropdown
- Select Select Parameter and enter
{"category": "Travel"} - Select Start Run

4
Deploy and test
Deploy your automation to Intuned’s infrastructure.

- In the Online IDE, select Deploy in the top-right corner
- After deployment completes, go to the project’s Runs page
- Select Start Run, then choose your API
- Enter parameters:
{"category": "Travel"}and select Start Run

- After the run completes, view the extracted results

How it works
- Stagehand connects to Intuned’s managed browser using CDP via the
setupContexthook.
- The Stagehand instance is stored in
attemptStorefor your API to access - Your API accepts parameters (like
category) that can vary for each run - The automation combines Playwright with Stagehand’s AI-based methods