stagehand.observe

View as Markdown

stagehand.observe is a browser runtime capability in the stagehand namespace.

Availability

  • Runtime: browser
  • Kind: agent
  • Category: agents
  • Supported drivers: Stagehand

SDK Surface

  • SDK path: runtime.stagehand.observe
  • Async: Yes

HTTP Surface

  • Transport: workspace.execute(...)
  • Call: stagehand.observe
  • Long-running: No

Reference Semantics

  • Requires refs: page

Arguments

ArgumentTypeRequiredDescription
instructionstringYesObservation prompt.
optionsobjectNoStagehand observation options.

Result

  • Type: unknown
  • Description: Stagehand observation result.

SDK Example

1await runtime.stagehand.observe('Export the latest invoices');

HTTP Example

1{
2 "runtime": "crm",
3 "steps": [
4 {
5 "call": "stagehand.observe",
6 "args": [
7 "Export the latest invoices"
8 ]
9 }
10 ]
11}