AgentFlow and repeat.
Quick Start
How It Works
The evaluator-optimiser pattern suits content generation, code refinement, and any task where quality improves with structured feedback.Best Practices
Write clear evaluation criteria
Write clear evaluation criteria
Tell the evaluator exactly what APPROVED means — tone, length, format, or test coverage — so the loop converges quickly.
Cap iterations with max_iterations
Cap iterations with max_iterations
Set
max_iterations on repeat() to avoid runaway loops when the evaluator never approves.Keep generator instructions feedback-aware
Keep generator instructions feedback-aware
Instruct the generator to incorporate evaluator feedback explicitly on each pass.
Use verbose mode while tuning
Use verbose mode while tuning
Enable verbose output on agents while calibrating criteria, then disable for production runs.
Related
Dynamic Judge
Score outputs against custom rubrics
Workflows
Compose multi-step agent workflows with AgentFlow

