#[non_exhaustive]pub enum AgentError {
Show 15 variants
Model(ModelError),
Tool(ToolError),
Retrieval(RetrievalError),
Budget(BudgetExceeded),
Gateway(GatewayError),
Journal(JournalError),
Checkpoint(CheckpointError),
Effect(EffectExecutorError),
AmbiguousCheckpoint {
turn: u32,
},
InvalidConfig(String),
Protocol(String),
MaxTurns {
max_turns: u32,
},
ToolRequirementUnsatisfied {
required: u32,
successful: u32,
},
ToolRequirementExceedsBudget {
required: u32,
remaining: u64,
},
ToolOutputNotVisible {
tool: String,
},
}Expand description
Failure of an agent run.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Model(ModelError)
Model invocation failed.
Tool(ToolError)
Tool execution failed.
Retrieval(RetrievalError)
Static or dynamic context retrieval failed.
Budget(BudgetExceeded)
A shared run-tree budget was exceeded.
Gateway(GatewayError)
Agent delegation failed.
Journal(JournalError)
Structured event recording failed.
Checkpoint(CheckpointError)
Checkpoint persistence or validation failed.
Effect(EffectExecutorError)
Write-ahead effect coordination failed.
AmbiguousCheckpoint
Recovery would silently retry a possibly partial external turn.
InvalidConfig(String)
Agent configuration is invalid.
Protocol(String)
Model output violated the agent-loop protocol.
MaxTurns
The configured local turn bound was reached.
ToolRequirementUnsatisfied
The model terminated before the successful local Tool-call minimum.
Fields
ToolRequirementExceedsBudget
The remaining shared Tool-call budget cannot satisfy the local minimum.
Fields
ToolOutputNotVisible
A tool produced output that policy forbids exposing to the model.
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<AgentError> for AgentPromptError
impl From<AgentError> for AgentPromptError
Source§fn from(source: AgentError) -> Self
fn from(source: AgentError) -> Self
Converts to this type from the input type.
Source§impl From<AgentError> for StructuredAgentError
impl From<AgentError> for StructuredAgentError
Source§fn from(source: AgentError) -> Self
fn from(source: AgentError) -> Self
Converts to this type from the input type.
Source§impl From<BudgetExceeded> for AgentError
impl From<BudgetExceeded> for AgentError
Source§fn from(source: BudgetExceeded) -> Self
fn from(source: BudgetExceeded) -> Self
Converts to this type from the input type.
Source§impl From<CheckpointError> for AgentError
impl From<CheckpointError> for AgentError
Source§fn from(source: CheckpointError) -> Self
fn from(source: CheckpointError) -> Self
Converts to this type from the input type.
Source§impl From<EffectExecutorError> for AgentError
impl From<EffectExecutorError> for AgentError
Source§fn from(source: EffectExecutorError) -> Self
fn from(source: EffectExecutorError) -> Self
Converts to this type from the input type.
Source§impl From<GatewayError> for AgentError
impl From<GatewayError> for AgentError
Source§fn from(source: GatewayError) -> Self
fn from(source: GatewayError) -> Self
Converts to this type from the input type.
Source§impl From<JournalError> for AgentError
impl From<JournalError> for AgentError
Source§fn from(source: JournalError) -> Self
fn from(source: JournalError) -> 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<RetrievalError> for AgentError
impl From<RetrievalError> for AgentError
Source§fn from(source: RetrievalError) -> Self
fn from(source: RetrievalError) -> 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