Skip to content

Integration request: deeper Stagehand adapter #8

@aaronlab

Description

@aaronlab

BrowserTrace has a lightweight Stagehand page wrapper today, plus a no-network example in examples/stagehand_wrapper_example.py. The next useful step is a deeper adapter shaped by real Stagehand failure cases.

Guide:
https://aaronlab.github.io/browsertrace/stagehand-debugging.html

Current support:

  • browsertrace.integrations.stagehand.wrap_stagehand wraps Stagehand-style page calls.
  • Records goto, act, extract, observe, and click as BrowserTrace steps.
  • Captures URL, screenshot when available, action name, method args/kwargs, status, and errors.
  • Keeps Stagehand optional, not part of the base install.

For public sharing, use:

browsertrace export <run_id> --public -o public.html

--public omits prompt/model I/O, screenshots, and URLs from the standalone HTML export.

Feedback wanted from Stagehand users:

  • Which Stagehand failure was hardest to debug?
  • Should BrowserTrace capture observe output, selected elements, extracted text, agent state, action retries, screenshots, or model output?
  • Which Stagehand hooks are stable enough to wrap without a hard dependency?
  • Would a portable HTML export be enough to share a failed Stagehand run, or do you need hosted links?

A good first PR should keep Stagehand optional, include tests with fake Stagehand-shaped objects, and avoid network/API-key requirements.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is neededintegrationBrowser Use, Stagehand, Playwright, or agent-framework integration

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions