Skip to main content

Cancel an in-progress agent response

POST 

/agent/:id/responses/:response_id/cancel

Requests cancellation of an in-progress response. The platform sets a cancel signal that the worker polls; the underlying job transitions to a terminal state and any connected SSE consumer receives a synthesized terminal frame.

Returns cancelled: true when a cancel signal was set, and cancelled: false when the response had already reached a terminal state (completed or failed) and there was nothing to cancel.

Note: unlike the SSE endpoints (which return OpenAI-shaped error envelopes), this endpoint returns the platform's standard { success, data } envelope on success.

Request

Responses

Cancellation outcome. cancelled is true when a cancel signal was set, false when the response had already terminated.