Skip to main content

Observe

See how to use observe() to discover actionable elements and analyze web page structure

Method Signatures

ObserveOptions Interface:

Parameters

string
Natural language description of elements or actions to discover.
AvailableModel
Override the default LLM model for this observation.
ClientOptions
Model-specific configuration options.
number
Maximum time to wait for DOM to stabilize before analysis.Default: 30000
boolean
Whether to draw visual overlays on discovered elements (debugging).Default: false
boolean
Set to true to search within iframes.Default: false

Response

Returns: Promise<ObserveResult[]> Array of discovered actionable elements, ordered by relevance. ObserveResult Interface:
string
XPath selector that precisely locates the element.
string
Human-readable description of the element and its purpose.
string
Suggested interaction method: "click", "fill", "selectOptionFromDropdown", "nextChunk", "scrollTo", "prevChunk".
string[]
Additional parameters for the suggested action.

Code Examples

Integration Patterns