Skip to main content

errors

AI Agent Structured exception hierarchy for PraisonAI SDK. Provides uniform error semantics for consistent handling across:
  • Multi-agent orchestration
  • Tool execution
  • LLM interactions
  • Memory operations
  • External integrations

Import

Classes

FailoverDecision

Discriminated struct for retry and failover decisions.

IdleTimeoutBreaker

Circuit breaker for consecutive idle-timeout failures.

ErrorContextProtocol

Protocol for structured error context propagation.

PraisonAIError

Base error class with structured context for PraisonAI SDK.

ToolExecutionError

Tool execution failed.

LLMError

LLM interaction failed.

BudgetExceededError

Budget limits exceeded (tokens, time, etc).

ValidationError

Input validation failed.

NetworkError

Network/external service error.

HandoffError

Agent handoff/delegation failed.

PraisonAIConfigError

Configuration error (missing API keys, invalid settings, etc).

HandoffCycleError

Circular handoff dependency detected.

HandoffDepthError

Maximum handoff depth exceeded.

HandoffTimeoutError

Handoff operation timed out.

HandoffValidationError

Raised when a typed handoff payload does not satisfy the declared schema.

Constants