Skip to main content
The TUI queue holds multiple agent tasks with priority, cancel, and retry controls.
The user submits several prompts; the queue runs them sequentially without blocking the input pane.

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

1

Submit runs with priorities

2

Manage via CLI

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

Run praisonai queue stats to spot stuck or failing jobs before users report delays.
Use queue retry with the job id after fixing the root cause — avoid blind retries in a loop.
queue clear --force wipes pending work — confirm no production jobs remain first.
Long-running agent tasks should enqueue rather than block the TUI event loop.

TUI Commands

Queue CLI reference

TUI Overview

Terminal user interface