break
Leaves the innermost loop when the value is true.
Value
| Value | Type | Default | Description |
|---|---|---|---|
| the command's value | dynamic string | Breaks out of the innermost loop when the value is true. Only allowed inside 'for' and 'while'. |
Example
"for": {
"iter": "{ candidates }",
"loopVar": "cand",
"do": {
"var": { "match": "{ cand }" },
"break": "{ cand['score'] > 0.9 }"
}
}Rules
- The value is evaluated as a boolean. A literal
"{ True }"always breaks. breakis allowed only inside afororwhileblock, including inside anifwithin the loop. Anywhere else the agent fails validation.- Only the innermost loop is left.

