{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/robosystems-ai/json-schema/robosystems-ai-operator-thread-list-response-schema.json",
  "title": "OperatorThreadListResponse",
  "description": "A page of the graph's operator threads, most recently active first.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/robosystems-ai-graph-audit-api-openapi.yml#/components/schemas/OperatorThreadListResponse",
  "properties": {
    "graph_id": {
      "type": "string",
      "title": "Graph Id"
    },
    "threads": {
      "items": {
        "$ref": "#/$defs/OperatorThreadSummary"
      },
      "type": "array",
      "title": "Threads"
    },
    "next_cursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Cursor",
      "description": "Pass as `cursor` for the next, older page; null on the last page"
    }
  },
  "type": "object",
  "required": [
    "graph_id",
    "threads"
  ],
  "$defs": {
    "OperatorThreadSummary": {
      "properties": {
        "thread_id": {
          "type": "string",
          "title": "Thread Id",
          "description": "The thread id the runs were made under"
        },
        "user_id": {
          "type": "string",
          "title": "User Id",
          "description": "The user whose conversation it is"
        },
        "title": {
          "type": "string",
          "title": "Title",
          "description": "The conversation's first question, clipped"
        },
        "run_count": {
          "type": "integer",
          "title": "Run Count",
          "description": "Runs in the thread"
        },
        "first_run_at": {
          "type": "string",
          "format": "date-time",
          "title": "First Run At",
          "description": "When the first run started"
        },
        "last_run_at": {
          "type": "string",
          "format": "date-time",
          "title": "Last Run At",
          "description": "When the latest run started"
        },
        "last_operator_type": {
          "type": "string",
          "title": "Last Operator Type",
          "description": "The operator the latest run used"
        },
        "last_status": {
          "type": "string",
          "enum": [
            "completed",
            "failed",
            "cancelled"
          ],
          "title": "Last Status",
          "description": "How the latest run ended"
        }
      },
      "type": "object",
      "required": [
        "thread_id",
        "user_id",
        "title",
        "run_count",
        "first_run_at",
        "last_run_at",
        "last_operator_type",
        "last_status"
      ],
      "title": "OperatorThreadSummary",
      "description": "One console conversation: the runs that share a thread id."
    }
  }
}