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
Endpoints
POST /api/v1/runs
Submit a new job for async execution.Optional key to prevent duplicate submissions
The prompt/query for the agent
Path to agents YAML file
Inline agents YAML content
Framework to use:
praisonai, crewai, autogenAdditional configuration
URL to POST results when complete
Timeout in seconds
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.Filter by status:
pending, running, succeeded, failed, cancelledFilter by session ID
Page number
Jobs per page (max 100)
GET /api/v1/runs/
Get job status.Job ID
GET /api/v1/runs//result
Get job result (only for completed jobs).Job ID
POST /api/v1/runs//cancel
Cancel a running job.Job ID
DELETE /api/v1/runs/
Delete a completed job.Job ID
GET /api/v1/runs//stream
Stream job progress via SSE.Job ID
Job Status Values
| Status | Description |
|---|---|
pending | Job submitted, waiting to start |
running | Job is executing |
succeeded | Job completed successfully |
failed | Job failed with error |
cancelled | Job was cancelled |
Errors
| Status | Description |
|---|---|
| 202 | Job accepted |
| 200 | Success |
| 204 | Deleted |
| 400 | Invalid request |
| 404 | Job not found |
| 409 | Conflict (job not complete or still running) |
| 500 | Server error |
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
Jobs API

