{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/getoneprofile-ai/json-schema/getoneprofile-ai-training-session-create-schema-schema.json",
  "title": "TrainingSessionCreateSchema",
  "description": "The agent to preview and where a new Preview takes its examples from.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/getoneprofile-ai-agent-training-api-openapi.yml#/components/schemas/TrainingSessionCreateSchema",
  "properties": {
    "saved_agent_id": {
      "description": "The library agent to preview.",
      "format": "uuid",
      "title": "Saved Agent Id",
      "type": "string"
    },
    "source": {
      "oneOf": [
        {
          "$ref": "#/$defs/TrainingTableSourceSchema"
        },
        {
          "$ref": "#/$defs/TrainingManualSourceSchema"
        }
      ],
      "title": "Source"
    }
  },
  "required": [
    "saved_agent_id",
    "source"
  ],
  "type": "object",
  "$defs": {
    "TrainingManualSourceSchema": {
      "description": "Preview examples typed by hand, one dict of input values per example.",
      "properties": {
        "kind": {
          "const": "manual",
          "default": "manual",
          "title": "Kind",
          "type": "string"
        },
        "rows": {
          "description": "One set of input values per example, in display order.",
          "items": {
            "additionalProperties": {
              "maxLength": 8000,
              "type": "string"
            },
            "propertyNames": {
              "maxLength": 100,
              "minLength": 1
            },
            "type": "object"
          },
          "maxItems": 25,
          "minItems": 1,
          "title": "Rows",
          "type": "array"
        }
      },
      "required": [
        "rows"
      ],
      "title": "TrainingManualSourceSchema",
      "type": "object"
    },
    "TrainingTableSourceSchema": {
      "description": "Preview examples read from a table, one per row.",
      "properties": {
        "input_mappings": {
          "additionalProperties": {
            "format": "uuid",
            "type": "string"
          },
          "description": "Agent input name -> the column its value is read from.",
          "maxProperties": 20,
          "propertyNames": {
            "maxLength": 100,
            "minLength": 1
          },
          "title": "Input Mappings",
          "type": "object"
        },
        "kind": {
          "const": "table",
          "default": "table",
          "title": "Kind",
          "type": "string"
        },
        "row_count": {
          "default": 10,
          "description": "How many of the table's rows to preview.",
          "maximum": 25.0,
          "minimum": 1.0,
          "title": "Row Count",
          "type": "integer"
        },
        "table_id": {
          "format": "uuid",
          "title": "Table Id",
          "type": "string"
        }
      },
      "required": [
        "table_id",
        "input_mappings"
      ],
      "title": "TrainingTableSourceSchema",
      "type": "object"
    }
  }
}