pro mode) and an in-memory queue (for pico/mini mode). Both expose the same HTTP API.
Queue Architecture
- BullMQ queue name:
ai-tasks(configurable viaqueue.nameinsettings.yml) - Notification queue:
ai-task-notifications - Redis URL:
REDIS_URLenv var orsettings.yml - Retry: exponential backoff, configurable attempts
GET /api/queue/status
Get current queue depth and worker status.200
GET /api/dlq
List tasks in the dead letter queue.POST /api/dlq/:id/retry
Move a DLQ item back to the active queue for re-processing.POST /api/dlq/:id/discard
Mark a DLQ item as discarded (won’t be retried automatically).Queue Configuration
Configure viasettings.yml:
In-Memory Queue
When Redis is not available, profClaw falls back to an in-memory queue (src/queue/memory-queue.ts). The in-memory queue:
- Supports the same
TaskStatuslifecycle - Does not persist across restarts
- Has no cursor-based pagination (offset only)
- Suitable for
picoandminideployment modes
Failure Handler
TheFailureHandler (src/queue/failure-handler.ts) intercepts task failures and:
- Increments the retry counter
- Applies exponential backoff delay
- Re-queues the task if
attempts < maxRetries - Moves the task to the DLQ after
maxRetriesexhausted - Sends an in-app notification for DLQ entries
Webhook Queue
The webhook queue (src/queue/webhook-queue.ts) handles outbound webhook delivery with automatic retry on failure. Configure delivery endpoints via POST /api/webhooks.
Related
- Tasks API - Create and manage tasks in the queue
- profclaw queue - Inspect queue status from the CLI
- Deployment Modes - When to use BullMQ vs in-memory
- Configuration Overview - Queue settings in settings.yml