Jobs API
API Endpoints
Jobs API
Async job management API for long-running agent tasks
POST
Jobs API
Jobs API
The Jobs API provides asynchronous job management for long-running agent tasks with progress tracking and streaming.Overview
Jobs API enables:- Async job submission with immediate response
- Job status polling
- Progress streaming via SSE
- Job cancellation and cleanup
- Idempotency for safe retries
When to Use
- Long-running tasks: Tasks that take more than a few seconds
- Background processing: Fire-and-forget with status polling
- Progress tracking: Real-time progress updates
- Reliable execution: Idempotent submissions
Base URL + Playground
http://127.0.0.1:8765
Authentication
Send the key with either header whenPRAISONAI_JOBS_API_KEY is set.
/health is the only endpoint reachable without a key. Enable the key with PRAISONAI_JOBS_API_KEY — see Async Jobs Deployment.
Endpoints
POST /api/v1/runs
Submit a new job for async execution.string
Optional key to prevent duplicate submissions
string
required
The prompt/query for the agent
string
Path to agents YAML file
string
Inline agents YAML content
string
default:"praisonai"
Framework to use:
praisonai, crewai, autogenobject
Additional configuration
string
URL to POST results when complete
integer
default:"3600"
Timeout in seconds
string
Session ID for grouping jobs
Location: URL to poll for statusRetry-After: Suggested seconds before first poll (default: 2)
GET /api/v1/runs
List jobs with optional filters.string
Filter by status:
pending, running, succeeded, failed, cancelledstring
Filter by session ID
integer
default:"1"
Page number
integer
default:"20"
Jobs per page (max 100)
GET /api/v1/runs/
Get job status.string
required
Job ID
GET /api/v1/runs//result
Get job result (only for completed jobs).string
required
Job ID
POST /api/v1/runs//cancel
Cancel a running job.string
required
Job ID
DELETE /api/v1/runs/
Delete a completed job.string
required
Job ID
GET /api/v1/runs//stream
Stream job progress via SSE.string
required
Job ID
Job Status Values
Errors
Idempotency
UseIdempotency-Key header to prevent duplicate job submissions:
Notes
- Jobs are stored in memory by default
- Configure persistent storage for production
- Webhook notifications are optional
- SSE streaming includes heartbeats every 5 seconds
Related
- A2U API - Event streaming
- Recipe API - Sync recipe execution

