{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/stremai-com/json-schema/stremai-com-agent-trace-detail-response-schema.json",
  "title": "AgentTraceDetailResponse",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/stremai-com-openapi.json#/components/schemas/AgentTraceDetailResponse",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id"
    },
    "session_id": {
      "type": "string",
      "title": "Session Id"
    },
    "task_hint": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Task Hint"
    },
    "status": {
      "type": "string",
      "title": "Status"
    },
    "total_steps": {
      "type": "integer",
      "title": "Total Steps"
    },
    "completed_steps": {
      "type": "integer",
      "title": "Completed Steps"
    },
    "failed_step": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Failed Step"
    },
    "total_latency_ms": {
      "type": "integer",
      "title": "Total Latency Ms"
    },
    "total_cost_usd": {
      "type": "number",
      "title": "Total Cost Usd"
    },
    "total_tokens": {
      "type": "integer",
      "title": "Total Tokens"
    },
    "eval_score": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Eval Score"
    },
    "created_at": {
      "type": "string",
      "title": "Created At"
    },
    "finalized_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Finalized At"
    },
    "steps": {
      "items": {
        "$ref": "#/$defs/AgentStepResponse"
      },
      "type": "array",
      "title": "Steps"
    },
    "eval_details": {
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Eval Details"
    }
  },
  "type": "object",
  "required": [
    "id",
    "session_id",
    "task_hint",
    "status",
    "total_steps",
    "completed_steps",
    "failed_step",
    "total_latency_ms",
    "total_cost_usd",
    "total_tokens",
    "eval_score",
    "created_at",
    "finalized_at",
    "steps",
    "eval_details"
  ],
  "$defs": {
    "AgentStepResponse": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "step_number": {
          "type": "integer",
          "title": "Step Number"
        },
        "step_type": {
          "type": "string",
          "title": "Step Type"
        },
        "model_used": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Model Used"
        },
        "tool_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tool Name"
        },
        "tool_success": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tool Success"
        },
        "input_summary": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Input Summary"
        },
        "output_summary": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Output Summary"
        },
        "latency_ms": {
          "type": "integer",
          "title": "Latency Ms"
        },
        "cost_usd": {
          "type": "number",
          "title": "Cost Usd"
        },
        "tokens_used": {
          "type": "integer",
          "title": "Tokens Used"
        },
        "status": {
          "type": "string",
          "title": "Status"
        },
        "failure_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Failure Reason"
        },
        "quality_score": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Quality Score"
        },
        "created_at": {
          "type": "string",
          "title": "Created At"
        }
      },
      "type": "object",
      "required": [
        "id",
        "step_number",
        "step_type",
        "model_used",
        "tool_name",
        "tool_success",
        "input_summary",
        "output_summary",
        "latency_ms",
        "cost_usd",
        "tokens_used",
        "status",
        "failure_reason",
        "quality_score",
        "created_at"
      ],
      "title": "AgentStepResponse"
    }
  }
}