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

# Loop Steps

| Parameter                   | Type                                                                                                 | Default            | Description                                                                                                                             |
| --------------------------- | ---------------------------------------------------------------------------------------------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------- |
| `steps`                     | `WorkflowSteps`                                                                                      | Required           | Steps to execute in each loop iteration                                                                                                 |
| `name`                      | `Optional[str]`                                                                                      | `None`             | Name of the loop step                                                                                                                   |
| `description`               | `Optional[str]`                                                                                      | `None`             | Description of the loop step                                                                                                            |
| `max_iterations`            | `int`                                                                                                | `3`                | Maximum number of iterations for the loop                                                                                               |
| `forward_iteration_output`  | `bool`                                                                                               | `True`             | If True, each iteration receives the previous iteration's output as input. If False, all iterations receive the original loop input     |
| `end_condition`             | `Optional[Union[Callable[[List[StepOutput]], bool], Callable[[List[StepOutput]], Awaitable[bool]]]]` | `None`             | Function to evaluate if the loop should end                                                                                             |
| `human_review`              | `Optional[HumanReview]`                                                                              | `None`             | All HITL settings in a single config. See [HumanReview Config](/workflows/hitl/human-review).                                           |
| `requires_confirmation`     | `bool`                                                                                               | `False`            | Pause for user confirmation before starting the loop                                                                                    |
| `confirmation_message`      | `Optional[str]`                                                                                      | `None`             | Message shown to user when requesting confirmation                                                                                      |
| `requires_iteration_review` | `bool`                                                                                               | `False`            | Pause after each iteration so the user can review and approve, edit, or reject. See [Loop HITL](/workflows/hitl/loop#iteration-review). |
| `iteration_review_message`  | `Optional[str]`                                                                                      | `None`             | Message shown to user during iteration review                                                                                           |
| `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: `approve`, `reject`, `cancel`                                                                     |
| `on_reject`                 | `OnReject`                                                                                           | `OnReject.skip`    | Action when rejected: `skip`, `cancel`, `retry`                                                                                         |
