Cancel Agent
POST
/api/v1/projects/{project_id}/agent/cancel
const url = 'https://aura.strangeworks.com/api/v1/projects/example/agent/cancel';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"conversation_id":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://aura.strangeworks.com/api/v1/projects/example/agent/cancel \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "conversation_id": "example" }'Cancel the running agent (ADR-006), optionally scoped to one conversation.
Two cooperative hooks cover every window a Stop can land in (see below); no path
task.cancel()s a turn. Because the Worker addresses the per-project sandbox by id,
the cancel reaches it from any replica. Full model: the Agent Turns section in CLAUDE.md.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”project_id
required
Project Id
string
Request Body
Section titled “Request Body”Media typeapplication/json
Any of:
CancelAgentRequest
Scopes a cancel to one conversation; omitted (or no body) cancels the project’s turn.
null
Examplegenerated
{ "conversation_id": "example"}Responses
Section titled “Responses”Successful Response
Media typeapplication/json
CancelAgentResponse
object
cancelled
required
Cancelled
boolean
Examplegenerated
{ "cancelled": true}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}