Class Evaluator

Object
akka.javasdk.evaluation.Evaluator

public abstract class Evaluator extends Object
An Evaluator is a stateless component that evaluates agent interactions.

An Evaluator is bound to one or more agents through configuration under akka.javasdk.evaluation.evaluators, keyed by the evaluator's component id. The runtime invokes evaluate(EvaluationContext) for each interaction of a bound agent, passing an EvaluationContext that identifies the interaction to evaluate. The handler returns an Evaluator.Effect describing the outcome: the recorded evaluation or an inconclusive result. An exception thrown from the handler records a failed evaluation.

Blocking calls made from evaluate(EvaluationContext) run on virtual threads. For an evaluation that runs in several steps and must survive restarts, extend DurableEvaluator instead.

Concrete class must be annotated with Component.