Skip to main content
Agent endpoints are asynchronous. When you submit a job, you receive a job_id and poll until the job reaches a terminal state.

Polling flow

1

Submit

POST to any agent endpoint (/v1/agents/code-research, /medical-necessity, /denial-resolution). The API returns 202 Accepted with a job_id.
2

Poll

GET /v1/agents/jobs/{job_id} repeatedly until status is completed or failed.
3

Read result

The completed response includes the agent’s output in result.
To skip polling, pass callback_url and callback_secret on submit. See Agent callbacks.

Status values

Poll endpoint

Response (completed)

Response (failed)

Python polling example

Use exponential backoff to avoid unnecessary requests. Most agent jobs complete within 3-10 seconds.

Reasoning trace

After a job completes, retrieve the agent’s step-by-step reasoning and SENTINEL security annotations:

Best practices

Start at 1 second

Most jobs complete in 3-10s. A 1-second initial delay avoids wasted requests without adding latency.

Cap at 15 seconds

If a job hasn’t completed after several polls, cap the backoff. Jobs rarely exceed 30 seconds.

Set a timeout

Abort after 60 seconds. If a job is still running, it may be stuck — contact support.

Check audit scores

Always inspect audit_tier on completed jobs. A red tier means the result needs human review.