{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/algenta-ai/json-schema/algenta-ai-decision-log-response-schema.json",
  "title": "DecisionLogResponse",
  "description": "Single decision log entry.",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/api.algenta.ai-openapi.json#/components/schemas/DecisionLogResponse",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
    },
    "org_id": {
      "type": "string",
      "format": "uuid",
      "title": "Org Id"
    },
    "run_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Run Id"
    },
    "context": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Context"
    },
    "chosen_action": {
      "type": "string",
      "title": "Chosen Action"
    },
    "options_considered": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Options Considered"
    },
    "expected_value": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Expected Value"
    },
    "confidence": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Confidence"
    },
    "rationale": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Rationale"
    },
    "risk_p5": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Risk P5"
    },
    "risk_p95": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Risk P95"
    },
    "risk_pol": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Risk Pol"
    },
    "request_hash": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Request Hash"
    },
    "result_hash": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Result Hash"
    },
    "policy_snapshot_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Policy Snapshot Id"
    },
    "schema_snapshot_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Schema Snapshot Id"
    },
    "manifest_version": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Manifest Version"
    },
    "actual_outcome": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Actual Outcome"
    },
    "outcome_delta": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Outcome Delta"
    },
    "outcome_notes": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Outcome Notes"
    },
    "outcome_recorded_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Outcome Recorded At"
    },
    "executed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Executed At"
    },
    "execution_status": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Execution Status"
    },
    "execution_webhook_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Execution Webhook Url"
    },
    "execution_response_code": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Execution Response Code"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "title": "Updated At"
    }
  },
  "type": "object",
  "required": [
    "id",
    "org_id",
    "run_id",
    "context",
    "chosen_action",
    "options_considered",
    "expected_value",
    "confidence",
    "rationale",
    "risk_p5",
    "risk_p95",
    "risk_pol",
    "request_hash",
    "result_hash",
    "policy_snapshot_id",
    "schema_snapshot_id",
    "manifest_version",
    "actual_outcome",
    "outcome_delta",
    "outcome_notes",
    "outcome_recorded_at",
    "executed_at",
    "execution_status",
    "execution_webhook_url",
    "execution_response_code",
    "created_at",
    "updated_at"
  ]
}