---
updatedAt: 2026-09-01T16:18:38.000Z
---

Fetch the complete documentation index at: https://developers.wabbit.gg/llms.txt. Use this file to discover all available pages before exploring further. Append .md to any documentation page URL to get its markdown version.

# Loop

# Loop

Repeat a set of steps while a condition holds, up to a maximum number of iterations

## Fields

| Field           | Type           | Required | Description                                                                 |
| --------------- | -------------- | -------- | --------------------------------------------------------------------------- |
| `while`         | condition tree | yes      | Re-evaluated before each iteration; if false at entry, the body never runs. |
| `maxIterations` | integer, 1-50  | yes      | Hard cap enforced by both validation and the run engine.                    |
| `body`          | array of steps | yes      | Steps run each iteration.                                                   |

## Example

```json
{
  "id": "01H8XGJVBWX7Y5Z3K9M2N4P6Q1",
  "type": "loop",
  "while": {
    "op": "<",
    "a": {
      "path": "vars.run.i"
    },
    "b": {
      "literal": 5
    }
  },
  "maxIterations": 10,
  "body": []
}
```