Skip to main content
POST
Submit a new long-running agent task for asynchronous execution.
Idempotency-Key
string
Unique key to prevent duplicate job submissions. If a job with this key already exists, the existing job is returned.
Content-Type
string
required
Must be application/json
prompt
string
required
The task prompt or instruction for the agent to execute.
agent_file
string
Path to the agent configuration YAML file. Defaults to agents.yaml.
framework
string
Framework to use for execution. Defaults to praisonai.
timeout
integer
Maximum execution time in seconds. Defaults to 3600 (1 hour).
webhook_url
string
URL to receive a callback when the job completes. The callback includes the job result.
session_id
string
Group related jobs together with a session identifier.

Response

job_id
string
required
Unique identifier for the submitted job (e.g., run_abc123).
status
string
required
Initial job status, typically queued.
created_at
string
required
ISO 8601 timestamp of job creation.
poll_url
string
required
URL to poll for job status updates.
stream_url
string
required
URL for SSE streaming of job progress.

Response Headers

Idempotency

Use the Idempotency-Key header to ensure a job is only created once, even if the request is retried:

Webhook Callback

When webhook_url is provided, the server sends a POST request to that URL when the job completes:

Error Responses

See Also