BrowserTrace: local trace viewer for failed Stagehand runs #2102
aaronlab
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I built BrowserTrace, a small MIT-licensed local trace viewer for failed AI browser-agent runs, and it includes a lightweight Stagehand wrapper.
Why I am sharing it here: when a Stagehand script fails, the useful debugging context is often split across browser state,
act/extract/observecalls, model output, screenshots, URLs, and the final exception. BrowserTrace records those calls as a local timeline so the failed step is easier to inspect.Minimal shape:
The wrapper keeps Stagehand optional and records high-level calls such as
goto,act,extract,observe, andclickwhen those methods exist on the wrapped page. BrowserTrace keeps traces local by default and can export a standalone public-safe HTML trace that omits prompts/model I/O, screenshots, and URLs.Quick no-API trial path from PyPI:
Persistent install from PyPI:
pip install "browsertrace[ui]"Repo: https://github.com/aaronlab/browsertrace
PyPI: https://pypi.org/project/browsertrace/
Stagehand guide: https://aaronlab.github.io/browsertrace/stagehand-debugging.html
Feedback I am looking for from Stagehand users: when a run fails, which artifacts matter most:
observeoutput, selected elements, extracted text, agent state, action retries, screenshots, model output, task prompt, or something else?No star/upvote ask; I am trying to make the Stagehand failure report useful before expanding the adapter.
All reactions