The problem
How it works
Stagehand’s README walks through a script that signs in to a web app and reads a table of invoices. It launches a local browser with a profile folder so cookies persist between runs, uses observe to find the email and password fields and fills them from environment variables in code, so the credentials never reach the model, then uses act to click sign in and open the billing page. extract takes an instruction and a Zod or Pydantic schema and returns typed data. The same SDK exists for TypeScript, Python and Go, works with a model key of your choice, and can run on Browserbase’s hosted browsers with caching of repeated actions.
Results and limitations
This is the project README with example code and no reported results, so it is marked planned.
Before you try it
The persistent profile folder holds a signed-in session, so protect it like a password. Only automate sites whose terms allow it, and use an account you own. The README says act and extract adapt when a page changes, but check extracted rows against the page, and add your own checks before using numbers such as amounts. Each natural-language step calls a model, so costs grow with every run unless you cache. Results depend on your setup and were not independently reproduced by Top 200 Repos.
Tools and repositories
No ranked repository is involved. This use case still stands on its own source.
- Tools
- Stagehand · Node.js, Python or Go · A model API key
- Prerequisites
- A model API key, and optionally a Browserbase account for hosted browsers.
Try it yourself: Plan a sign-in-and-extract script
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
Write a Stagehand script in [Language] that opens [Site] with a persistent profile folder, signs in only if needed (fill the fields from the environment variables [Credential variables] in code, never in a prompt), goes to [Page to open], and extracts [Fields per row] for every row into a schema. Save the rows to [Output file] and stop with a clear error if the page layout does not match.Run it on your own account and compare the first export with the website by hand.
Sources
- browserbase/stagehand (opens in a new tab)
Project documentation · github.com · Undated · Source checked 12 Nov 2026, 18:03 UTC
What this source supports
- Stagehand is an SDK for browser agents in TypeScript, Python and Go with Playwright-style methods
- Example signs in with a persistent browser profile, fills credentials found by observe() from code so they never reach the model, then act() and extract()
- extract() returns schema-validated data from a Zod or Pydantic schema
- act, observe and extract refresh how an action happens when the site changes
- Can run on Browserbase with server-side caching of repeated actions; a hosted MCP server is also offered