TerminateAgentException

Exception thrown to immediately terminate the entire agent process.

When thrown from a tool, this exception propagates through the tool loop and action executor, causing the agent process to terminate immediately.

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

Example usage:

@LlmTool(description = "Stops the agent when critical error detected")
fun criticalStop(reason: String): String {
throw TerminateAgentException("Critical error: $reason")
}

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