#[non_exhaustive]pub enum AgentError {
Show 17 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,
},
EmptyTerminalResponse {
attempts: u32,
},
StructuredOutputUnsatisfied {
attempts: u32,
kind: StructuredOutputErrorKind,
line: Option<usize>,
column: Option<usize>,
},
ToolOutputNotVisible {
tool: String,
},
}Expand description
Failure of an agent run.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
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
EmptyTerminalResponse
The provider exhausted bounded repairs without producing usable content.
StructuredOutputUnsatisfied
The provider exhausted bounded repairs without satisfying the Rust type.
Fields
kind: StructuredOutputErrorKindStable local structured-output failure category.
ToolOutputNotVisible
A tool produced output that policy forbids exposing to the model.
Implementations§
Source§impl AgentError
impl AgentError
Sourcepub fn run_error_kind(&self) -> RunErrorKind
pub fn run_error_kind(&self) -> RunErrorKind
Returns the stable run-level failure category for business policy.
Sourcepub fn retry_safety(&self) -> RetrySafety
pub fn retry_safety(&self) -> RetrySafety
Returns whether retrying this failed Agent run is known to be safe.
Sourcepub fn to_run_error(&self) -> RunError
pub fn to_run_error(&self) -> RunError
Normalizes this failure into the public run-level policy contract.
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()