Loop & Enhance

Automatic detect-fix-rerun cycles around a workflow; let Cerevisor improve your workflow between rounds.

Loop & Enhance wraps a workflow run in a detect-fix-rerun cycle. After each round, the harness analyzes what failed, an LLM planner proposes edits to your workflow, those edits apply, and the next round runs. The result: workflows that improve themselves between rounds, converging on a working version. License gate: Trial+/Paid only. When to use it Your workflow mostly works but has reliability issues you can't pin down. You want the harness to evolve the workflow toward something more robust. You're iterating on the shape of a workflow, not just its output. When not to use it: For a workflow that already produces good output reliably: Loop & Enhance is overhead without payoff. For one-shot tasks where the cost of multiple rounds isn't justified. Enabling it First time: Settings → Automation → Loop & Enhance → Setup opens the Loop & Enhance Setup Modal with the key knobs: Field Default Effect Max rounds 3 Hard cap on cycles. Budget cap (USD) $5.00 Total cost across all rounds, including planner LLM calls. Convergence mode strict strict = stop only when no failures detected. lenient = also accept convergence when the only remaining failures are intentional skips or fallback outputs. Pause between rounds Off If on, the run pauses after each round and asks you to approve continuation. Planner provider Chat builder's Provider for the per-round planner LLM. Planner model Inherits Specific model. After setup, toggle Loop & Enhance on per workflow in Settings → Workflow → Loop & Enhance . How it works You click Run. The workflow runs round 1 , same as a normal run. At end-of-round, the harness builds a structured FailureReport : which agents failed, what their output looked like, what the verifier said, what the user feedback was. The harness checks the report: did anything fail? If no: convergence; stop. If yes: the planner LLM reads the FailureReport and proposes a list of workflow operations ( add agent , set instructions , add skill , etc.) using the same op schema as the chat builder. The orchestrator emits the proposed ops to the renderer. The renderer applies them via the standard applyWorkflowOp code path (same as chat-builder edits) and sends an ACK back with the edited workflow. Round 2 runs against the edited workflow. Loop until convergence, max rounds, or budget cap. Safety rails Multiple guards prevent runaway: Hard maxRounds cap : set per workflow. Run never exceeds. Cumulative budget cap : covers workflow execution + planner LLM cost. Run halts when reached. Stuck detection : if two consecutive rounds produce the same FailureReport fingerprint, the FSM emits a loop_fixation_warning orchestrator event (consumed by the Situational Awareness pillar to flip the run's state label to fixation-risk ) and optionally aborts. The planner isn't making progress; we stop. Op allowlist : the planner can only emit a limited set of ops. It can't delete the workflow, change the provider, or do anything truly destructive. The allow

Back to docs