AgentsError
Base class for all errors thrown by the library.
Extends
Section titled “Extends”Error
Extended by
Section titled “Extended by”GuardrailExecutionError
InputGuardrailTripwireTriggered
MaxTurnsExceededError
ModelBehaviorError
OutputGuardrailTripwireTriggered
ToolCallError
UserError
SystemError
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AgentsError(message, state?): AgentsError
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
|
|
|
Returns
Section titled “Returns”AgentsError
Overrides
Section titled “Overrides”Error.constructor
Properties
Section titled “Properties”message
Section titled “message”message: string;
Inherited from
Section titled “Inherited from”Error.message
name: string;
Inherited from
Section titled “Inherited from”Error.name
stack?
Section titled “stack?”optional stack: string;
Inherited from
Section titled “Inherited from”Error.stack
state?
Section titled “state?”optional state: RunState<any, Agent<any, any>>;
prepareStackTrace()?
Section titled “prepareStackTrace()?”static optional prepareStackTrace: (err, stackTraces) => any;
Optional override for formatting stack traces
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
|
|
|
|
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”Error.prepareStackTrace
stackTraceLimit
Section titled “stackTraceLimit”static stackTraceLimit: number;
Inherited from
Section titled “Inherited from”Error.stackTraceLimit
Methods
Section titled “Methods”captureStackTrace()
Section titled “captureStackTrace()”static captureStackTrace(targetObject, constructorOpt?): void
Create .stack property on a target object
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
|
|
|
|
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Error.captureStackTrace