Skip to main content
The queue system enables batch processing of multiple websites with status tracking, priority ordering, and atomic claim operations. Perfect for processing hundreds of URLs with AI agents or parallel workers.

queue add

Add a single website to the queue.

Syntax

Arguments

url
string
required
Website URL to add to queue.

Options

--project
string
default:"default"
Project name.
--message, -m
string
Custom instruction for processing this URL (e.g., “Focus on product pricing”).
--priority
integer
default:"5"
Priority level (higher = processed sooner). Range: 1-10.

Examples

Output

Duplicate Handling

Duplicates are detected by (project_name, website_url) combination and automatically skipped.

queue bulk

Bulk add URLs from CSV or JSON file.

Syntax

Arguments

file
string
required
Path to CSV or JSON file containing URLs.

Options

--project
string
default:"default"
Project name for all URLs.
--priority
integer
default:"5"
Default priority for all URLs (can be overridden per-row).

CSV Format

Requires a url column. Optional: custom_instruction, priority.

JSON Format

Array of objects with url field. Optional: custom_instruction, priority.

Examples

Output

Use templates/queue-template.csv as a starting point for your CSV files.

queue list

List queue items with filtering.

Syntax

Options

--project
string
default:"default"
Project name.
--status
string
Filter by status: pending, processing, completed, failed.
--limit
integer
default:"5"
Maximum items to show.
--all
flag
Show all items including completed and failed (default shows only pending/processing).
--count
flag
Show only the count, no details.

Examples

Output

queue next

Atomically claim the next pending item.

Syntax

Options

--project
string
default:"default"
Project name.

Behavior

Atomically claims the highest priority pending item and locks it for processing. PostgreSQL uses FOR UPDATE SKIP LOCKED (race-safe). SQLite uses conditional UPDATE.

Example

Output

Item Claimed

Empty Queue

queue complete

Mark an item as successfully completed.

Syntax

Arguments

id
integer
required
Queue item ID.

Example

Output

queue fail

Mark an item as failed with error message.

Syntax

Arguments

id
integer
required
Queue item ID.

Options

--message, -m
string
Error message explaining why processing failed.

Example

Output

queue retry

Reset a failed item to pending status.

Syntax

Arguments

id
integer
required
Queue item ID.

Example

Output

Retry count is tracked but not enforced. You can retry items indefinitely.

queue remove

Remove an item from the queue.

Syntax

Arguments

id
integer
required
Queue item ID.

Example

Output

queue cleanup

Bulk remove completed or failed items.

Syntax

Options

--project
string
default:"default"
Project name.
--completed
flag
Remove all completed items.
--failed
flag
Remove all failed items.
--all
flag
Remove all completed and failed items.
--force
flag
Skip confirmation prompt.

Examples

Output

Status Values

  • pending: Waiting to be processed
  • processing: Currently being worked on (locked)
  • completed: Successfully processed
  • failed: Processing failed with error

Parallel Processing

Process queue items with multiple workers:
Use PostgreSQL for parallel processing. SQLite may have race conditions under high concurrency.

Next Steps

Crawl Commands

Process queue items with crawl commands

Database

Query and manage queue data