Async Jobs
Submit Run API
Submit a new async job for execution
POST
Submit a new long-running agent task for asynchronous execution.
Unique key to prevent duplicate job submissions. If a job with this key already exists, the existing job is returned.
Must be
application/jsonThe task prompt or instruction for the agent to execute.
Path to the agent configuration YAML file. Defaults to
agents.yaml.Framework to use for execution. Defaults to
praisonai.Maximum execution time in seconds. Defaults to
3600 (1 hour).URL to receive a callback when the job completes. The callback includes the job result.
Group related jobs together with a session identifier.
Response
Unique identifier for the submitted job (e.g.,
run_abc123).Initial job status, typically
queued.ISO 8601 timestamp of job creation.
URL to poll for job status updates.
URL for SSE streaming of job progress.
Response Headers
| Header | Description |
|---|---|
Location | URL to poll for job status |
Retry-After | Recommended seconds before first poll |
Idempotency
Use theIdempotency-Key header to ensure a job is only created once, even if the request is retried:
Webhook Callback
Whenwebhook_url is provided, the server sends a POST request to that URL when the job completes:
Error Responses
| Status | Description |
|---|---|
400 | Bad request - missing or invalid prompt |
409 | Conflict - duplicate idempotency key |
422 | Validation error - invalid request body |
500 | Internal server error |

