Skip to main content

Module resilience

Module resilience 

Source
Expand description

Resilience layer (RFC-029) — failure classification and recovery coordination.

§Layers

  • [classify] — maps a provider error to a FailureClass.
  • budgetAttemptBudget, bounds total retries.
  • coordinatorRecoveryCoordinator, the OTP-style recovery ladder (L1 backoff → L2 model swap → terminal).

§Honest limitation

The typed oxi_ai::ProviderError is stringified at the oxi-agent boundary. Downcasting across that boundary is not possible today, so classify uses Display-string heuristics. See [classify] for the pattern list and its caveats.

Re-exports§

pub use budget::AttemptBudget;
pub use classify::classify;
pub use coordinator::RecoveryCoordinator;
pub use coordinator::ResilienceConfig;
pub use error::AgentRunError;
pub use health::BreakerConfig;
pub use health::ProviderHealthRegistry;

Modules§

budget
Attempt budget — bounds total directive executions across the recovery ladder (RFC-029 §3.4, D7).
classify
Failure classification heuristics (RFC-029 §3.3).
coordinator
Recovery coordinator (RFC-029 §3.4) — drives the OTP-style recovery policy on top of the Unix lifecycle.
error
Agent run error — carries the provider error AND the agent’s exported conversation state so the recovery coordinator can snapshot→restore rather than re-fork from scratch (RFC-029 §3.2, P2b).
health
Per-provider circuit breaker — ProviderHealthRegistry (RFC-029 §3.6).

Enums§

FailureClass
What kind of failure occurred, and the recovery it implies.