Skip to main content
This page covers task/workflow-level reliability (retry jitter, workflow_timeout, fail_on_callback_error). If you are looking for the gateway-level reliability preset (reliability="production" on BotOS / gateway YAML / CLI), see Gateway Reliability Preset — it is a separate feature that composes drain and admission control.
Make agents survive flaky LLMs, hung workflows, and broken callbacks with built-in retry jitter and configurable failure policies.
This page covers task/workflow reliability (retry, timeouts, failure policies). For gateway reliability (graceful drain + inbound admission control presets), see Gateway Reliability.
The user starts a workflow; retries, timeouts, and failure policies keep flaky LLM or callback errors from aborting the run.

Quick Start

1

Simple Usage

2

With Configuration

Strict mode for CI; lenient mode for production with non-fatal error inspection:

How It Works


Configuration Options

fail_on_callback_error and fail_on_memory_error now behave identically on both PraisonAIAgents(...).start() (sync) and .astart() (async). Before PraisonAI 4.x (upstream fix PraisonAI#3339, 2026-07-24) the sync path silently swallowed the exception after marking the task "completed"; the async path always re-raised. If you were relying on the buggy sync behaviour, be aware that start() will now abort the workflow when either flag is set.

Retry categories

Jitter is automatic — there is no flag to turn it off.

Common Patterns

Strict CI mode

Lenient production mode

Multi-agent fan-out


Best Practices

Network calls can hang indefinitely. Use 60s for quick tasks, 300s for multi-step workflows.
Tests should surface bugs immediately; production should log and continue unless the callback is critical.Both .start() and .astart() now honour the flag — you can pick whichever surface fits your code without giving up fail-fast.
The SDK already applies exponential backoff with jitter. Catching RateLimitError and sleeping duplicates that work.
Non-fatal errors indicate latent issues — increment metrics and log them even when the workflow completes.

Task Retry Policy

Per-task retry with exponential backoff

Workflow Error Recovery

Recover from workflow failures gracefully