{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/hud-ai/json-schema/hud-ai-trace-info-response-schema.json",
  "title": "TraceInfoResponse",
  "x-generated": "2026-10-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hud-ai-openapi.yml#/components/schemas/TraceInfoResponse",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
    },
    "job_id": {
      "type": "string",
      "format": "uuid",
      "title": "Job Id"
    },
    "task_version_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Task Version Id"
    },
    "task_slug": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Task Slug"
    },
    "task_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Task Id"
    },
    "instance_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Instance Id"
    },
    "inference_llm_model_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Inference Llm Model Id"
    },
    "status": {
      "type": "string",
      "title": "Status"
    },
    "reward": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Reward"
    },
    "stop_reason": {
      "anyOf": [
        {
          "$ref": "#/$defs/StopReason"
        },
        {
          "type": "null"
        }
      ]
    },
    "views": {
      "type": "integer",
      "title": "Views",
      "default": 0
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Error"
    },
    "error_code": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Error Code"
    },
    "error_source": {
      "anyOf": [
        {
          "$ref": "#/$defs/ErrorSource"
        },
        {
          "type": "null"
        }
      ]
    },
    "evaluation_result": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Evaluation Result"
    },
    "start_time": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Start Time"
    },
    "end_time": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "End Time"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "task_prompt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Task Prompt"
    },
    "task_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Task Name"
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Name"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Description"
    },
    "metadata": {
      "additionalProperties": true,
      "type": "object",
      "title": "Metadata"
    },
    "environment": {
      "anyOf": [
        {
          "$ref": "#/$defs/TraceEnvironmentRef"
        },
        {
          "type": "null"
        }
      ]
    },
    "task": {
      "anyOf": [
        {
          "$ref": "#/$defs/TraceTaskRef"
        },
        {
          "type": "null"
        }
      ]
    },
    "model": {
      "anyOf": [
        {
          "$ref": "#/$defs/TraceThumbnailModel"
        },
        {
          "type": "null"
        }
      ]
    },
    "job_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Job Name"
    },
    "imported_from": {
      "anyOf": [
        {
          "$ref": "#/$defs/ExternalOrigin"
        },
        {
          "type": "null"
        }
      ]
    },
    "execution_mode": {
      "$ref": "#/$defs/TraceExecutionMode"
    },
    "runtime_provider": {
      "anyOf": [
        {
          "$ref": "#/$defs/RuntimeProviderName"
        },
        {
          "type": "null"
        }
      ]
    },
    "public": {
      "type": "boolean",
      "title": "Public",
      "default": false
    },
    "job_public": {
      "type": "boolean",
      "title": "Job Public",
      "default": false
    },
    "trace_public": {
      "type": "boolean",
      "title": "Trace Public",
      "default": false
    },
    "is_owner": {
      "type": "boolean",
      "title": "Is Owner",
      "default": false
    },
    "can_edit": {
      "type": "boolean",
      "title": "Can Edit",
      "default": false
    },
    "can_view_job": {
      "type": "boolean",
      "title": "Can View Job",
      "default": false
    },
    "can_view_taskset": {
      "type": "boolean",
      "title": "Can View Taskset",
      "default": false
    }
  },
  "type": "object",
  "required": [
    "id",
    "job_id",
    "status",
    "created_at",
    "execution_mode"
  ],
  "$defs": {
    "ErrorSource": {
      "type": "string",
      "enum": [
        "user",
        "platform",
        "provider"
      ],
      "title": "ErrorSource",
      "description": "Who is at fault for a failure.\n\n``user``: the customer's input, account, environment, or agent code.\n``platform``: HUD infrastructure or a broken platform invariant.\n``provider``: a third-party dependency (cloud runtime, upstream LLM API)."
    },
    "ExternalOrigin": {
      "properties": {
        "system": {
          "$ref": "#/$defs/ExternalSystem"
        },
        "external_id": {
          "type": "string",
          "title": "External Id"
        }
      },
      "type": "object",
      "required": [
        "system",
        "external_id"
      ],
      "title": "ExternalOrigin",
      "description": "Where an imported entity comes from: a system and the entity's id in it."
    },
    "ExternalSystem": {
      "type": "string",
      "enum": [
        "harbor"
      ],
      "title": "ExternalSystem",
      "description": "A system HUD imports environments and runs from."
    },
    "RuntimeProviderName": {
      "type": "string",
      "enum": [
        "ec2",
        "modal"
      ],
      "title": "RuntimeProviderName",
      "description": "Sandbox runtime provider for HUD-managed instances."
    },
    "ScenarioArgument": {
      "properties": {
        "name": {
          "type": "string",
          "title": "Name"
        },
        "required": {
          "type": "boolean",
          "title": "Required",
          "default": false
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Description"
        },
        "type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Type"
        },
        "default": {
          "anyOf": [
            {},
            {
              "type": "null"
            }
          ],
          "title": "Default"
        },
        "inputSchema": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Inputschema"
        }
      },
      "type": "object",
      "required": [
        "name"
      ],
      "title": "ScenarioArgument"
    },
    "StopReason": {
      "type": "string",
      "enum": [
        "done",
        "max_steps",
        "length",
        "timeout",
        "malformed_tool_call"
      ],
      "title": "StopReason"
    },
    "TraceEnvironmentRef": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "registry_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Registry Type"
        },
        "build_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "title": "Build Id"
        },
        "build_version": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Build Version"
        },
        "build_digest": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Build Digest"
        },
        "can_view_source": {
          "type": "boolean",
          "title": "Can View Source",
          "default": false
        }
      },
      "type": "object",
      "required": [
        "id",
        "name"
      ],
      "title": "TraceEnvironmentRef"
    },
    "TraceExecutionMode": {
      "type": "string",
      "enum": [
        "external",
        "cloud",
        "hosted"
      ],
      "title": "TraceExecutionMode"
    },
    "TraceScenarioRef": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "registry_id": {
          "type": "string",
          "format": "uuid",
          "title": "Registry Id"
        },
        "arguments": {
          "items": {
            "$ref": "#/$defs/ScenarioArgument"
          },
          "type": "array",
          "title": "Arguments"
        }
      },
      "type": "object",
      "required": [
        "id",
        "name",
        "registry_id",
        "arguments"
      ],
      "title": "TraceScenarioRef"
    },
    "TraceTaskRef": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "version_id": {
          "type": "string",
          "format": "uuid",
          "title": "Version Id"
        },
        "version_number": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Version Number"
        },
        "external_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "External Id"
        },
        "taskset_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "title": "Taskset Id"
        },
        "taskset_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Taskset Name"
        },
        "scenario": {
          "anyOf": [
            {
              "$ref": "#/$defs/TraceScenarioRef"
            },
            {
              "type": "null"
            }
          ]
        },
        "scenario_args": {
          "additionalProperties": true,
          "type": "object",
          "title": "Scenario Args"
        }
      },
      "type": "object",
      "required": [
        "id",
        "version_id"
      ],
      "title": "TraceTaskRef"
    },
    "TraceThumbnailModel": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "model_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Model Name"
        },
        "provider_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Provider Name"
        },
        "icon_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Icon Url"
        },
        "sdk_agent_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sdk Agent Type"
        }
      },
      "type": "object",
      "required": [
        "id",
        "name"
      ],
      "title": "TraceThumbnailModel"
    }
  }
}