Async Jobs
Async Jobs provide a server-based approach to running recipes and agents. Jobs are submitted to an API server, persisted, and can be monitored, streamed, and cancelled. Ideal for production deployments with multiple clients.Python API
Submitting a Job
JobHandle Methods
Waiting for Completion
Using the Jobs API Directly
Starting the Jobs Server
Server Configuration
Job Status Values
queued- Job is waiting to be processedrunning- Job is currently executingsucceeded- Job completed successfullyfailed- Job failed with an errorcancelled- Job was cancelled
Webhooks
Configure webhooks to receive notifications when jobs complete:Idempotency
Prevent duplicate job submissions with idempotency keys:Idempotency Scopes
TEMPLATE.yaml Runtime Block
Configure job defaults in your recipe:Error Handling
Best Practices
- Use idempotency keys - Prevent duplicate submissions
- Set appropriate timeouts - Match job complexity
- Configure webhooks - For async notification
- Monitor job status - Use streaming for real-time updates
- Handle failures gracefully - Implement retry logic
See Also
- Async Jobs CLI - CLI commands for jobs
- Background Tasks - In-process background execution
- Scheduler - Periodic job scheduling

