Object EarlyTerminationPolicy.Companion

    • Constructor Detail

    • Method Detail

      • maxActions

         final static EarlyTerminationPolicy maxActions(Integer maxActions)

        Creates a policy that terminates the process after a maximum number of actions.

        Parameters:
        maxActions - The maximum number of actions allowed
        Returns:

        An EarlyTerminationPolicy that enforces the action limit

      • firstOf

         final static EarlyTerminationPolicy firstOf(EarlyTerminationPolicy earlyTerminationPolicies)

        Combines multiple early termination policies into one. The process will terminate if any of the provided policies triggers termination. Policies are evaluated in the order they are provided.

        Parameters:
        earlyTerminationPolicies - The policies to combine
        Returns:

        A combined EarlyTerminationPolicy

      • hardBudgetLimit

         final static EarlyTerminationPolicy hardBudgetLimit(Double budget)

        Fallback budget limit for the agent process. This is a last resort termination policy to prevent runaway costs.

        Parameters:
        budget - The maximum cost allowed for the process in dollars
        Returns:

        An EarlyTerminationPolicy that enforces the budget limit