#[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.
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()