litestar-saq

Integrate SAQ background job queues with Litestar applications.

13|Updated Apr 15, 2026
One-click install
npx skills add https://github.com/litestar-org/litestar-skills --skill litestar-saq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: litestar-saq
Source: https://github.com/litestar-org/litestar-skills/tree/main/plugins/litestar/skills/litestar-saq
Command: npx skills add https://github.com/litestar-org/litestar-skills --skill litestar-saq

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Litestar applications lack a first-party, integrated solution for managing background job queues, scheduled tasks, and worker processes, requiring developers to manually configure separate queue infrastructure and handle lifecycle management.

Core Features & Use Cases

  • Integrated SAQ Plugin: Provides out-of-the-box SAQPlugin for Litestar that handles queue registration, worker lifespan management, and dependency injection for TaskQueues.
  • Flexible Broker Support: Works with Redis for high-throughput workloads and web UI dashboards, or PostgreSQL for durable, SQL-queryable job history and PG-only deployments.
  • Advanced Workflow Patterns: Includes a sidecar worker pattern for same-transaction outbox semantics, execution target routing (local/cloudrun/immediate), and real-time job progress updates via Litestar Channels.
  • Use Case Example: A SaaS app uses this skill to enqueue email notification tasks, run nightly database cleanup cron jobs, and track long-running report generation progress in real-time for end users.

Quick Start

Use the litestar-saq skill to configure a Redis-backed background job queue with a scheduled cleanup task and a route handler that enqueues email notification jobs.

Frequently Asked Questions about litestar-saq

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add background job queues to a Litestar application?

You can add background job queues to a Litestar application by using the integrated SAQPlugin to handle queue registration, worker lifespan management, and dependency injection without manual configuration.

Can I use Redis or PostgreSQL for Litestar task queue persistence?

Yes, Litestar task queue persistence supports Redis for high-throughput workloads and web UI dashboards, or PostgreSQL for durable, SQL-queryable job history in PG-only deployments.

What is the best way to run scheduled cron jobs and multi-queue workers in Litestar?

The best way to run scheduled cron jobs and multi-queue workers in Litestar is using SAQ integration, which manages worker processes and handles dependency-injected task enqueueing out of the box.

How do I track real-time background job progress in Litestar?

You can track real-time background job progress in Litestar by routing execution updates through Litestar Channels, allowing end users to monitor long-running tasks like report generation directly.

Does Litestar SAQ support same-transaction outbox patterns for database workflows?

Yes, Litestar SAQ supports same-transaction outbox patterns for database-coupled workflows by utilizing a sidecar worker pattern to ensure execution target routing and transactional consistency.

Do I need OpenTelemetry to monitor Litestar background tasks?

OpenTelemetry observability is natively supported for Litestar background tasks, providing built-in tracing for SAQ worker processes and job execution without requiring external monitoring plugins.