Docs
list_ai_runs
AI runs, newest first, with `cost`. Filter by type, status or `startedBy` (account or agent id); page with `cursor`. Pass `runId` for one run's status, output and events after `afterSeq`; poll while it is open with `nextSeq`.
AI runs, newest first, with cost. Filter by type, status or startedBy (account or agent id); page with cursor. Pass runId for one run's status, output and events after afterSeq; poll while it is open with nextSeq.
Access and cost
- Kind: query
- Scope: workspace
- Actors: member, agent
- Credits: Free
- Requires confirmation: false
- Accepts idempotency key: false
Input schema
{
"properties": {
"workspaceId": {
"format": "uuid",
"type": "string"
},
"type": {
"maxLength": 40,
"type": "string"
},
"status": {
"enum": [
"queued",
"running",
"succeeded",
"stopped_at_max",
"failed",
"cancelled"
],
"type": "string"
},
"startedBy": {
"format": "uuid",
"type": "string"
},
"limit": {
"default": 20,
"maximum": 50,
"minimum": 1,
"type": "integer"
},
"cursor": {
"maxLength": 100,
"type": "string"
},
"runId": {
"format": "uuid",
"type": "string"
},
"afterSeq": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"workspaceId"
],
"type": "object"
}Output schema
{
"additionalProperties": false,
"properties": {
"runs": {
"items": {
"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"
},
"type": "array"
},
"nextCursor": {
"type": [
"string",
"null"
]
},
"events": {
"items": {
"additionalProperties": false,
"properties": {
"seq": {
"minimum": 1,
"type": "integer"
},
"kind": {
"enum": [
"status",
"progress",
"tool_call",
"tool_result",
"text_delta",
"item",
"meter",
"error"
],
"type": "string"
},
"payload": {
"type": "object"
},
"createdAt": {
"format": "date-time",
"type": "string"
}
},
"required": [
"seq",
"kind",
"payload",
"createdAt"
],
"type": "object"
},
"type": "array"
},
"nextSeq": {
"minimum": 0,
"type": "integer"
},
"moreEvents": {
"type": "boolean"
}
},
"required": [
"runs",
"nextCursor"
],
"type": "object"
}Errors
[]Annotations
{
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": false,
"readOnlyHint": true,
"title": "List AI runs"
}