Agent

Run the AI agent asynchronously

Same request body and paid gates as /public/agent/run, but returns {job_id, session_id, conversation_id, status} immediately instead of blocking. Consume live progress at /public/agent/jobs/{jobId}/stream; cancel via DELETE /public/agent/jobs/{jobId}. Cost is debited against the API key's monthly ledger when the run finishes (same amounts as the sync route).

post/public/agent/run/async

Request

  • Base URL: https://api.johnsessentials.com/api/v1
  • URL: https://api.johnsessentials.com/api/v1/public/agent/run/async
  • Auth: HTTP bearer

Headers

Idempotency-Keystring

Opaque client-chosen string ≤255 chars. Identical key + body replays cached response within 24h.

Request body

conversation_idstring uuid

Resume a saved conversation thread (see /public/agent/conversations). Omit to start a new one — the response returns its id.

file_idsstring[]

File IDs to attach (from POST /public/files)

messagestring required

The task/prompt for the agent to run

Response

Run accepted and started; stream for progress.

dataunknown
request_idstring uuid required
successboolean required

Example response

{
  "meta": {
    "version": "1.0"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.