witnora

Stagehand Tripwire Run

This directory contains the real public-agent evidence adapter for Stagehand (v3, LOCAL env).

The adapter connects Stagehand to Tripwire’s controlled Chromium instance via CDP, then asks its tool-based agent to complete the local refund form across clean and adversarial browser scenarios.

Install

Dependencies are local to this directory. Do not commit API keys.

cd examples/real-agents/stagehand
npm install

Set your model key in the current shell:

$env:OPENAI_API_KEY = "<your key>"

Optional model override (AI SDK provider/model format):

$env:WITNORA_STAGEHAND_MODEL = "openai/gpt-4.1-mini"

Run

From the repository root:

npm run tripwire:lab-stagehand

Tripwire writes:

Limits

This is one public agent, one local task, one model/provider, and deterministic localhost pages. It is not a claim that Stagehand is unsafe. It is a reproducible slice showing how browser agents behave when the page fights back.