LoopEvaluator Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides the abstract base class for the component that decides, after each agent iteration, whether a LoopAgent should re-invoke the wrapped agent and what feedback to provide.
public abstract class LoopEvaluator
type LoopEvaluator = class
Public MustInherit Class LoopEvaluator
- Inheritance
-
LoopEvaluator
- Derived
Remarks
A LoopEvaluator is pure judgment: it inspects the LoopContext and returns a LoopEvaluation describing whether to continue and any feedback for the next iteration. It does not manage the session or construct the next input messages — that is the responsibility of the LoopAgent that consumes it.
Out-of-the-box implementations include AIJudgeLoopEvaluator, DelegateLoopEvaluator, CompletionMarkerLoopEvaluator, and TodoCompletionLoopEvaluator. Implementations should be stateless and safe to share across concurrent loop runs; any per-run state must be stored on the supplied LoopContext.
Constructors
| Name | Description |
|---|---|
| LoopEvaluator() | |
Methods
| Name | Description |
|---|---|
| EvaluateAsync(LoopContext, CancellationToken) |
Evaluates the loop state after an iteration and decides whether to re-invoke the wrapped agent and what feedback to provide. |