Stagehand

Stagehand combines explicit browser code with model-assisted actions and extraction. Start with browse for an existing coding agent, use the SDK for an application you maintain, or connect hosted MCP when local browser setup is unsuitable.

Inspect a changing portal interaction

Separate stable navigation from changing controls before investing in an SDK implementation. The first deliverable is a version-matched implementation proposal, not an automatically tested application.

Test portal URL, fixed navigation, changing action, expected state, installed version, and SDK language; specify that no form may be submitted.

Copy the request into a new Floatboat conversation and provide the required material.

Download Floatboat

Your request for Floatboat

Preview and copy the request. It is not sent automatically from this page.

Reference: Stagehand
https://github.com/browserbase/stagehand

Read the original documentation and check the current environment and dependencies. Propose any new installation or tool connection before proceeding.

My task:
Use Stagehand browse to inspect the approved test portal. Identify fixed navigation and the changing action, capture the resulting state, and propose a version-matched SDK flow. Do not submit the form.

Expected deliverable:
A version-matched SDK implementation proposal with observed page states and unresolved assumptions.

About Stagehand

Stagehand is Browserbase’s browser automation project. The SDK combines ordinary navigation with language-driven act and extract operations. This lets application code keep a stable URL or control flow explicit while using a model where page wording or structure needs interpretation. Structured extraction is useful when downstream code expects named fields rather than a prose summary.

For coding agents, the current README recommends the browse CLI and official browse Skill. Its local mode controls installed Chrome or Chromium without a Browserbase account or LLM key. This is not a claim that SDK AI calls are keyless. Hosted Browserbase MCP is another route: it exposes browser tools through a service account without installing a local browser.

Browse sessions retain their browser target and mode. A named session makes repeated commands refer to the same work, while distinct sessions separate independent jobs; an existing BROWSE_SESSION setting already selects one. Floatboat can follow the external-agent CLI or MCP path documented for Cursor and Codex. The source is MIT; hosted browser access, plan-specific options, and model usage have separate conditions.

Keep Code, Interpretation, and Session State Distinct

A stable navigation step, a changing button label, and a typed extraction result do not need the same mechanism. Stagehand gives them different entry points; browse adds a command interface for a host that already supplies the reasoning.

  • Deterministic and interpreted steps

    Keep known routes in browser code and use SDK act when a page instruction needs interpretation. A changed label need not force the entire workflow into an autonomous loop.

  • Extraction with an output shape

    SDK extract can target a declared structure, such as product name, price, and availability. A valid object still needs a check that values came from the intended product and region.

  • Named browse sessions

    Keep open, snapshot, click, and text reads on one session. Local, remote, and headed modes are chosen when that session starts, not changed silently by later commands.

Stagehand Tasks from Exploration to Maintained Code

Use browse to discover a page, the SDK to preserve a repeatable application workflow, and hosted MCP when infrastructure belongs outside the coding environment. The task’s future owner matters as much as whether one browser action succeeds.

Check a changed local filter

Provide a development URL and a filter that should return a known number of rows. Open it in a local named session, inspect the current ref, apply the filter, and read the changed text. Deliver the selected option and row count; a stale ref is a reason to take another snapshot, not a reason to change the assertion.

Extract fields for application code

For a public catalogue, declare fields such as name, displayedPrice, and availability in the SDK extraction structure. Decide how the application represents absent prices and unsupported variants. Compare several returned records with the source before connecting the object to a pricing report.

Maintain a mostly stable portal routine

For a recurring test-account task, keep the destination URL and known navigation in code. Isolate the step that depends on a changing label or layout into an interpreted action. Record the failing step and page state so a maintainer can adjust that part without rewriting the whole routine.

Move browser execution out of CI

If a coding environment has no Chrome installation, choose a documented remote browse session or hosted MCP with Browserbase credentials. Use a public page first and record its service session identity. Cloud execution will not reach a private localhost service merely because the local command could reach it.

Prepare a Local Browse Check

The walkthrough below uses an installed CLI, local Chrome, and a supplied test URL. SDK AI calls and hosted sessions are alternative paths with their own configuration; do not add their credentials to an otherwise local page check.

  • CLI and browser

    The official Skill documents npm install -g browse, followed by browse --help and browse skills install. Local mode needs Chrome or Chromium on the machine.

  • A single session target

    Use an existing BROWSE_SESSION if supplied by the host; otherwise choose a name for the task. A running session keeps its mode, so stop it before deliberately changing that mode.

  • Expected test data

    Provide the test URL, exact filter option or control label, and expected result. Remote sessions require Browserbase authentication and access to the target site.

Verify a Filter in a Named Browse Session

This local sequence uses commands from the official browse Skill. Replace the test URL and control reference with the supplied page and its current snapshot values; retain one session target through the observation and cleanup steps.

  1. Open the test page locally

    Run browse open <test-url> --session filter-check --local unless the host has already set BROWSE_SESSION; in that case omit --session and use its target. Read browse status for that same session. If Chrome is missing, fix the local prerequisite or deliberately choose an authenticated remote path.

  2. Read the filter’s current reference

    Run browse snapshot for the selected session and find the supplied label. The output contains refs such as @0-5; these are examples of shape, not stable IDs. Choose the ref actually returned for the filter and inspect its current value before changing it.

  3. Apply one change and inspect the result

    Use browse click or browse fill as appropriate for the control, keeping the same session. Take a new snapshot after the page changes and read browse get text body or a narrower relevant target. Compare the selected option and displayed records with the expected result.

  4. Report the discrepancy and close the session

    Return the URL, option, observed rows, and any page error. If an action failed, refresh the snapshot before reusing a ref; repeated identical initialization failures call for browse doctor --json. Finish with browse stop for the selected session when the browser is no longer needed.

Related Software Projects

Compare the workflows, operating requirements, and source licenses of these projects.

Stagehand FAQ

Does local browse call a separate model?
The documented local CLI browser mode needs neither an LLM key nor a Browserbase account; the calling agent supplies reasoning. SDK language-driven methods and hosted services have separate model or account requirements.
When should I use the SDK instead?
Choose the SDK when application code must own the sequence, extraction structure, error handling, and repeated execution. Use browse for a host-driven investigation; an exploratory command history is not automatically a maintained application.
Why did a local command try remote authentication?
The Skill notes that configured Browserbase credentials can affect the default target. Use an explicit --local or --remote choice and inspect session status. Avoid changing keys or retrying a remote request when the task was intended for local Chrome.
Can I switch a running session to headed mode?
The session retains its starting mode. Stop that session or deliberately select another one before changing local/remote or headed settings. Reusing a session name does not override its existing runtime.
Do SDK examples from different major versions mix?
Check initialization, method signatures, and the extraction structure against the installed major. The project has multiple documentation generations; a v3 snippet working elsewhere does not establish that it matches your package.
How should Floatboat choose among CLI and hosted MCP?
Use browse when the host can execute commands and the desired local or remote browser is prepared. Use the documented hosted MCP route when tools should arrive through an authenticated service. Both are integration choices, not a claim of bundled service access or local testing.