Class DurableEvaluator<S>

Object
akka.javasdk.evaluation.DurableEvaluator<S>
Type Parameters:
S - The type of the state accumulated across the steps of this evaluation.

public abstract class DurableEvaluator<S> extends Object
A DurableEvaluator is a stateful component that evaluates agent interactions in multiple steps, with durable execution across those steps.

Use a DurableEvaluator instead of an Evaluator when the evaluation is long-running or needs durable, multi-step execution, for example composed evaluations that accumulate state across several judge calls, or evaluations that wait on human review. Each evaluation runs as its own durable instance: if it is stopped for any reason, it resumes from the last completed step.

Like an Evaluator, a DurableEvaluator is bound to one or more agents through configuration under akka.javasdk.evaluation.evaluators, keyed by the evaluator's component id. The runtime invokes onEvaluation(EvaluationContext) for each interaction of a bound agent. The evaluation then progresses through steps, methods returning DurableEvaluator.Effect, until it finishes with DurableEvaluator.Effect.Builder.complete(akka.javasdk.evaluation.Evaluation) or DurableEvaluator.Effect.Builder.inconclusive(java.lang.String), which records the outcome and cleans up the instance. There is no other way to finish: every evaluation terminates with a recorded outcome, including step failures that exhaust their retries.

Concrete class must be annotated with Component.

  • Constructor Details

    • DurableEvaluator

      public DurableEvaluator()
  • Method Details