Documentation Index
Fetch the complete documentation index at: https://mintlify.com/browserbase/stagehand/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Theexecute() method runs an autonomous agent to complete multi-step tasks. The agent can navigate, interact with elements, extract data, and make decisions to achieve the specified goal.
This method is available on agent instances created with stagehand.agent().
Syntax
- Creating agents
- Configuration options
- Streaming mode
- Callbacks
- Examples
Quick Reference
Basic Usage
With Options
Streaming
Key Parameters
Natural language description of the task
Maximum steps before stopping (default: 100)
Variables for form filling (requires
experimental: true)Zod schema for structured output
Signal to abort execution