⚙Tool
Stagehand Agent
Autonomous browser agent for complex multi-step web tasks with model and mode control
The Stagehand Agent is an autonomous browser automation agent built on Stagehand. Unlike the standard Stagehand tool (single actions), this block plans and executes multi-step tasks across pages, forms, and flows.
Overview
| Property | Value |
|---|---|
| Type | stagehand_agent |
| Category | Tool — Web Scraping |
| Auth | Model provider API key + Browserbase server config |
Configuration
| Setting | Type | Description |
|---|---|---|
| Start URL | Short input | First URL to open |
| Task | Long input | Goal/instructions for the autonomous run |
| Provider | Dropdown | LLM provider (anthropic, openai, google) |
| Model | Dropdown | Agent model name |
| Agent Mode | Dropdown | hybrid, dom, or cua mode |
| Max Steps | Slider | Max number of steps before stop |
| Use Web Search | Switch | Enables agent web search capabilities |
| System Prompt (Optional) | Long input | Extra system-level guidance |
| Exclude Tools (Optional) | Short input | Comma-separated internal tool names to disable |
| Variables | Table | Secret/variable placeholders (e.g. %username%) |
| Model Provider API Key | Password | API key for the selected provider |
| Browserbase API Key (Optional) | Password | Per-run override for Browserbase API key |
| Browserbase Project ID (Optional) | Short input | Per-run override for Browserbase project |
| Output Schema | JSON schema | Optional strict structured output target |
Behavior Notes
- The agent preserves legacy secure placeholder handling, including
%variable%substitution and[[ACTION:...]]secure directives. - When credentials are provided in variables, the runtime can attempt direct login before handing off to the autonomous agent loop.
- If advanced agent options are rejected by the runtime, Zelaxy automatically falls back to a compatibility config to avoid hard failures.
Outputs
| Field | Type | Description |
|---|---|---|
agentResult | json | Final success/completion/message/actions payload |
structuredOutput | json | Parsed JSON output matching the schema (if available) |
secureActions | json[] | Executed secure directive results |
config | json | Effective provider/model/mode/search settings used |
Example: Price Comparison
Workflow:
[Starter: Product name] -> [Stagehand Agent] -> [Response]Task: Search for "{{starter.input}}" on Amazon and Best Buy. Extract the product name, price, rating, and availability from the first result on each site.
The agent autonomously navigates both sites and can return structured comparison JSON when Output Schema is provided.
Example: Secure Login + Extraction
Use Variables for secrets:
| Key | Value |
|---|---|
username | my.user@example.com |
password | my-secret-password |
Task example:
Log in to the portal, open the billing page, and return invoice id, amount, and due date.
If needed, execute [[ACTION:type %password% into the password field and submit]].Tips
- Use high-level goals, but include explicit success criteria for more reliable completion.
- Keep
Max Stepsbounded to avoid wandering behavior on dynamic sites. - Use
Output Schemawhenever downstream blocks need deterministic JSON fields. - Start with
hybridmode, then switch todomorcuafor site-specific reliability tuning.