> ## Documentation Index
> Fetch the complete documentation index at: https://phidatainc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Step

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

| Parameter                 | Type                                          | Default            | Description                                                                                                                                |
| ------------------------- | --------------------------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `name`                    | `Optional[str]`                               | `None`             | Name of the step for identification                                                                                                        |
| `agent`                   | `Optional[Agent]`                             | `None`             | Agent to execute for this step                                                                                                             |
| `team`                    | `Optional[Team]`                              | `None`             | Team to execute for this step                                                                                                              |
| `executor`                | `Optional[StepExecutor]`                      | `None`             | Custom function to execute for this step                                                                                                   |
| `workflow`                | `Optional[Workflow]`                          | `None`             | Nested workflow to execute for this step                                                                                                   |
| `step_id`                 | `Optional[str]`                               | `None`             | Unique identifier for the step (auto-generated if not provided)                                                                            |
| `description`             | `Optional[str]`                               | `None`             | Description of the step's purpose                                                                                                          |
| `max_retries`             | `int`                                         | `3`                | Maximum number of retry attempts on failure                                                                                                |
| `skip_on_failure`         | `bool`                                        | `False`            | Whether to skip this step if it fails after all retries                                                                                    |
| `strict_input_validation` | `bool`                                        | `False`            | If True, fail on missing step inputs. If False, only log a warning                                                                         |
| `add_workflow_history`    | `Optional[bool]`                              | `None`             | If True, add the workflow history to the step. `None` inherits the workflow-level `add_workflow_history_to_steps` setting                  |
| `num_history_runs`        | `int`                                         | `3`                | Number of previous runs to include when workflow history is added to the step                                                              |
| `human_review`            | `Optional[HumanReview]`                       | `None`             | All HITL settings in a single config. Equivalent to passing the flat fields below. See [HumanReview Config](/workflows/hitl/human-review). |
| `requires_confirmation`   | `bool`                                        | `False`            | Pause for user confirmation before execution                                                                                               |
| `confirmation_message`    | `Optional[str]`                               | `None`             | Message shown to user when requesting confirmation                                                                                         |
| `requires_user_input`     | `bool`                                        | `False`            | Pause to collect user input before execution                                                                                               |
| `user_input_message`      | `Optional[str]`                               | `None`             | Message shown to user when requesting input                                                                                                |
| `user_input_schema`       | `Optional[List[Union[Dict, UserInputField]]]` | `None`             | Schema defining expected input fields, as dicts or `UserInputField` objects                                                                |
| `requires_output_review`  | `Union[bool, Callable[[StepOutput], bool]]`   | `False`            | Pause after execution to review the step's output. See [Output Review](/workflows/hitl/output-review).                                     |
| `output_review_message`   | `Optional[str]`                               | `None`             | Message shown to user during output review                                                                                                 |
| `hitl_max_retries`        | `int`                                         | `3`                | Max re-executions when an output review is rejected with `OnReject.retry`                                                                  |
| `hitl_timeout`            | `Optional[int]`                               | `None`             | Seconds before the HITL pause auto-resolves. See [Timeout](/workflows/hitl/timeout).                                                       |
| `on_timeout`              | `Union[OnTimeout, str]`                       | `OnTimeout.cancel` | Action when the HITL timeout expires: `cancel`, `skip`, `approve`                                                                          |
| `on_reject`               | `Union[OnReject, str]`                        | `OnReject.skip`    | Action when rejected: `skip`, `cancel`, `retry`                                                                                            |
| `on_error`                | `Union[OnError, str]`                         | `OnError.skip`     | Action on error: `fail`, `skip`, `pause`                                                                                                   |

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](/workflows/hitl/executor).
