New260+ blocks and 240+ tools are now fully documented
DocumentationReferenceTool IntegrationsWeb Scraping & Browsers
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

PropertyValue
Typestagehand_agent
CategoryTool — Web Scraping
AuthModel provider API key + Browserbase server config

Configuration

SettingTypeDescription
Start URLShort inputFirst URL to open
TaskLong inputGoal/instructions for the autonomous run
ProviderDropdownLLM provider (anthropic, openai, google)
ModelDropdownAgent model name
Agent ModeDropdownhybrid, dom, or cua mode
Max StepsSliderMax number of steps before stop
Use Web SearchSwitchEnables agent web search capabilities
System Prompt (Optional)Long inputExtra system-level guidance
Exclude Tools (Optional)Short inputComma-separated internal tool names to disable
VariablesTableSecret/variable placeholders (e.g. %username%)
Model Provider API KeyPasswordAPI key for the selected provider
Browserbase API Key (Optional)PasswordPer-run override for Browserbase API key
Browserbase Project ID (Optional)Short inputPer-run override for Browserbase project
Output SchemaJSON schemaOptional 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

FieldTypeDescription
agentResultjsonFinal success/completion/message/actions payload
structuredOutputjsonParsed JSON output matching the schema (if available)
secureActionsjson[]Executed secure directive results
configjsonEffective 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:

KeyValue
usernamemy.user@example.com
passwordmy-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 Steps bounded to avoid wandering behavior on dynamic sites.
  • Use Output Schema whenever downstream blocks need deterministic JSON fields.
  • Start with hybrid mode, then switch to dom or cua for site-specific reliability tuning.