EarlyTerminationPolicy

Enables early termination of an agent process.

Early termination policies provide a mechanism to stop agent processes before they naturally complete. This is useful for enforcing constraints like maximum number of actions, budget limits, or other custom termination conditions.

Implementations should be stateless and thread-safe.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open val name: String

The name of this policy, used for logging and debugging. By default, uses the simple class name.

Functions

Link copied to clipboard
abstract fun shouldTerminate(agentProcess: AgentProcess): EarlyTermination?

Checks if the agent process should be terminated early.