run_until_async
AsyncMethod
This is a method of the Agent class in the agent module.Async version of run_until(). Run agent iteratively until output meets quality criteria.
Signature
Parameters
str
required
The prompt to send to the agent
str
required
Evaluation criteria for the Judge
float
default:"8.0"
Score threshold for success (default: 8.0)
int
default:"5"
Maximum iterations before stopping (default: 5)
str
default:"'optimize'"
“optimize” (stop on success) or “review” (run all iterations)
Optional
Optional callback called after each iteration
bool
default:"False"
Enable verbose logging
Returns
'EvaluationLoopResult'
EvaluationLoopResult with iteration history and final score
Uses
EvaluationLooploop.run_async
Source
View on GitHub
praisonaiagents/agent/agent.py at line 4879
