Step

Constructor parameters for the workflow Step class, including retry and HITL options.

ParameterTypeDefaultDescription
nameOptional[str]NoneName of the step for identification
agentOptional[Agent]NoneAgent to execute for this step
teamOptional[Team]NoneTeam to execute for this step
executorOptional[StepExecutor]NoneCustom function to execute for this step
workflowOptional[Workflow]NoneNested workflow to execute for this step
step_idOptional[str]NoneUnique identifier for the step (auto-generated if not provided)
descriptionOptional[str]NoneDescription of the step's purpose
max_retriesint3Maximum number of retry attempts on failure
skip_on_failureboolFalseWhether to skip this step if it fails after all retries
strict_input_validationboolFalseIf True, fail on missing step inputs. If False, only log a warning
add_workflow_historyOptional[bool]NoneIf True, add the workflow history to the step. None inherits the workflow-level add_workflow_history_to_steps setting
num_history_runsint3Number of previous runs to include when workflow history is added to the step
human_reviewOptional[HumanReview]NoneAll HITL settings in a single config. See HumanReview Config.

When the step's agent or team calls a tool decorated with @tool(requires_confirmation=True), requires_user_input=True, or external_execution=True, the workflow pauses with pause_kind="executor". See Executor HITL.

HumanReview configuration

Pass these settings inside human_review=HumanReview(...). They are not direct constructor arguments. See HumanReview for the complete configuration and supported combinations.

ParameterTypeDefaultDescription
requires_confirmationboolFalsePause for user confirmation before execution
confirmation_messageOptional[str]NoneMessage shown to user when requesting confirmation
requires_user_inputboolFalsePause to collect user input before execution
user_input_messageOptional[str]NoneMessage shown to user when requesting input
user_input_schemaOptional[List[Union[Dict, UserInputField]]]NoneSchema defining expected input fields, as dicts or UserInputField objects
requires_output_reviewUnion[bool, Callable[[StepOutput], bool]]FalsePause after execution to review the step's output. See Output Review.
output_review_messageOptional[str]NoneMessage shown to user during output review
max_retriesint3Max re-executions when an output review is rejected with OnReject.retry
timeoutOptional[int]NoneSeconds before the HITL pause auto-resolves. See Timeout.
on_timeoutUnion[OnTimeout, str]OnTimeout.cancelAction when the HITL timeout expires: cancel, skip, approve
on_rejectUnion[OnReject, str]OnReject.skipAction when rejected: skip, cancel, retry
on_errorUnion[OnError, str]OnError.skipAction on error: fail, skip, pause

Constructor example (install agno first):

from agno.workflow.step import Step
from agno.workflow.types import HumanReview, StepInput, StepOutput

def prepare(step_input: StepInput) -> StepOutput:
    return StepOutput(content=step_input.input)

step = Step(name="prepare", executor=prepare, human_review=HumanReview(requires_confirmation=True))

Step.max_retries controls execution retries; HumanReview.max_retries controls review-triggered re-executions. They are separate settings.