AIAgentError

Represents an error encountered by an AI agent, encapsulating error details such as the message, stack trace, and an optional cause.

This class provides essential information to understand and debug errors occurring during the execution of AI agent strategies, tools, or nodes.

Instances of this class can be created directly from a Throwable.

Constructors

Link copied to clipboard
constructor(throwable: Throwable)

Secondary constructor that allows creating an instance of the class using a Throwable.

Properties

Link copied to clipboard
val cause: String? = null

The stack trace of the root cause if available, or null if no cause is set. This helps trace back the chain of exceptions leading to the current error.

Link copied to clipboard

A human-readable description of the error. Defaults to "Unknown error" if not provided by the originating throwable.

Link copied to clipboard

The stack trace of the error as a string, providing a detailed representation of where the error occurred.