Retry loop
Use this when an agent can fail and a second try, told what went wrong, may succeed.
# yaml-language-server: $schema=https://re-cinq.github.io/floor/schemas/pipeline.schema.jsonline: id: retry-loop entry: attempt exit: done start: on: - task.requested args: task: "{task}" args: task: kind: value subject: true nodes: - id: attempt station: solve-task - id: done edges: - from: attempt to: done on: success - from: attempt to: attempt on: failed iteration_max: 3stations: solve-task: description: An agent solves the task, and is told what went wrong on a retry. kind: agent agent_definition: task-solver outcomes: - success - failed result_required: true needs: - name: task kind: value produces: - name: answer kind: file path: answer.md---model: claude-sonnet-5-5image: ${AGENT_IMAGE}timeout_minutes: 10---Solve this task and write the answer into {answer_path}: {task}
The last attempt failed with this error. On a first attempt it is not filled in:
{previous_error}
End your reply with LORE_NODE_RESULT: success on its own line, or LORE_NODE_RESULT: failed if you could not solve it.How it works
Section titled “How it works”- The edge
attempttoattemptonfailedsends a failed visit back to the same node. iteration_max: 3lets a run take that edge three times.- A retry visit is given
{previous_error}in the prompt. On the first visit it stays as written. - When the run needs the edge a fourth time, it ends with the outcome
iteration_max. It does not go to a fail node.
A limit a person restarts
Section titled “A limit a person restarts”unattended_max counts only since a person last acted.
edges: - from: review to: escalate on: changes_requested unattended_max: 1The run takes this edge once after each report of a human station. A second take with no person in between ends it as iteration_max.
See The next node and Prompt placeholders.