Skip to content

Cancel Agent

POST
/api/v1/projects/{project_id}/agent/cancel
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.

project_id
required
Project Id
string
Media typeapplication/json
Any of:
CancelAgentRequest

Scopes a cancel to one conversation; omitted (or no body) cancels the project’s turn.

object
conversation_id
Any of:
string
Examplegenerated
{
"conversation_id": "example"
}

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>
ValidationError
object
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"
}
]
}