Async Jobs Deployment
Deploy the async jobs server for production-grade agent and recipe execution with persistence, webhooks, and streaming.Overview
The async jobs server provides:- HTTP API for job submission and management
- Persistent job storage
- Webhook notifications
- SSE streaming for real-time progress
- Idempotency support
Quick Start
Start the Server
Submit a Job
Docker Deployment
Dockerfile
Docker Compose
Configuration
Environment Variables
| Variable | Default | Description |
|---|---|---|
PRAISONAI_JOBS_PORT | 8005 | Server port |
PRAISONAI_JOBS_HOST | 127.0.0.1 | Server host |
PRAISONAI_JOBS_MAX_CONCURRENT | 10 | Max concurrent jobs |
PRAISONAI_JOBS_DEFAULT_TIMEOUT | 3600 | Default timeout (seconds) |
TEMPLATE.yaml Runtime Block
Configure job defaults in your recipe:API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/api/v1/runs | POST | Submit a new job |
/api/v1/runs | GET | List all jobs |
/api/v1/runs/{id} | GET | Get job status |
/api/v1/runs/{id}/result | GET | Get job result |
/api/v1/runs/{id}/stream | GET | Stream job progress (SSE) |
/api/v1/runs/{id}/cancel | POST | Cancel a job |
/api/v1/runs/{id} | DELETE | Delete a job |
/health | GET | Health check |
/stats | GET | Server statistics |

