Async Jobs CLI
Manage async jobs from the command line. Submit jobs, check status, get results, stream progress, and cancel jobs.Commands Overview
| Command | Description |
|---|---|
praisonai run submit | Submit a new job |
praisonai run status <id> | Get job status |
praisonai run result <id> | Get job result |
praisonai run stream <id> | Stream job progress |
praisonai run list | List all jobs |
praisonai run cancel <id> | Cancel a job |
Starting the Jobs Server
Before using job commands, start the jobs server:Submit a Job
Submit a new job for execution:Submit Options
| Option | Description |
|---|---|
--agent-file | Path to agents.yaml |
--recipe | Recipe name (mutually exclusive with —agent-file) |
--recipe-config | Recipe config as JSON string |
--framework | Framework to use (default: praisonai) |
--timeout | Timeout in seconds (default: 3600) |
--wait | Wait for completion |
--stream | Stream progress after submission |
--idempotency-key | Key to prevent duplicates |
--idempotency-scope | Scope: none, session, global |
--webhook-url | Webhook URL for completion |
--session-id | Session ID for grouping |
--metadata | Custom metadata (KEY=VALUE, repeatable) |
--json | Output JSON for scripting |
--api-url | Jobs API URL (default: http://127.0.0.1:8005) |
Check Job Status
Get the current status of a job:Status Output
Get Job Result
Retrieve the result of a completed job:Stream Job Progress
Stream real-time progress updates via SSE:Stream Output
List Jobs
List all jobs with optional filtering:List Options
| Option | Description |
|---|---|
--status | Filter by status |
--page | Page number (default: 1) |
--page-size | Jobs per page (default: 20) |
--json | Output JSON for scripting |
--api-url | Jobs API URL |
Cancel a Job
Cancel a running job:Examples
Complete Workflow
Submit with Wait
Scripting with JSON
Using Webhooks
Idempotent Submission
Troubleshooting
Connection Refused
If you get “Connection refused”:- Ensure the jobs server is running
- Check the API URL is correct
- Verify the port is not blocked
Job Stuck in Queued
If jobs remain queued:- Check server logs for errors
- Verify max concurrent limit
- Ensure recipe/agent file exists
Timeout Errors
If jobs are timing out:- Increase timeout with
--timeout - Check if external APIs are slow
- Consider breaking into smaller jobs
See Also
- Async Jobs SDK - Python API for jobs
- Background Tasks CLI - In-process background tasks
- Scheduler CLI - Periodic job scheduling

