pub enum AgentError {
Show 13 variants
Model(ModelError),
Capability(String),
Cancelled {
reason: String,
},
CapabilityOrder(CapabilityOrderError),
StructuredOutput(String),
DynamicInstruction(String),
OutputRetryLimitExceeded {
retries: usize,
},
ToolRetryLimitExceeded {
tool: String,
max_retries: usize,
},
StepLimitExceeded {
steps: usize,
},
UsageLimit(UsageLimitError),
ExecutionSuspended {
node: AgentExecutionNode,
reason: String,
},
Executor(AgentExecutorError),
ToolCallsRequireTools,
}Expand description
Bare agent runtime error.
Variants§
Model(ModelError)
Model adapter failed.
Capability(String)
Capability hook failed.
Cancelled
Runtime execution was cancelled cooperatively.
CapabilityOrder(CapabilityOrderError)
Capability ordering failed.
StructuredOutput(String)
Structured output parsing failed.
DynamicInstruction(String)
Dynamic instruction generation failed.
OutputRetryLimitExceeded
Output retry budget was exceeded.
ToolRetryLimitExceeded
Tool retry budget was exceeded.
StepLimitExceeded
Maximum step count was exceeded.
UsageLimit(UsageLimitError)
Usage limit was exceeded.
ExecutionSuspended
Execution was suspended at a durable checkpoint.
Executor(AgentExecutorError)
Durable executor failed.
ToolCallsRequireTools
Model returned tool calls before tool execution exists in this bare runtime.
Trait Implementations§
Source§impl Debug for AgentError
impl Debug for AgentError
Source§impl Display for AgentError
impl Display for AgentError
Source§impl Error for AgentError
impl Error for AgentError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<AgentExecutorError> for AgentError
impl From<AgentExecutorError> for AgentError
Source§fn from(source: AgentExecutorError) -> Self
fn from(source: AgentExecutorError) -> Self
Converts to this type from the input type.
Source§impl From<CapabilityOrderError> for AgentError
impl From<CapabilityOrderError> for AgentError
Source§fn from(source: CapabilityOrderError) -> Self
fn from(source: CapabilityOrderError) -> Self
Converts to this type from the input type.
Source§impl From<ModelError> for AgentError
impl From<ModelError> for AgentError
Source§fn from(source: ModelError) -> Self
fn from(source: ModelError) -> Self
Converts to this type from the input type.
Source§impl From<UsageLimitError> for AgentError
impl From<UsageLimitError> for AgentError
Source§fn from(source: UsageLimitError) -> Self
fn from(source: UsageLimitError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AgentError
impl RefUnwindSafe for AgentError
impl Send for AgentError
impl Sync for AgentError
impl Unpin for AgentError
impl UnsafeUnpin for AgentError
impl UnwindSafe for AgentError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more