#[non_exhaustive]pub enum AgentRuntimeError {
Memory(String),
Graph(String),
Orchestration(String),
AgentLoop(String),
NotConfigured(&'static str),
CircuitOpen {
service: String,
},
BackpressureShed {
depth: usize,
capacity: usize,
},
DeduplicationConflict {
key: String,
},
Provider(String),
Persistence(String),
Validation {
field: String,
code: String,
message: String,
},
}Expand description
Unified error type returned by all public agent-runtime APIs.
Marked #[non_exhaustive] so that adding new variants in future minor
releases does not break external match arms.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Memory(String)
A memory subsystem operation failed (episodic, semantic, or working memory).
Graph(String)
A graph subsystem operation failed (entity/relationship management or traversal).
Orchestration(String)
The orchestration pipeline or one of its stages failed.
AgentLoop(String)
The ReAct agent loop encountered an unrecoverable error.
NotConfigured(&'static str)
The runtime was used before a required subsystem was configured.
CircuitOpen
Circuit breaker is open — fast-fail without attempting the operation.
BackpressureShed
Backpressure threshold exceeded — caller must shed or wait.
Fields
DeduplicationConflict
A deduplication key collision was detected.
Provider(String)
An LLM provider call failed.
Persistence(String)
A persistence operation failed.
Validation
A tool argument validation failed.
Implementations§
Source§impl AgentRuntimeError
impl AgentRuntimeError
Sourcepub fn is_circuit_open(&self) -> bool
pub fn is_circuit_open(&self) -> bool
Return true if this is a CircuitOpen error.
Sourcepub fn is_backpressure(&self) -> bool
pub fn is_backpressure(&self) -> bool
Return true if this is a BackpressureShed error.
Sourcepub fn is_provider(&self) -> bool
pub fn is_provider(&self) -> bool
Return true if this is a Provider error.
Sourcepub fn is_validation(&self) -> bool
pub fn is_validation(&self) -> bool
Return true if this is a Validation error.
Sourcepub fn is_agent_loop(&self) -> bool
pub fn is_agent_loop(&self) -> bool
Return true if this is an AgentLoop error.
Sourcepub fn is_orchestration(&self) -> bool
pub fn is_orchestration(&self) -> bool
Return true if this is an Orchestration error.
Sourcepub fn is_persistence(&self) -> bool
pub fn is_persistence(&self) -> bool
Return true if this is a Persistence error.
Sourcepub fn is_not_configured(&self) -> bool
pub fn is_not_configured(&self) -> bool
Return true if this is a NotConfigured error.
Sourcepub fn is_deduplication_conflict(&self) -> bool
pub fn is_deduplication_conflict(&self) -> bool
Return true if this is a DeduplicationConflict error.
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Return true if this error is likely transient and safe to retry.
Provider and Persistence errors (e.g. network timeouts, I/O failures)
are classified as retryable. Logic errors (Memory, Graph,
Orchestration, AgentLoop, NotConfigured, Validation,
CircuitOpen, BackpressureShed, DeduplicationConflict) are not.
Sourcepub fn message(&self) -> String
pub fn message(&self) -> String
Extract the primary message string from this error.
For simple string-carrying variants (Memory, Graph, Orchestration,
AgentLoop, Provider, Persistence) this returns the inner String.
For structured variants the Display representation is returned so
callers always get a non-empty, human-readable string.
Trait Implementations§
Source§impl Debug for AgentRuntimeError
impl Debug for AgentRuntimeError
Source§impl Display for AgentRuntimeError
impl Display for AgentRuntimeError
Source§impl Error for AgentRuntimeError
impl Error for AgentRuntimeError
1.30.0 · 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()
Source§impl From<AgentError> for AgentRuntimeError
impl From<AgentError> for AgentRuntimeError
Source§fn from(e: AgentError) -> Self
fn from(e: AgentError) -> Self
Source§impl From<Box<dyn Error + Send + Sync>> for AgentRuntimeError
impl From<Box<dyn Error + Send + Sync>> for AgentRuntimeError
Source§fn from(e: Box<dyn Error + Send + Sync>) -> Self
fn from(e: Box<dyn Error + Send + Sync>) -> Self
Convert any boxed Send + Sync error into an AgentRuntimeError::AgentLoop.
This is a catch-all conversion that lets library users propagate arbitrary
errors through ? in tool handlers and inference closures without having to
manually map each error type. The error message is preserved verbatim.