TerminateActionException

Exception thrown to immediately terminate the current action only.

When thrown from an action or tool, this exception terminates the current action's tool loop but allows the agent to continue with the next planned action.

Use this for immediate action termination. For graceful termination that waits for natural checkpoints, use com.embabel.agent.api.termination.terminateAction.

Example usage:

@Action
fun processStep(context: ActionContext): String {
if (shouldSkip()) {
throw TerminateActionException("Skipping: condition met")
}
// ... normal processing
}

Parameters

reason

Human-readable explanation for termination

Constructors

Link copied to clipboard
constructor(reason: String)

Properties

Link copied to clipboard
open val cause: Throwable?
Link copied to clipboard
open val message: String?
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard