Integrations
Observability for Stagehand
Overview
Stagehand is an AI-native framework for building browser agents in JavaScript.
Stagehand is designed to be a seamless extension of Playwright, and in particular, its Page API.
Thanks to Laminar’s native integration with Playwright, you can trace your Stagehand agents with ease.
Usage
1
Initialize Laminar
First, we need to initialize Laminar and pass the Stagehand module to instrumentModules
.
2
Using Stagehand
You can now use the Stagehand API as usual.
3
Finalizing Stagehand traces
In order to finalize Stagehand traces, make sure to call stagehand.close()
and Laminar.flush()
,
especially if you are using Laminar and Stagehand in standalone scripts or edge runtimes.
Example result
An example trace for page.act('go to Laminar blogs page')