Skip to main content
Tasks support per-task retry policies with exponential backoff instead of fixed delays.
The user kicks off a team run; when a task fails, PraisonAI retries with exponential backoff until max_retries is reached or the task succeeds.

Quick Start

1

Basic Retry Configuration

2

Custom Retry Policy


How It Works


Retry Configuration

Task-Level Settings

Each task can configure its own retry behavior:

Exponential Backoff Formula

Retry delays follow exponential backoff with a maximum cap:
Example with retry_delay=2.0, max_retry_delay=60:
  • Retry 1: min(2 * 2^0, 60) = 2 seconds
  • Retry 2: min(2 * 2^1, 60) = 4 seconds
  • Retry 3: min(2 * 2^2, 60) = 8 seconds
  • Retry 4: min(2 * 2^3, 60) = 16 seconds
  • Retry 5: min(2 * 2^4, 60) = 32 seconds
  • Retry 6: min(2 * 2^5, 60) = 60 seconds (capped)

Failed Task Propagation

When a task fails after exhausting retries, dependent tasks are automatically skipped:

Failure Propagation Flow


Retry Decision Logic

The orchestrator follows this logic for each task execution:

Common Patterns

Fast Retry for Transient Errors

Slow Retry for Rate Limits

No Retries for One-Shot Operations

Chain with Failure Isolation


Migration from Hardcoded Delays

Before: All tasks used 1-second hardcoded delays
After: Configurable exponential backoff per task

Best Practices

Different operations need different retry strategies:
Structure task dependencies to handle failures gracefully:
Track retry behavior to tune policies:
Avoid extremely long delays that block workflows:

Structured LLM Errors

Handle LLM failure classification

Workflow Errors

Workflow-level error handling