Queue System
The PraisonAI Queue System enables managing multiple agent runs with priority ordering, concurrency limits, and persistence.Overview
The queue system provides:- Priority-based FIFO - URGENT > HIGH > NORMAL > LOW ordering
- Concurrency limits - Global, per-agent, and per-workspace limits
- Cancel/retry - Full lifecycle management
- Persistence - SQLite-backed crash recovery
- Streaming - Token-by-token output with backpressure
Quick Start
Python Usage
Basic Queue Operations
Queue Configuration
Run States
Priority Levels
Cancel and Retry
Queue Statistics
Data Model
QueuedRun
Persistence
The queue system uses SQLite for persistence:Crash Recovery
Manual Persistence Operations
CLI Usage
See TUI Commands for complete CLI reference.Best Practices
Inspect queue stats regularly
Inspect queue stats regularly
Run
praisonai queue stats to spot stuck or failing jobs before users report delays.Retry failed runs deliberately
Retry failed runs deliberately
Use
queue retry with the job id after fixing the root cause — avoid blind retries in a loop.Clear with force only in dev
Clear with force only in dev
queue clear --force wipes pending work — confirm no production jobs remain first.Size the queue for peak load
Size the queue for peak load
Long-running agent tasks should enqueue rather than block the TUI event loop.
Related
TUI Commands
Queue CLI reference
TUI Overview
Terminal user interface

