Skip to main content

When to use async jobs

Chat sessions wait for the agent to complete before returning. Async jobs are fire-and-forget — use them when:
  • The task takes longer than 30 seconds (e.g. enriching 500 contacts)
  • You want a callback when the result is ready
  • You’re triggering work from another system (n8n, Zapier, your own backend)

Submitting a job

Response (immediate):

Checking job status

Webhook payload

When callback_url is set, Hermes POSTs the completed job result to your URL:
Failed jobs post "status": "error" with an error field. Implement idempotent webhook handlers — Hermes retries delivery up to 3 times with exponential backoff.

Job parameters

Job statuses

Listing jobs

Results are paginated with a cursor field. Jobs are retained for 30 days.

Integration examples

n8n webhook trigger

In n8n, add an HTTP Request node that POSTs to /jobs, captures job_id, then uses a Webhook node configured at callback_url to receive the result.

Polling from your backend

If you can’t receive webhooks, poll /jobs/{job_id} every 10–30 seconds until status is not queued or running. Most jobs complete within 2 minutes; set a polling timeout of 10 minutes.