Docs
cancel_ai_run
Stop an AI run (people, or the agent that started it): charged 0 if nothing was delivered yet, else what it used so far, at most its max.
Stop an AI run (people, or the agent that started it): charged 0 if nothing was delivered yet, else what it used so far, at most its max.
Access and cost
- Kind: mutation
- Scope: workspace
- Actors: member, agent
- Credits: Free
- Requires confirmation: false
- Accepts idempotency key: false
Input schema
{
"properties": {
"workspaceId": {
"format": "uuid",
"type": "string"
},
"runId": {
"format": "uuid",
"type": "string"
}
},
"required": [
"workspaceId",
"runId"
],
"type": "object"
}Output schema
{
"additionalProperties": false,
"properties": {
"run": {
"additionalProperties": false,
"properties": {
"id": {
"format": "uuid",
"type": "string"
},
"workspaceId": {
"format": "uuid",
"type": "string"
},
"type": {
"type": "string"
},
"status": {
"enum": [
"queued",
"running",
"succeeded",
"stopped_at_max",
"failed",
"cancelled"
],
"type": "string"
},
"limit": {
"type": [
"string",
"null"
]
},
"startedBy": {
"additionalProperties": false,
"properties": {
"kind": {
"enum": [
"member",
"agent"
],
"type": "string"
},
"accountId": {
"anyOf": [
{
"format": "uuid",
"type": "string"
},
{
"type": "null"
}
]
},
"agentClientId": {
"anyOf": [
{
"format": "uuid",
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"kind",
"accountId",
"agentClientId"
],
"type": "object"
},
"parentRunId": {
"anyOf": [
{
"format": "uuid",
"type": "string"
},
{
"type": "null"
}
]
},
"input": {
"type": "object"
},
"output": {
"type": "object"
},
"error": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"message": {
"type": [
"string",
"null"
]
}
},
"required": [
"code",
"message"
],
"type": "object"
},
{
"type": "null"
}
]
},
"cost": {
"additionalProperties": false,
"properties": {
"estimate": {
"additionalProperties": false,
"properties": {
"min": {
"minimum": 0,
"type": "integer"
},
"max": {
"minimum": 0,
"type": "integer"
},
"typical": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
]
}
},
"required": [
"min",
"max",
"typical"
],
"type": "object"
},
"charged": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
]
},
"soFar": {
"minimum": 0,
"type": "integer"
},
"stoppedAtMax": {
"type": "boolean"
},
"continueEstimate": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"min": {
"minimum": 0,
"type": "integer"
},
"max": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"min",
"max"
],
"type": "object"
},
{
"type": "null"
}
]
}
},
"required": [
"estimate",
"charged",
"soFar",
"stoppedAtMax",
"continueEstimate"
],
"type": "object"
},
"cancelRequested": {
"type": "boolean"
},
"deliveredAt": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"startedAt": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"endedAt": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"format": "date-time",
"type": "string"
}
},
"required": [
"id",
"workspaceId",
"type",
"status",
"limit",
"startedBy",
"parentRunId",
"input",
"output",
"error",
"cost",
"cancelRequested",
"deliveredAt",
"startedAt",
"endedAt",
"createdAt"
],
"type": "object"
}
},
"required": [
"run"
],
"type": "object"
}Errors
[]Annotations
{
"destructiveHint": true,
"idempotentHint": false,
"openWorldHint": false,
"readOnlyHint": false,
"title": "Stop an AI run"
}