AI agent instructions
AI agent instructions
Setup
SetNOTTE_API_KEY and ANTHROPIC_API_KEY in your environment.
- Python 3.11+: install
notte-sdkandstagehand==4.2.1. - TypeScript, Node.js 22.18+: install
notte-sdk,@browserbasehq/stagehand@4.2.1, andzod.
Connect and extract
Pass the session’s CDP URL to Stagehand. This example opens a page and extracts its heading into a typed schema. Both SDKs close their connections before the Notte session stops.stagehand.act() and stagehand.observe() on the connected browser.
Use your own model provider key; a Browserbase account is not required.
This integration targets Stagehand 4.2.1. Browserbase-managed services and
experimental callback batches are not supported.