Skip to main content
For interactions too complex or unpredictable for static automations, use AI agents that autonomously navigate and interact based on goals.

When to Use

Use Agentic ForUse Static Actions For
Unpredictable UI layoutsKnown, stable elements
Complex navigation pathsSimple click/type actions
Handling popups/modalsPerformance-critical paths
Sites with frequent changesCost-sensitive automations
CAPTCHAs and verificationDeterministic workflows

AgenticTask

Use agentic_task when AI should autonomously accomplish a goal:
{
  "interaction_action": {
    "agentic_task": {
      "task": "Navigate to settings and enable two-factor authentication",
      "max_steps": 15,
      "backend": "browser_use",
      "use_vision": false,
      "keep_alive": true
    }
  }
}

Properties

PropertyTypeDefaultDescription
taskstrRequiredNatural language goal description
max_stepsintRequiredMaximum actions the agent can take
backend"browser_use" | "browserbase"RequiredAgent backend
use_visionboolFalseInclude screenshots for agent
keep_aliveboolTrueKeep browser session after task

max_steps Guidelines

Task ComplexitySuggested max_steps
Simple (1-2 clicks)3-5
Medium (navigate + fill form)10-15
Complex (multi-page workflow)20-30
Higher max_steps means longer execution time and higher LLM costs.

Writing Good Task Descriptions

Good:
{"task": "Click 'Account Settings' in the sidebar, scroll down, click 'Security'"}
{"task": "1. Close any popups 2. Click search 3. Search 'laptop' 4. Click first result"}
Poor:
{"task": "Do the thing"}
{"task": "Complete the form"}

Vision Mode

Enable use_vision for visual elements without good text labels:
{
  "agentic_task": {
    "task": "Click on the red 'Sale' banner",
    "max_steps": 5,
    "use_vision": true
  }
}
Use Vision ForAvoid Vision For
Image-based navigationText-based navigation
Visual verificationSpeed-critical tasks
Elements without ARIA labelsCost minimization

CloseOverlayPopup

Specialized action for dismissing popups, modals, and overlays:
{
  "interaction_action": {
    "close_overlay_popup": {
      "max_steps": 5
    }
  }
}

Default Behavior

PropertyDefault
taskComprehensive popup dismissal prompt
max_steps5
use_visionTrue
keep_aliveTrue

What It Handles

  • Cookie consent banners
  • Privacy policy notices
  • Newsletter signup prompts
  • Age verification gates
  • Promotional popups
  • Blocking overlays

Variables in Agentic Tasks

Use parameter substitution in task descriptions:
{
  "agentic_task": {
    "task": "Search for '{search_query[0]}' and filter to items under ${price_max[0]}",
    "max_steps": 10
  }
}

Combining with Static Actions

Best pattern: use static actions for predictable steps, agentic for uncertainty:
[
  {
    "type": "action_node",
    "interaction_action": {
      "input_text": {
        "command": "get_by_label(\"Email\")",
        "input_text": "{email[0]}"
      }
    }
  },
  {
    "type": "action_node",
    "interaction_action": {
      "click_element": {
        "command": "get_by_role(\"button\", name=\"Sign In\")"
      }
    }
  },
  {
    "type": "action_node",
    "interaction_action": {
      "agentic_task": {
        "task": "Navigate to Reports and find the Monthly Summary",
        "max_steps": 10
      }
    }
  },
  {
    "type": "action_node",
    "interaction_action": {
      "click_element": {
        "command": "get_by_role(\"button\", name=\"Download\")",
        "expect_download": true
      }
    }
  }
]

Best Practices

PracticeRecommendation
Start with staticUse agentic only where needed
Keep tasks focusedBreak complex goals into smaller tasks
Start low on max_stepsIncrease if agent can’t complete
Review execution logsRefine task descriptions based on results
Use vision selectivelyOnly when visual context is necessary