Stagehand icon

Stagehand

Control browser using Stagehand with AI automation

Act

AI-generated

Summary

Execute natural language instructions as actions on a web page using AI-powered browser automation via the Stagehand engine.

Inputs

  • AI Provider (required) — Select the AI provider for executing instructions. Options include OpenAI, Anthropic (Claude), Google (Gemini), Cerebras, and OpenRouter.
  • Instruction (required) — The natural language instruction describing the action for Stagehand to perform on the page.
  • Advanced Options — Optional parameters to customize the AI model, caching behavior, logging, timeouts, resource blocking, and action pacing. Includes selection of specific AI model variants, caching enablement, verbose logging levels, max timeouts for DOM settling and action execution, and whether to block heavy resources like images to speed loading.

Output shape

a single JSON object containing the operation name ("act"), the resulting action output, and optionally Stagehand log messages if enabled.

If the browser session is not initialized or the page URL is not set, the node attempts to reconnect to the last navigated URL before executing the action. Logs and errors are included optionally based on input parameters. The operation requires prior initialization of a browser session (e.g., via the Navigate operation). Errors during execution are captured within the node's output.

Examples

Example 1: Perform a click action on the current page using OpenAI GPT-4o model

AI Provider set to OpenAI, Instruction set to "Click the submit button", Model Name left at default; caching enabled; no verbose logs.

Example 2: Use Anthropic AI to fill a form using a detailed instruction

AI Provider set to Anthropic, Instruction set to the user-provided form filling steps, Model Name using default Anthropic model; caching and logging options customized as needed.

Discussion