Skip to main content

Get a turn

GET 

/chat/turns/:turnId

While status is queued or running the response carries Retry-After: poll again after that many seconds. On done, reply holds the agent’s answer (prose is its plain words, null when there are none; an offer is reply.proposal.kind === "proposes" with a planId to confirm or cancel; when the agent designed a piece, the offer is to make it (reply.proposal.draftOffer) and the piece exists only once the offer is confirmed). On failed, problem says why, and problem.sessionId (also sessionId) names the conversation to resend INTO when the turn had started one. RUNNER_LOST is NOT final: the runner stopped reporting, but the turn may still complete and then reads done, so poll again before resending, and resend in the SAME sessionId rather than a fresh conversation. NOT_STARTED IS final: the turn waited too long to start and will never run. RESULT_NOT_STORED means the turn ran but its answer could not be saved: its effects may exist, so continue in the same sessionId. A turn is kept for as long as its Idempotency-Key is remembered (30 days).

Request​

Responses​

The turn.

Response Headers
    Retry-After

    While the turn is not finished: seconds to wait before polling again (2).