Skip to main content
Agents support conditional logic that lets the workflow take different paths based on data or page state during execution.

Conditional Branches

The Conditional Branch instruction evaluates a condition and follows one of two paths:
  • TRUE path — Instructions to execute when the condition is met
  • FALSE path — Instructions to execute when the condition is not met
Conditions can check:
  • Whether an element exists on the page
  • The value of a variable
  • The current URL
  • The result of a JavaScript expression
Branches can be nested — a TRUE path can contain another conditional branch, allowing complex decision trees.

States

States are named checkpoints within an agent workflow. Each state has: States allow the agent to:
  • Resume from a known point — If an execution is interrupted, it can restart from the last reached state
  • Branch based on current state — Different instructions can execute depending on which state the agent is in

Loop Over Data

The Loop Over Data instruction iterates over a data array, executing a set of child instructions for each item. This is useful for processing multiple records — for example, filling out a form for each candidate in a list.