Kiln Documentation

Artifact lifecycle API schema

Look up adapter discovery and mutation, immutable exports, verified imports, audit receipts, and teacher identity fields.

Request and response shapes for listing, uploading, merging, loading, unloading, and deleting adapters; creating or deleting immutable HF/TRL exports; importing verified PEFT results; and managing teacher identities. Start with the entrypoint for your HTTP operation, then open only the definitions it references. Deletion is permanent, live adapters must be unloaded before deletion, generic upload does not provide verified HF/TRL provenance, and remote teacher registration currently supports only vLLM. Unknown-field behavior is listed per shape. The x-kiln-examples use explicit CPU and placeholder build identities so they remain illustrative payloads, not hardware receipts or backend support claims.

Schema identity

Property Value
Title Kiln Artifact Lifecycle API
$id https://ericflo.github.io/kiln/contracts/kiln-artifacts-v1.schema.json
Dialect https://json-schema.org/draft/2020-12/schema
Root type Union of 22 public entrypoints
Root object Defined by the selected entrypoint

Entrypoints

Choose the request or response shape for the operation you are implementing. Each name links to its complete field table and constraints.

Entrypoint Purpose Shape Unknown fields
AdapterDetail Adapter files plus the training, evaluation, and lineage evidence Kiln still retains. 9 fields Unknown fields rejected
AdapterUploadMultipart Generic multipart adapter upload. This route validates archive safety and adapter files but does not provide the HF/TRL export/result identity checks; use verified PEFT import for that handoff. Unknown multipart fields are consumed and ignored. 2 fields Unknown fields accepted and ignored
AdaptersResponse Current live-adapter identity and all adapter directories visible to the server. 8 fields Unknown fields rejected
DeleteAdapterResponse Confirmation of permanent adapter deletion. The route refuses a live or active adapter and also removes matching <name>-checkpoint-* directories. 2 fields Unknown fields rejected
DeleteExportResponse Confirmation that the server copy of an immutable export was permanently deleted. 2 fields Unknown fields rejected
DeleteTeacherResponse Confirmation that a teacher alias was removed from the registry. Existing adapter receipts are unchanged. 2 fields Unknown fields rejected
ExportDetail One export summary and its complete self-verifying manifest. 2 fields Unknown fields rejected
ExportList All immutable HF/TRL exports currently retained by the server. 1 field Unknown fields rejected
ExportSummary List-view identity and download path for one immutable HF/TRL export. 9 fields Unknown fields rejected
GrpoExportRequest Create an immutable recorded-GRPO handoff from exactly one source: inline groups or a canonical server-local JSONL file. 5 fields Unknown fields rejected
ImportPeftResponse Identity and size of a verified external PEFT result installed as six files in Kiln's adapter registry. 10 fields Unknown fields rejected
LoadAdapterRequest Load an installed adapter between requests. allow_quarantined explicitly overrides canary quarantine; reload re-reads and republishes the exact on-disk revision even when that adapter name is already live. 3 fields Unknown fields accepted and ignored
LoadAdapterResponse Confirmation that the named adapter revision is live. 3 fields Unknown fields rejected
MergeAdapterRequest Create a new merged adapter without replacing an existing name. density applies only to TIES and defaults to 0.2 for that mode. 4 fields Unknown fields accepted and ignored
MergeAdapterResponse Summary of the newly published merged adapter. 5 fields Unknown fields rejected
RegisterTeacherRequest Fields callers may set when registering a teacher. Kiln rejects caller-supplied identity, capabilities, and secret environment-variable names. 8 fields Unknown fields rejected
SftExportRequest Create an immutable SFT handoff from exactly one source: inline examples, a server-local file, or a registered dataset. 7 fields Unknown fields rejected
TeacherEntry Stored teacher configuration plus its resolved identity, capabilities, and current usability. 7 fields Unknown fields rejected
TeachersListResponse All teachers currently stored in the server registry. 1 field Unknown fields rejected
UnloadAdapterResponse Confirmation that no runtime adapter is loaded. 1 field Unknown fields rejected
UploadAdapterResponse Summary of an adapter archive installed without replacing an existing directory. 3 fields Unknown fields rejected
kiln_train_AdapterReceipt Legacy adapter audit receipt. It records useful provenance and diagnostics but does not contain enough identity for exact replay. 12 fields Unknown fields rejected

Composition and conditional rules

Show exact composition rules
{
  "oneOf": [
    {
      "$ref": "#/$defs/AdapterDetail"
    },
    {
      "$ref": "#/$defs/AdapterUploadMultipart"
    },
    {
      "$ref": "#/$defs/AdaptersResponse"
    },
    {
      "$ref": "#/$defs/DeleteAdapterResponse"
    },
    {
      "$ref": "#/$defs/DeleteExportResponse"
    },
    {
      "$ref": "#/$defs/DeleteTeacherResponse"
    },
    {
      "$ref": "#/$defs/ExportDetail"
    },
    {
      "$ref": "#/$defs/ExportList"
    },
    {
      "$ref": "#/$defs/ExportSummary"
    },
    {
      "$ref": "#/$defs/GrpoExportRequest"
    },
    {
      "$ref": "#/$defs/ImportPeftResponse"
    },
    {
      "$ref": "#/$defs/LoadAdapterRequest"
    },
    {
      "$ref": "#/$defs/LoadAdapterResponse"
    },
    {
      "$ref": "#/$defs/MergeAdapterRequest"
    },
    {
      "$ref": "#/$defs/MergeAdapterResponse"
    },
    {
      "$ref": "#/$defs/RegisterTeacherRequest"
    },
    {
      "$ref": "#/$defs/SftExportRequest"
    },
    {
      "$ref": "#/$defs/TeacherEntry"
    },
    {
      "$ref": "#/$defs/TeachersListResponse"
    },
    {
      "$ref": "#/$defs/UnloadAdapterResponse"
    },
    {
      "$ref": "#/$defs/UploadAdapterResponse"
    },
    {
      "$ref": "#/$defs/kiln_train_AdapterReceipt"
    }
  ]
}

Kiln contract annotations

Show exact Kiln annotations and examples
{
  "x-kiln-entrypoints": [
    "AdapterDetail",
    "AdapterUploadMultipart",
    "AdaptersResponse",
    "DeleteAdapterResponse",
    "DeleteExportResponse",
    "DeleteTeacherResponse",
    "ExportDetail",
    "ExportList",
    "ExportSummary",
    "GrpoExportRequest",
    "ImportPeftResponse",
    "LoadAdapterRequest",
    "LoadAdapterResponse",
    "MergeAdapterRequest",
    "MergeAdapterResponse",
    "RegisterTeacherRequest",
    "SftExportRequest",
    "TeacherEntry",
    "TeachersListResponse",
    "UnloadAdapterResponse",
    "UploadAdapterResponse",
    "kiln_train_AdapterReceipt"
  ],
  "x-kiln-example-boundary": "Illustrative payloads only. Example backend and build values are not runtime defaults, support predicates, qualification evidence, or benchmark receipts.",
  "x-kiln-examples": {
    "AdapterDetail": [
      {
        "name": "reasoning-v1",
        "is_active": true,
        "has_config": true,
        "has_weights": true,
        "size_bytes": 4096,
        "files": [
          {
            "name": "adapter_model.safetensors",
            "size_bytes": 3072
          }
        ],
        "training_jobs": [
          {
            "job_id": "train-1",
            "job_type": "sft",
            "state": "completed",
            "elapsed_secs": 12.5,
            "final_loss": 0.12
          }
        ],
        "eval_jobs": [
          {
            "job_id": "eval-1",
            "suite_name": "math",
            "accuracy": 0.75,
            "state": "completed"
          }
        ]
      }
    ],
    "AdapterUploadMultipart": [
      {
        "name": "reasoning-v1",
        "archive": "<binary gzip body>"
      }
    ],
    "AdaptersResponse": [
      {
        "active_adapter": "reasoning-v1",
        "active": "reasoning-v1",
        "loaded_adapter": "reasoning-v1",
        "loaded_adapter_identity": {
          "name": "reasoning-v1",
          "content_revision": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
        },
        "loaded_adapters": [
          "reasoning-v1"
        ],
        "adapter_dir": "/srv/kiln/adapters",
        "available": [
          {
            "name": "reasoning-v1",
            "has_config": true,
            "has_weights": true,
            "size_bytes": 4096,
            "modified_at": "2026-07-14T12:00:00Z",
            "files": [
              "adapter_config.json",
              "adapter_model.safetensors"
            ],
            "path": "/srv/kiln/adapters/reasoning-v1",
            "status": "loaded",
            "adapter_model_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "adapter_model_size_bytes": 3072,
            "rank": 16,
            "alpha": 32,
            "alpha_over_rank": 2,
            "target_modules": [
              "q_proj",
              "v_proj"
            ],
            "base_model_name_or_path": "Qwen/Qwen3.5-4B",
            "parent_adapter_metadata": null,
            "canary_status": "passed",
            "canary_failure_reason": null,
            "canary_warnings": [],
            "canary_checks": [
              {
                "name": "finite_logits",
                "passed": true
              }
            ],
            "canary_status_path": "/srv/kiln/adapters/reasoning-v1/adapter_canary_status.json",
            "adapter_manifest": null,
            "adapter_manifest_path": null,
            "adapter_manifest_error": null,
            "last_load_error": null,
            "error": null
          }
        ],
        "available_adapters": [
          {
            "name": "reasoning-v1",
            "has_config": true,
            "has_weights": true,
            "size_bytes": 4096,
            "modified_at": "2026-07-14T12:00:00Z",
            "files": [
              "adapter_config.json",
              "adapter_model.safetensors"
            ],
            "path": "/srv/kiln/adapters/reasoning-v1",
            "status": "loaded",
            "adapter_model_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "adapter_model_size_bytes": 3072,
            "rank": 16,
            "alpha": 32,
            "alpha_over_rank": 2,
            "target_modules": [
              "q_proj",
              "v_proj"
            ],
            "base_model_name_or_path": "Qwen/Qwen3.5-4B",
            "parent_adapter_metadata": null,
            "canary_status": "passed",
            "canary_failure_reason": null,
            "canary_warnings": [],
            "canary_checks": [
              {
                "name": "finite_logits",
                "passed": true
              }
            ],
            "canary_status_path": "/srv/kiln/adapters/reasoning-v1/adapter_canary_status.json",
            "adapter_manifest": null,
            "adapter_manifest_path": null,
            "adapter_manifest_error": null,
            "last_load_error": null,
            "error": null
          }
        ]
      }
    ],
    "DeleteAdapterResponse": [
      {
        "status": "deleted",
        "name": "reasoning-v1"
      }
    ],
    "DeleteExportResponse": [
      {
        "status": "deleted",
        "name": "math-sft-v1"
      }
    ],
    "DeleteTeacherResponse": [
      {
        "status": "deleted",
        "alias": "fixture-teacher"
      }
    ],
    "ExportDetail": [
      {
        "summary": {
          "name": "math-sft-v1",
          "task": "sft",
          "export_sha256": "sha256:3333333333333333333333333333333333333333333333333333333333333333",
          "source_name": "inline",
          "row_count": 1,
          "ordered_corpus_sha256": "sha256:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
          "input_adapter": null,
          "bundle_filename": "math-sft-v1.kiln-hf",
          "download_url": "/v1/train/hf/exports/math-sft-v1/download"
        },
        "manifest": {
          "schema_version": 1,
          "manifest_type": "kiln.hf-trl-export.v1",
          "task": "sft",
          "source_execution_provenance": {
            "schema_version": 1,
            "provenance_type": "kiln.execution-provenance.v1",
            "backend": {
              "name": "cpu",
              "device": "cpu",
              "numerical_runtime_sha256": "sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"
            },
            "build": {
              "package_version": "0.0.0",
              "target": "example-target-triple",
              "executable_sha256": "sha256:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
            },
            "model": {
              "model_config_sha256": "sha256:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "tokenizer_vocab_sha256": "sha256:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
              "tokenizer_config_sha256": "sha256:1111111111111111111111111111111111111111111111111111111111111111",
              "chat_template_sha256": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
              "training_chat_template_sha256": "sha256:3333333333333333333333333333333333333333333333333333333333333333"
            },
            "precision": {
              "inference_dtype": "bf16",
              "training_policy": "bf16"
            },
            "kernels": {
              "contract_type": "kiln.kernel-contract.v1",
              "versions": {
                "kiln": "0.0.0"
              },
              "compiled_features": [],
              "contract_sha256": "sha256:4444444444444444444444444444444444444444444444444444444444444444"
            },
            "configuration": {
              "effective_server_config_sha256": "sha256:5555555555555555555555555555555555555555555555555555555555555555",
              "effective_environment_sha256": "sha256:6666666666666666666666666666666666666666666666666666666666666666"
            },
            "provenance_sha256": "sha256:7777777777777777777777777777777777777777777777777777777777777777"
          },
          "model": {
            "served_model_id": "Qwen/Qwen3.5-4B",
            "base_weight_shard_manifest": {
              "schema_version": 1,
              "manifest_type": "kiln.base-weight-shards.v1",
              "aggregate_algorithm": "kiln.base-model-content.v1",
              "aggregate_sha256": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
              "total_size_bytes": 1024,
              "shards": [
                {
                  "filename": "model.safetensors",
                  "size_bytes": 1024,
                  "sha256": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
                }
              ]
            },
            "tokenizer_vocab_sha256": "sha256:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
            "model_config": {
              "relative_path": "kiln_model_config.json",
              "size_bytes": 128,
              "sha256": "sha256:8888888888888888888888888888888888888888888888888888888888888888"
            },
            "tokenizer": {
              "relative_path": "tokenizer.json",
              "size_bytes": 128,
              "sha256": "sha256:9999999999999999999999999999999999999999999999999999999999999999"
            },
            "chat_template": {
              "relative_path": "chat_template.jinja",
              "size_bytes": 128,
              "sha256": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
            },
            "native_training_chat_template": {
              "relative_path": "kiln_training_chat_template.jinja",
              "size_bytes": 128,
              "sha256": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
            },
            "trl_training_chat_template": {
              "relative_path": "training_chat_template.jinja",
              "size_bytes": 128,
              "sha256": "sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"
            }
          },
          "data": {
            "source_name": "inline",
            "format": "sft_messages_jsonl",
            "row_count": 1,
            "ordered_corpus_sha256": "sha256:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
            "dataset": {
              "relative_path": "train.jsonl",
              "size_bytes": 128,
              "sha256": "sha256:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
            },
            "sft_selection": {
              "invalid_row_policy": "fail",
              "label_policy": "assistant_only_generation_spans",
              "rows_read": 1,
              "rows_kept": 1,
              "rows_rejected": 0,
              "kept_corpus_sha256": "sha256:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
              "ingestion_receipt": {
                "relative_path": "sft_ingestion.json",
                "size_bytes": 128,
                "sha256": "sha256:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
              }
            }
          },
          "reference_script": {
            "relative_path": "train.py",
            "size_bytes": 128,
            "sha256": "sha256:1111111111111111111111111111111111111111111111111111111111111111"
          },
          "environment_lock": {
            "relative_path": "requirements.lock",
            "size_bytes": 128,
            "sha256": "sha256:2222222222222222222222222222222222222222222222222222222222222222"
          },
          "export_sha256": "sha256:3333333333333333333333333333333333333333333333333333333333333333"
        }
      }
    ],
    "ExportList": [
      {
        "data": [
          {
            "name": "math-sft-v1",
            "task": "sft",
            "export_sha256": "sha256:3333333333333333333333333333333333333333333333333333333333333333",
            "source_name": "inline",
            "row_count": 1,
            "ordered_corpus_sha256": "sha256:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
            "input_adapter": null,
            "bundle_filename": "math-sft-v1.kiln-hf",
            "download_url": "/v1/train/hf/exports/math-sft-v1/download"
          }
        ]
      }
    ],
    "ExportSummary": [
      {
        "name": "math-sft-v1",
        "task": "sft",
        "export_sha256": "sha256:3333333333333333333333333333333333333333333333333333333333333333",
        "source_name": "inline",
        "row_count": 1,
        "ordered_corpus_sha256": "sha256:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
        "input_adapter": null,
        "bundle_filename": "math-sft-v1.kiln-hf",
        "download_url": "/v1/train/hf/exports/math-sft-v1/download"
      }
    ],
    "GrpoExportRequest": [
      {
        "name": "math-grpo-v1",
        "groups": [
          {
            "messages": [
              {
                "role": "user",
                "content": "What is 2 + 2?"
              }
            ],
            "completions": [
              {
                "text": "4",
                "reward": 1,
                "provenance": {
                  "schema": "kiln.rollout-provenance.v1",
                  "input_token_ids": [
                    1,
                    4
                  ],
                  "prompt_token_count": 1,
                  "prompt_messages_sha256": "sha256:8888888888888888888888888888888888888888888888888888888888888888",
                  "scored_payload_sha256": "sha256:9999999999999999999999999999999999999999999999999999999999999999",
                  "action_tokens": [
                    {
                      "sequence_index": 1,
                      "token_id": 4,
                      "source": "sampled",
                      "behavior_logprob": -0.25
                    }
                  ],
                  "behavior_policy": {
                    "served_model_id": "Qwen/Qwen3.5-4B",
                    "base_model_sha256": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "inference_config_sha256": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
                    "implementation": "kiln/cpu"
                  },
                  "tokenizer": {
                    "vocab_sha256": "sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
                    "config_sha256": "sha256:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
                    "chat_template_sha256": "sha256:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
                  },
                  "sampling": {
                    "temperature": 0.8,
                    "top_p": 0.95,
                    "top_k": 20,
                    "min_p": 0,
                    "max_tokens": 64,
                    "repetition_penalty": 1,
                    "presence_penalty": 0,
                    "frequency_penalty": 0,
                    "stop": []
                  },
                  "seed": 42,
                  "generation_backend": "cpu"
                }
              },
              {
                "text": "5",
                "reward": 0,
                "provenance": {
                  "schema": "kiln.rollout-provenance.v1",
                  "input_token_ids": [
                    1,
                    5
                  ],
                  "prompt_token_count": 1,
                  "prompt_messages_sha256": "sha256:8888888888888888888888888888888888888888888888888888888888888888",
                  "scored_payload_sha256": "sha256:9999999999999999999999999999999999999999999999999999999999999999",
                  "action_tokens": [
                    {
                      "sequence_index": 1,
                      "token_id": 5,
                      "source": "sampled",
                      "behavior_logprob": -0.25
                    }
                  ],
                  "behavior_policy": {
                    "served_model_id": "Qwen/Qwen3.5-4B",
                    "base_model_sha256": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "inference_config_sha256": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
                    "implementation": "kiln/cpu"
                  },
                  "tokenizer": {
                    "vocab_sha256": "sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
                    "config_sha256": "sha256:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
                    "chat_template_sha256": "sha256:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
                  },
                  "sampling": {
                    "temperature": 0.8,
                    "top_p": 0.95,
                    "top_k": 20,
                    "min_p": 0,
                    "max_tokens": 64,
                    "repetition_penalty": 1,
                    "presence_penalty": 0,
                    "frequency_penalty": 0,
                    "stop": []
                  },
                  "seed": 43,
                  "generation_backend": "cpu"
                }
              }
            ]
          }
        ]
      }
    ],
    "ImportPeftResponse": [
      {
        "status": "imported",
        "name": "math-sft-result",
        "task": "sft",
        "export_sha256": "sha256:3333333333333333333333333333333333333333333333333333333333333333",
        "result_sha256": "sha256:4444444444444444444444444444444444444444444444444444444444444444",
        "import_sha256": "sha256:5555555555555555555555555555555555555555555555555555555555555555",
        "content_revision": "6666666666666666666666666666666666666666666666666666666666666666",
        "used_exported_reference_script": true,
        "size_bytes": 4096,
        "files": 6
      }
    ],
    "LoadAdapterRequest": [
      {
        "name": "reasoning-v1"
      },
      {
        "name": "reasoning-v1",
        "reload": true
      }
    ],
    "LoadAdapterResponse": [
      {
        "status": "loaded",
        "name": "reasoning-v1",
        "content_revision": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
      }
    ],
    "MergeAdapterRequest": [
      {
        "sources": [
          {
            "name": "math-v1",
            "weight": 0.6
          },
          {
            "name": "code-v1",
            "weight": 0.4
          }
        ],
        "output_name": "blended-v1",
        "mode": "weighted_average"
      }
    ],
    "MergeAdapterResponse": [
      {
        "status": "merged",
        "output_name": "blended-v1",
        "mode": "weighted_average",
        "sources": [
          {
            "name": "math-v1",
            "weight": 0.6
          },
          {
            "name": "code-v1",
            "weight": 0.4
          }
        ],
        "num_tensors": 64
      }
    ],
    "RegisterTeacherRequest": [
      {
        "alias": "fixture-teacher",
        "kind": "fixture",
        "model_id": "fixture/model",
        "notes": "deterministic local fixture"
      }
    ],
    "SftExportRequest": [
      {
        "name": "math-sft-v1",
        "examples": [
          {
            "messages": [
              {
                "role": "user",
                "content": "What is 2 + 2?"
              },
              {
                "role": "assistant",
                "content": "4"
              }
            ]
          }
        ],
        "invalid_row_policy": "fail"
      }
    ],
    "TeacherEntry": [
      {
        "spec": {
          "alias": "fixture-teacher",
          "kind": "fixture",
          "provider": null,
          "model_id": "fixture/model",
          "max_top_k": 20,
          "vocab_size": 248320,
          "supports_full_vocab": false,
          "tokenizer_hash": null,
          "url": null,
          "notes": "deterministic local fixture",
          "adapter": null
        },
        "capabilities": {
          "teacher_id": "fixture-teacher",
          "vocab_size": 248320,
          "max_top_k": 20,
          "supports_full_vocab": false,
          "supports_batched": true,
          "tokenizer_hash": null
        },
        "status": "configured",
        "usable": true
      }
    ],
    "TeachersListResponse": [
      {
        "teachers": [
          {
            "spec": {
              "alias": "fixture-teacher",
              "kind": "fixture",
              "provider": null,
              "model_id": "fixture/model",
              "max_top_k": 20,
              "vocab_size": 248320,
              "supports_full_vocab": false,
              "tokenizer_hash": null,
              "url": null,
              "notes": "deterministic local fixture",
              "adapter": null
            },
            "capabilities": {
              "teacher_id": "fixture-teacher",
              "vocab_size": 248320,
              "max_top_k": 20,
              "supports_full_vocab": false,
              "supports_batched": true,
              "tokenizer_hash": null
            },
            "status": "configured",
            "usable": true
          }
        ]
      }
    ],
    "UnloadAdapterResponse": [
      {
        "status": "unloaded"
      }
    ],
    "UploadAdapterResponse": [
      {
        "name": "reasoning-v1",
        "size_bytes": 4096,
        "files": 2
      }
    ],
    "kiln_train_AdapterReceipt": [
      {
        "schema_version": 1,
        "adapter": "reasoning-v1",
        "produced_at": "2026-07-14T12:00:00Z",
        "kiln_version": "0.1.0",
        "kernel_versions": {
          "kiln-opd-loss-kernel": "0.1.0"
        },
        "seed": 42,
        "source_kind": "sft",
        "hyperparameters": {
          "rank": 16
        },
        "diagnostic_summary": {
          "final_loss": 0.12
        },
        "post_eval": {
          "math": 0.75
        }
      }
    ]
  },
  "x-kiln-external-contracts": [
    "kiln-observability-v1.schema.json",
    "kiln-inference-v1.schema.json"
  ],
  "x-kiln-field-schema-status": "complete"
}

Definitions

AdapterCanaryCheckReceiptOutcome of one adapter canary or smoke check.3 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
name yes NonEmptyString - Name. A text string containing at least one character.
passed yes Boolean - Passed. Either true or false.
failure_reason no NonEmptyString - Failure reason. A text string containing at least one character.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "kiln_train::AdapterCanaryCheckReceipt"
}
AdapterCanaryStatusResult of the adapter's latest recorded canary check.0 fields

Type: string. Constraints: enum "unknown", "passed", "quarantined".

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "String"
}
AdapterDetailAdapter files plus the training, evaluation, and lineage evidence Kiln still retains.9 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
name yes AdapterName - Name. An adapter registry name: non-empty, relative, not dot-prefixed, and without separators or ... The generic adapter routes currently impose no byte limit or control-character restriction.
is_active yes Boolean - Is active. Either true or false.
has_config yes Boolean - Has config. Either true or false.
has_weights yes Boolean - Has weights. Either true or false.
size_bytes yes NonNegativeInteger - Size bytes. A whole number greater than or equal to zero.
files yes array<AdapterFileEntry> - Files.
training_jobs yes array<AdapterLinkedJob> - Training jobs.
eval_jobs yes array<AdapterLinkedEval> - Eval jobs.
lineage no AnyJson - Lineage. Any valid JSON value; Kiln does not interpret its nested fields here.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "AdapterDetail"
}
AdapterDiskEntryOne adapter directory discovered by Kiln, including directories it classifies as invalid or quarantined.26 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
name yes AdapterName - Name. An adapter registry name: non-empty, relative, not dot-prefixed, and without separators or ... The generic adapter routes currently impose no byte limit or control-character restriction.
has_config yes Boolean - Has config. Either true or false.
has_weights yes Boolean - Has weights. Either true or false.
size_bytes yes NonNegativeInteger - Size bytes. A whole number greater than or equal to zero.
modified_at yes Rfc3339Timestamp | null - Modified at.
files yes array<String> - Files.
path yes NonEmptyString | null - Path.
status yes AdapterRegistryStatus - Status. How Kiln currently classifies an adapter directory.
adapter_model_sha256 yes RawSha256 | null - Adapter model SHA-256.
adapter_model_size_bytes yes NonNegativeInteger | null - Adapter model size bytes.
rank yes NonNegativeInteger | null - Rank.
alpha yes FiniteNumber | null - Alpha.
alpha_over_rank yes FiniteNumber | null - Alpha over rank.
target_modules yes array<String> - Target modules.
base_model_name_or_path yes NonEmptyString | null - Base model name or path.
parent_adapter_metadata yes AnyJson | null - Parent adapter metadata.
canary_status yes AdapterCanaryStatus - Canary status. Result of the adapter's latest recorded canary check.
canary_failure_reason yes NonEmptyString | null - Canary failure reason.
canary_warnings yes array<String> - Canary warnings.
canary_checks yes array<AdapterCanaryCheckReceipt> - Canary checks.
canary_status_path yes NonEmptyString | null - Canary status path.
adapter_manifest yes AdapterManifest | null - Adapter manifest.
adapter_manifest_path yes NonEmptyString | null - Adapter manifest path.
adapter_manifest_error yes NonEmptyString | null - Adapter manifest error.
last_load_error yes NonEmptyString | null - Last load error.
error yes NonEmptyString | null - Error.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "AdapterDiskEntry"
}
AdapterFileEntryOne regular file stored in an adapter directory.2 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
name yes NonEmptyString - Name. A text string containing at least one character.
size_bytes yes NonNegativeInteger - Size bytes. A whole number greater than or equal to zero.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "AdapterFileEntry"
}
AdapterLinkedEvalRetained summary of an evaluation linked to the adapter.4 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
job_id yes NonEmptyString - Job ID. A text string containing at least one character.
suite_name yes NonEmptyString - Suite name. A text string containing at least one character.
accuracy yes FiniteNumber | null - Accuracy.
state yes EvalJobState - State. An evaluation job lifecycle state.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "AdapterLinkedEval"
}
AdapterLinkedJobRetained summary of a training job that produced or used the adapter.5 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
job_id yes NonEmptyString - Job ID. A text string containing at least one character.
job_type yes TrainingJobType - Job type. The native training workflow that produced a linked job.
state yes TrainingState - State. Training-job lifecycle state. Cancelled training jobs are represented as failed with a cancellation error.
elapsed_secs yes number minimum 0 Elapsed secs.
final_loss yes FiniteNumber | null - Final loss.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "AdapterLinkedJob"
}
AdapterManifestContent, lineage, model, and training identity recorded for an installed adapter.18 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
schema_version yes any const 1 Schema version.
manifest_type yes any const "kiln_adapter_manifest" Manifest type.
adapter_name yes AdapterName - Adapter name. An adapter registry name: non-empty, relative, not dot-prefixed, and without separators or ... The generic adapter routes currently impose no byte limit or control-character restriction.
safetensors_hash yes Sha256 - Safetensors hash. A lowercase SHA-256 digest prefixed with sha256:.
config_hash yes Sha256 - Config hash. A lowercase SHA-256 digest prefixed with sha256:.
receipt_hash yes Sha256 | null - Receipt hash.
parent_adapter yes NonEmptyString | null - Parent adapter.
model_config_hash yes Sha256 | null - Model config hash.
training_chat_template_hash no Sha256 - Training chat template hash. A lowercase SHA-256 digest prefixed with sha256:.
base_weight_shard_manifest no BaseWeightShardManifest - Base weight shard manifest. See kiln-observability-v1.schema.json#/$defs/BaseWeightShardManifest.
execution_provenance no ExecutionProvenanceV1 - Execution provenance. See kiln-observability-v1.schema.json#/$defs/ExecutionProvenanceV1.
training_precision no TrainingCheckpointPrecision - Training precision. The exact precision policy recorded by a native training checkpoint.
kiln_commit yes NonEmptyString | null - Kiln commit.
training_data_hash yes Sha256 | null - Training data hash.
training_data_source yes NonEmptyString | null - Training data source.
training_data_path yes NonEmptyString | null - Training data path.
openenv_training_data no OpenEnvTrainingDataProvenanceV1 - Openenv training data. Validated semantic identity for an all-OpenEnv GRPO training corpus.
files yes AdapterManifestFiles - Files. Canonical adapter filenames bound by the manifest.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "kiln_train::AdapterManifest"
}
AdapterManifestFilesCanonical adapter filenames bound by the manifest.3 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
adapter_model yes NonEmptyString - Adapter model. A text string containing at least one character.
adapter_config yes NonEmptyString - Adapter config. A text string containing at least one character.
train_receipt yes NonEmptyString | null - Train receipt.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "kiln_train::AdapterManifestFiles"
}
AdapterNameAn adapter registry name: non-empty, relative, not dot-prefixed, and without separators or `..`. The generic adapter routes currently impose no byte limit or control-character restriction.0 fields

Type: string. Constraints: minimum length 1; pattern ^(?!.)(?![\s\S]..)(?![\s\S][\/])[\s\S]+$.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-runtime-footgun": "adapter names currently have no byte limit or control-character restriction",
  "x-kiln-rust-type": "String"
}
AdapterRegistryStatusHow Kiln currently classifies an adapter directory.0 fields

Type: string. Constraints: enum "loaded", "available", "quarantined", "invalid".

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "String"
}
AdapterUploadMultipartGeneric multipart adapter upload. This route validates archive safety and adapter files but does not provide the HF/TRL export/result identity checks; use verified PEFT import for that handoff. Unknown multipart fields are consumed and ignored.2 fields

Type: object.

Field Required Type Constraints and default Description
name yes AdapterName - Name. An adapter registry name: non-empty, relative, not dot-prefixed, and without separators or ... The generic adapter routes currently impose no byte limit or control-character restriction.
archive yes string format binary; content media type application/gzip Archive.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-max-body-bytes": 2147483648,
  "x-kiln-max-extracted-bytes": 4294967296,
  "x-kiln-max-extracted-entries": 100000,
  "x-kiln-rust-type": "AdapterUploadMultipart",
  "x-kiln-unknown-field-policy": "accepted_and_ignored"
}
AdaptersResponseCurrent live-adapter identity and all adapter directories visible to the server.8 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
active_adapter yes NonEmptyString | null - Active adapter.
active yes NonEmptyString | null - Active.
loaded_adapter yes NonEmptyString | null - Loaded adapter.
loaded_adapter_identity yes LoadedAdapterIdentity | null - Loaded adapter identity.
loaded_adapters yes array<NonEmptyString> - Loaded adapters.
adapter_dir yes NonEmptyString - Adapter dir. A text string containing at least one character.
available yes array<AdapterDiskEntry> - Available.
available_adapters yes array<AdapterDiskEntry> - Available adapters.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "AdaptersResponse"
}
AgenticGroupOne prompt and 2–1,024 provenance-complete scored rollouts. `rollouts` is an input alias for `completions`.3 fields

Type: object.

Field Required Type Constraints and default Description
messages yes array<TrainingChatMessage> minimum items 1 Messages.
completions no array<ScoredRollout & any> minimum items 2; maximum items 1024 Completions.
rollouts no array<ScoredRollout & any> minimum items 2; maximum items 1024 Rollouts.

Composition and conditional rules

The following JSON is copied exactly from this schema node.

{
  "oneOf": [
    {
      "required": [
        "completions"
      ]
    },
    {
      "required": [
        "rollouts"
      ]
    }
  ]
}

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "kiln_train::GrpoGroup",
  "x-kiln-unknown-field-policy": "accepted_and_ignored"
}
AnyJsonAny valid JSON value; Kiln does not interpret its nested fields here.0 fields

Type: any.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "serde_json::Value"
}
BooleanEither true or false.0 fields

Type: boolean.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "bool"
}
DecimalU64An unsigned 64-bit integer encoded as decimal text to preserve exact values.0 fields

Type: string. Constraints: pattern ^(0|[1-9][0-9]*)$.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "u64"
}
DeleteAdapterResponseConfirmation of permanent adapter deletion. The route refuses a live or active adapter and also removes matching `<name>-checkpoint-*` directories.2 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
status yes any const "deleted" Status.
name yes AdapterName - Name. An adapter registry name: non-empty, relative, not dot-prefixed, and without separators or ... The generic adapter routes currently impose no byte limit or control-character restriction.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "DeleteAdapterResponse"
}
DeleteExportResponseConfirmation that the server copy of an immutable export was permanently deleted.2 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
status yes any const "deleted" Status.
name yes ExportName - Name. A server-owned HF/TRL export name: 1–128 ASCII characters, beginning with a letter or number and containing only letters, numbers, hyphens, or underscores.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "DeleteExportResponse"
}
DeleteTeacherResponseConfirmation that a teacher alias was removed from the registry. Existing adapter receipts are unchanged.2 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
status yes any const "deleted" Status.
alias yes NonEmptyString - Alias. A text string containing at least one character.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "DeleteTeacherResponse"
}
DiagnosticSummaryHigh-level diagnostics retained after an adapter training run.5 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
overlap_ratio_final no FiniteNumber - Overlap ratio final. A finite JSON number.
rep_rate_max no FiniteNumber - Rep rate max. A finite JSON number.
guardrail_triggers no array<String> - Guardrail triggers.
final_loss no FiniteNumber - Final loss. A finite JSON number.
echo no EchoDiagnosticSummary - Echo. ECHO measurements retained in an adapter receipt.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "kiln_train::DiagnosticSummary"
}
EchoDiagnosticSummaryECHO measurements retained in an adapter receipt.8 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
lambda yes FiniteNumber - Lambda. A finite JSON number.
env_ce_initial no FiniteNumber - Env ce initial. A finite JSON number.
env_ce_final no FiniteNumber - Env ce final. A finite JSON number.
env_ce_drop_pct no FiniteNumber - Env ce drop pct. A finite JSON number.
lambda_effective_final no FiniteNumber - Lambda effective final. A finite JSON number.
env_tokens_supervised yes NonNegativeInteger - Env tokens supervised. A whole number greater than or equal to zero.
dynamics_holdout_ce_initial no FiniteNumber - Dynamics holdout ce initial. A finite JSON number.
dynamics_holdout_ce_final no FiniteNumber - Dynamics holdout ce final. A finite JSON number.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "kiln_train::EchoDiagnosticSummary"
}
EvalJobStateAn evaluation job lifecycle state.0 fields

Type: string. Constraints: enum "queued", "running", "completed", "failed", "cancelled".

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "kiln_eval::EvalJobState"
}
ExportDetailOne export summary and its complete self-verifying manifest.2 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
summary yes ExportSummary - Summary. List-view identity and download path for one immutable HF/TRL export.
manifest yes HfTrlExportManifestV1 - Manifest. Self-verifying identity of one immutable Kiln-to-HF/TRL export directory.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "ExportDetail"
}
ExportListAll immutable HF/TRL exports currently retained by the server.1 field

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
data yes array<ExportSummary> - Data.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "ExportList"
}
ExportNameA server-owned HF/TRL export name: 1–128 ASCII characters, beginning with a letter or number and containing only letters, numbers, hyphens, or underscores.0 fields

Type: string. Constraints: minimum length 1; maximum length 128; pattern ^[A-Za-z0-9][A-Za-z0-9_-]*$.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "String"
}
ExportSummaryList-view identity and download path for one immutable HF/TRL export.9 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
name yes ExportName - Name. A server-owned HF/TRL export name: 1–128 ASCII characters, beginning with a letter or number and containing only letters, numbers, hyphens, or underscores.
task yes HfTrlTask - Task. The external HF/TRL training task.
export_sha256 yes Sha256 - Export SHA-256. A lowercase SHA-256 digest prefixed with sha256:.
source_name yes NonEmptyString - Source name. A text string containing at least one character.
row_count yes PositiveInteger - Row count. A whole number greater than or equal to one.
ordered_corpus_sha256 yes Sha256 - Ordered corpus SHA-256. A lowercase SHA-256 digest prefixed with sha256:.
input_adapter yes AdapterName | null - Input adapter.
bundle_filename yes NonEmptyString - Bundle filename. A text string containing at least one character.
download_url yes NonEmptyString - Download URL. A text string containing at least one character.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "ExportSummary"
}
FiniteNumberA finite JSON number.0 fields

Type: number.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "f32 | f64"
}
GrpoExportRequestCreate an immutable recorded-GRPO handoff from exactly one source: inline groups or a canonical server-local JSONL file.5 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
name yes ExportName - Name. A server-owned HF/TRL export name: 1–128 ASCII characters, beginning with a letter or number and containing only letters, numbers, hyphens, or underscores.
groups no array<AgenticGroup> maximum items 10000000 Groups.
dataset_path no NonEmptyString | null - Dataset path.
input_adapter no AdapterName | null - Input adapter.
split_manifest no AnyJson | null - Split manifest.

Composition and conditional rules

The following JSON is copied exactly from this schema node.

{
  "oneOf": [
    {
      "required": [
        "groups"
      ],
      "properties": {
        "groups": {
          "minItems": 1
        },
        "dataset_path": {
          "type": "null"
        }
      }
    },
    {
      "required": [
        "dataset_path"
      ],
      "properties": {
        "groups": {
          "maxItems": 0
        },
        "dataset_path": {
          "type": "string",
          "minLength": 1
        }
      }
    }
  ]
}

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "GrpoExportRequest"
}
HfTrlDataExportDataset file identity and either SFT selection evidence or the recorded-GRPO provenance contract.8 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
source_name yes NonEmptyString - Source name. A text string containing at least one character.
format yes HfTrlDatasetFormat - Format. The exported JSONL row format.
row_count yes PositiveInteger - Row count. A whole number greater than or equal to one.
ordered_corpus_sha256 yes Sha256 - Ordered corpus SHA-256. A lowercase SHA-256 digest prefixed with sha256:.
dataset yes HfTrlFileIdentity & object - Dataset.
sft_selection no HfTrlSftSelection - SFT selection. SFT admission counts, row policy, corpus digest, and ingestion-receipt identity.
rollout_provenance_schema no NonEmptyString - Rollout provenance schema. A text string containing at least one character.
split_manifest no HfTrlFileIdentity & object - Split manifest.

Composition and conditional rules

The following JSON is copied exactly from this schema node.

{
  "allOf": [
    {
      "if": {
        "properties": {
          "format": {
            "const": "sft_messages_jsonl"
          }
        }
      },
      "then": {
        "required": [
          "sft_selection"
        ],
        "not": {
          "required": [
            "rollout_provenance_schema"
          ]
        }
      },
      "else": {
        "required": [
          "rollout_provenance_schema"
        ],
        "properties": {
          "rollout_provenance_schema": {
            "const": "kiln.rollout-provenance.v1"
          }
        },
        "not": {
          "required": [
            "sft_selection"
          ]
        }
      }
    }
  ]
}

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "kiln_train::HfTrlDataExport"
}
HfTrlDatasetFormatThe exported JSONL row format.0 fields

Type: string. Constraints: enum "sft_messages_jsonl", "grpo_groups_jsonl".

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "HfTrlDatasetFormat"
}
HfTrlExportManifestV1Self-verifying identity of one immutable Kiln-to-HF/TRL export directory.10 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
schema_version yes any const 1 Schema version.
manifest_type yes any const "kiln.hf-trl-export.v1" Manifest type.
task yes HfTrlTask - Task. The external HF/TRL training task.
source_execution_provenance yes ExecutionProvenanceV1 - Source execution provenance. See kiln-observability-v1.schema.json#/$defs/ExecutionProvenanceV1.
model yes HfTrlModelIdentity - Model. Resident model, tokenizer, and template identities the external trainer must match.
data yes HfTrlDataExport - Data. Dataset file identity and either SFT selection evidence or the recorded-GRPO provenance contract.
reference_script yes HfTrlFileIdentity & object - Reference script.
environment_lock yes HfTrlFileIdentity & object - Environment lock.
input_adapter no HfTrlInputAdapter - Input adapter. Optional input adapter copied into the bundle with its exact configuration and weights.
export_sha256 yes Sha256 - Export SHA-256. A lowercase SHA-256 digest prefixed with sha256:.

Composition and conditional rules

The following JSON is copied exactly from this schema node.

{
  "allOf": [
    {
      "if": {
        "properties": {
          "task": {
            "const": "sft"
          }
        }
      },
      "then": {
        "properties": {
          "data": {
            "properties": {
              "format": {
                "const": "sft_messages_jsonl"
              }
            }
          }
        }
      },
      "else": {
        "properties": {
          "data": {
            "properties": {
              "format": {
                "const": "grpo_groups_jsonl"
              }
            }
          }
        }
      }
    }
  ]
}

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "kiln_train::HfTrlExportManifestV1",
  "x-kiln-semantic-constraints": [
    "model file identities match source_execution_provenance.model",
    "base_weight_shard_manifest matches source_execution_provenance model content",
    "export_sha256 matches the canonical manifest digest"
  ]
}
HfTrlFileIdentityRelative path, byte length, and SHA-256 identity for one regular file in an interoperability bundle.3 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
relative_path yes NonEmptyString - Relative path. A text string containing at least one character.
size_bytes yes PositiveInteger - Size bytes. A whole number greater than or equal to one.
sha256 yes Sha256 - SHA-256. A lowercase SHA-256 digest prefixed with sha256:.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "kiln_train::HfTrlFileIdentity"
}
HfTrlInputAdapterOptional input adapter copied into the bundle with its exact configuration and weights.4 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
name yes AdapterName - Name. An adapter registry name: non-empty, relative, not dot-prefixed, and without separators or ... The generic adapter routes currently impose no byte limit or control-character restriction.
config yes HfTrlFileIdentity & object - Config.
model yes HfTrlFileIdentity & object - Model.
kiln_manifest no HfTrlFileIdentity & object - Kiln manifest.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "kiln_train::HfTrlInputAdapter"
}
HfTrlModelIdentityResident model, tokenizer, and template identities the external trainer must match.8 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
served_model_id yes NonEmptyString - Served model ID. A text string containing at least one character.
base_weight_shard_manifest yes BaseWeightShardManifest - Base weight shard manifest. See kiln-observability-v1.schema.json#/$defs/BaseWeightShardManifest.
tokenizer_vocab_sha256 yes Sha256 - Tokenizer vocab SHA-256. A lowercase SHA-256 digest prefixed with sha256:.
model_config yes HfTrlFileIdentity & object - Model config.
tokenizer yes HfTrlFileIdentity & object - Tokenizer.
chat_template yes HfTrlFileIdentity & object - Chat template.
native_training_chat_template yes HfTrlFileIdentity & object - Native training chat template.
trl_training_chat_template yes HfTrlFileIdentity & object - Trl training chat template.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "kiln_train::HfTrlModelIdentity"
}
HfTrlSftLabelPolicyHow the exported SFT template selects labels.0 fields

Type: string. Constraints: enum "assistant_only_generation_spans".

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "HfTrlSftLabelPolicy"
}
HfTrlSftSelectionSFT admission counts, row policy, corpus digest, and ingestion-receipt identity.7 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
invalid_row_policy yes SftInvalidRowPolicy - Invalid row policy. Whether an invalid SFT row rejects the export or is skipped and recorded.
label_policy yes HfTrlSftLabelPolicy - Label policy. How the exported SFT template selects labels.
rows_read yes PositiveInteger - Rows read. A whole number greater than or equal to one.
rows_kept yes PositiveInteger - Rows kept. A whole number greater than or equal to one.
rows_rejected yes NonNegativeInteger - Rows rejected. A whole number greater than or equal to zero.
kept_corpus_sha256 yes Sha256 - Kept corpus SHA-256. A lowercase SHA-256 digest prefixed with sha256:.
ingestion_receipt yes HfTrlFileIdentity & object - Ingestion receipt.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "kiln_train::HfTrlSftSelection",
  "x-kiln-semantic-constraints": [
    "rows_read = rows_kept + rows_rejected"
  ]
}
HfTrlTaskThe external HF/TRL training task.0 fields

Type: string. Constraints: enum "sft", "grpo".

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "kiln_train::HfTrlTask"
}
ImportAdapterNameA path-safe adapter name accepted by verified HF/TRL PEFT import: 1–128 ASCII characters with no consecutive periods.0 fields

Type: string. Constraints: minimum length 1; maximum length 128; pattern ^A-Za-z0-9*$.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "String"
}
ImportPeftResponseIdentity and size of a verified external PEFT result installed as six files in Kiln's adapter registry.10 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
status yes any const "imported" Status.
name yes ImportAdapterName - Name. A path-safe adapter name accepted by verified HF/TRL PEFT import: 1–128 ASCII characters with no consecutive periods.
task yes HfTrlTask - Task. The external HF/TRL training task.
export_sha256 yes Sha256 - Export SHA-256. A lowercase SHA-256 digest prefixed with sha256:.
result_sha256 yes Sha256 - Result SHA-256. A lowercase SHA-256 digest prefixed with sha256:.
import_sha256 yes Sha256 - Import SHA-256. A lowercase SHA-256 digest prefixed with sha256:.
content_revision yes RawSha256 - Content revision. A raw lowercase 64-character SHA-256 digest.
used_exported_reference_script yes Boolean - Used exported reference script. Either true or false.
size_bytes yes PositiveInteger - Size bytes. A whole number greater than or equal to one.
files yes PositiveInteger - Files. A whole number greater than or equal to one.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "ImportPeftResponse"
}
LoadAdapterRequestLoad an installed adapter between requests. `allow_quarantined` explicitly overrides canary quarantine; `reload` re-reads and republishes the exact on-disk revision even when that adapter name is already live.3 fields

Type: object.

Field Required Type Constraints and default Description
name yes AdapterName - Name. An adapter registry name: non-empty, relative, not dot-prefixed, and without separators or ... The generic adapter routes currently impose no byte limit or control-character restriction.
allow_quarantined no boolean default false Allow quarantined.
reload no boolean default false Reload.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "LoadAdapterRequest",
  "x-kiln-unknown-field-policy": "accepted_and_ignored"
}
LoadAdapterResponseConfirmation that the named adapter revision is live.3 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
status yes any const "loaded" Status.
name yes AdapterName - Name. An adapter registry name: non-empty, relative, not dot-prefixed, and without separators or ... The generic adapter routes currently impose no byte limit or control-character restriction.
content_revision yes RawSha256 - Content revision. A raw lowercase 64-character SHA-256 digest.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "LoadAdapterResponse"
}
LoadedAdapterIdentityAdapter name and immutable content revision currently published by the live model runner.2 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
name yes AdapterName - Name. An adapter registry name: non-empty, relative, not dot-prefixed, and without separators or ... The generic adapter routes currently impose no byte limit or control-character restriction.
content_revision yes RawSha256 - Content revision. A raw lowercase 64-character SHA-256 digest.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "LoadedAdapterIdentity"
}
LogitSourceCapsScoring capabilities Kiln resolved from a teacher source.6 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
teacher_id yes NonEmptyString - Teacher ID. A text string containing at least one character.
vocab_size yes PositiveInteger - Vocab size. A whole number greater than or equal to one.
max_top_k yes PositiveInteger - Max top k. A whole number greater than or equal to one.
supports_full_vocab yes Boolean - Supports full vocab. Either true or false.
supports_batched yes Boolean - Supports batched. Either true or false.
tokenizer_hash yes NonEmptyString | null - Tokenizer hash.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "kiln_train::LogitSourceCaps"
}
MergeAdapterRequestCreate a new merged adapter without replacing an existing name. `density` applies only to TIES and defaults to 0.2 for that mode.4 fields

Type: object.

Field Required Type Constraints and default Description
sources yes array<MergeSource> minimum items 1 Sources.
output_name yes AdapterName - Output name. An adapter registry name: non-empty, relative, not dot-prefixed, and without separators or ... The generic adapter routes currently impose no byte limit or control-character restriction.
mode no MergeMode | null - Mode.
density no UnitInterval | null - Density.

Composition and conditional rules

The following JSON is copied exactly from this schema node.

{
  "allOf": [
    {
      "if": {
        "required": [
          "density"
        ],
        "properties": {
          "density": {
            "type": "number"
          }
        }
      },
      "then": {
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "const": "ties"
          }
        }
      }
    }
  ]
}

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "MergeAdapterRequest",
  "x-kiln-semantic-constraints": [
    "source names must be distinct",
    "output_name must not already exist"
  ],
  "x-kiln-unknown-field-policy": "accepted_and_ignored"
}
MergeAdapterResponseSummary of the newly published merged adapter.5 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
status yes any const "merged" Status.
output_name yes AdapterName - Output name. An adapter registry name: non-empty, relative, not dot-prefixed, and without separators or ... The generic adapter routes currently impose no byte limit or control-character restriction.
mode yes MergeMode - Mode. Algorithm used to merge source adapters.
sources yes array<MergeSourceInfo> minimum items 1 Sources.
num_tensors yes PositiveInteger - Num tensors. A whole number greater than or equal to one.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "MergeAdapterResponse"
}
MergeModeAlgorithm used to merge source adapters.0 fields

Type: string. Constraints: enum "weighted_average", "ties", "concat".

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "String"
}
MergeSourceOne source adapter and its merge weight.2 fields

Type: object.

Field Required Type Constraints and default Description
name yes AdapterName - Name. An adapter registry name: non-empty, relative, not dot-prefixed, and without separators or ... The generic adapter routes currently impose no byte limit or control-character restriction.
weight yes FiniteNumber - Weight. A finite JSON number.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "MergeSource",
  "x-kiln-unknown-field-policy": "accepted_and_ignored"
}
MergeSourceInfoOne source adapter recorded in the merge result.2 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
name yes AdapterName - Name. An adapter registry name: non-empty, relative, not dot-prefixed, and without separators or ... The generic adapter routes currently impose no byte limit or control-character restriction.
weight yes FiniteNumber - Weight. A finite JSON number.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "MergeSourceInfo"
}
NonEmptyStringA text string containing at least one character.0 fields

Type: string. Constraints: minimum length 1.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "String"
}
NonNegativeIntegerA whole number greater than or equal to zero.0 fields

Type: integer. Constraints: minimum 0.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "u64 | u32 | usize"
}
OpenEnvTerminationCountsV1Corpus counts for each explicit OpenEnv episode termination class.4 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
done yes NonNegativeInteger - Done. A whole number greater than or equal to zero.
max_steps yes NonNegativeInteger - Max steps. A whole number greater than or equal to zero.
invalid_model_action yes NonNegativeInteger - Invalid model action. A whole number greater than or equal to zero.
protocol_error yes NonNegativeInteger - Protocol error. A whole number greater than or equal to zero.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "kiln_train::OpenEnvTerminationCountsV1"
}
OpenEnvTrainingDataProvenanceV1Validated semantic identity for an all-OpenEnv GRPO training corpus.11 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
schema yes any const "kiln.openenv-training-data.v1" Schema.
groups yes PositiveInteger - Groups. A whole number greater than or equal to one.
rollouts yes PositiveInteger - Rollouts. A whole number greater than or equal to one.
unique_seeds yes PositiveInteger - Unique seeds. A whole number greater than or equal to one.
seed_min yes DecimalU64 - Seed min. An unsigned 64-bit integer encoded as decimal text to preserve exact values.
seed_max yes DecimalU64 - Seed max. An unsigned 64-bit integer encoded as decimal text to preserve exact values.
total_steps yes NonNegativeInteger - Total steps. A whole number greater than or equal to zero.
terminations yes OpenEnvTerminationCountsV1 - Terminations. Corpus counts for each explicit OpenEnv episode termination class.
group_plan_sha256 yes Sha256 - Group plan SHA-256. A lowercase SHA-256 digest prefixed with sha256:.
behavior_policy no RolloutBehaviorPolicyIdentityV1 - Behavior policy. See kiln-inference-v1.schema.json#/$defs/RolloutBehaviorPolicyIdentityV1.
environments yes array<OpenEnvTrainingEnvironmentV1> minimum items 1 Environments.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "kiln_train::OpenEnvTrainingDataProvenanceV1",
  "x-kiln-semantic-constraints": [
    "every completion has OpenEnv provenance",
    "all candidates in a group share endpoint, schema, reset hash, and seed",
    "completion reward equals OpenEnv episode_return",
    "when present, one behavior-policy identity is shared by every completion",
    "per-environment and termination totals equal corpus totals"
  ]
}
OpenEnvTrainingEnvironmentV1One protocol endpoint and immutable schema identity represented in an OpenEnv training corpus.10 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
environment_name yes NonEmptyString - Environment name. A text string containing at least one character.
environment_base_url yes NonEmptyString - Environment base URL. A text string containing at least one character.
openapi_version no NonEmptyString - Openapi version. A text string containing at least one character.
discovery_sha256 no Sha256 - Discovery SHA-256. A lowercase SHA-256 digest prefixed with sha256:.
environment_schema_sha256 yes Sha256 - Environment schema SHA-256. A lowercase SHA-256 digest prefixed with sha256:.
action_schema_sha256 yes Sha256 - Action schema SHA-256. A lowercase SHA-256 digest prefixed with sha256:.
groups yes PositiveInteger - Groups. A whole number greater than or equal to one.
rollouts yes PositiveInteger - Rollouts. A whole number greater than or equal to one.
total_steps yes NonNegativeInteger - Total steps. A whole number greater than or equal to zero.
terminations yes OpenEnvTerminationCountsV1 - Terminations. Corpus counts for each explicit OpenEnv episode termination class.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "kiln_train::OpenEnvTrainingEnvironmentV1"
}
PositiveIntegerA whole number greater than or equal to one.0 fields

Type: integer. Constraints: minimum 1.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "u64 | u32 | usize"
}
PromptSourceDescriptorSource, manifest digest, and row count for the prompts used by training.3 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
source yes NonEmptyString - Source. A text string containing at least one character.
manifest_hash yes Sha256 - Manifest hash. A lowercase SHA-256 digest prefixed with sha256:.
count yes NonNegativeInteger - Count. A whole number greater than or equal to zero.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "kiln_train::PromptSourceDescriptor"
}
RawSha256A raw lowercase 64-character SHA-256 digest.0 fields

Type: string. Constraints: pattern ^[0-9a-f]{64}$.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "String"
}
RegisterTeacherRequestFields callers may set when registering a teacher. Kiln rejects caller-supplied identity, capabilities, and secret environment-variable names.8 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
alias yes NonEmptyString - Alias. A text string containing at least one character.
kind yes TeacherKind - Kind. The teacher implementation family.
provider no RemoteProvider | null - Provider.
model_id no NonEmptyString | null - Model ID.
url no NonEmptyString | null - URL.
credential_id no NonEmptyString | null - Credential ID.
notes no String | null - Notes.
adapter no AdapterName | null - Adapter.

Composition and conditional rules

The following JSON is copied exactly from this schema node.

{
  "allOf": [
    {
      "if": {
        "properties": {
          "kind": {
            "const": "remote"
          }
        }
      },
      "then": {
        "required": [
          "provider",
          "model_id",
          "url"
        ],
        "properties": {
          "provider": {
            "const": "vllm"
          },
          "model_id": {
            "type": "string",
            "minLength": 1
          },
          "url": {
            "type": "string",
            "minLength": 1
          },
          "adapter": {
            "type": "null"
          }
        }
      },
      "else": {
        "properties": {
          "provider": {
            "type": "null"
          },
          "url": {
            "type": "null"
          },
          "credential_id": {
            "type": "null"
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "kind": {
            "const": "fixture"
          }
        }
      },
      "then": {
        "required": [
          "model_id"
        ],
        "properties": {
          "model_id": {
            "type": "string",
            "minLength": 1
          },
          "adapter": {
            "type": "null"
          }
        }
      }
    }
  ]
}

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "RegisterTeacherRequest"
}
RemoteProviderRemote scoring protocol identifier. The schema retains compatibility values, but teacher registration currently accepts only `vllm`.0 fields

Type: string. Constraints: enum "vllm", "sglang", "llama_cpp", "open_router", "together", "fireworks", "deep_infra", "tgi".

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "kiln_train::RemoteProvider"
}
Rfc3339TimestampAn RFC 3339 timestamp.0 fields

Type: string. Constraints: format date-time.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "String"
}
ScoredRolloutOne reward-scored completion with optional trajectory and generation provenance.4 fields

Type: object.

Field Required Type Constraints and default Description
text yes String - Text. A text string.
reward yes FiniteNumber - Reward. A finite JSON number.
trajectory no array<TurnSegment> - Trajectory.
provenance no RolloutProvenanceV1 | null - Provenance.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "kiln_train::ScoredRollout",
  "x-kiln-unknown-field-policy": "accepted_and_ignored"
}
SftExampleOne conversation submitted for supervised fine-tuning.1 field

Type: object.

Field Required Type Constraints and default Description
messages no array<TrainingChatMessage> - Messages.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "kiln_train::SftExample",
  "x-kiln-unknown-field-policy": "accepted_and_ignored"
}
SftExportRequestCreate an immutable SFT handoff from exactly one source: inline examples, a server-local file, or a registered dataset.7 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
name yes ExportName - Name. A server-owned HF/TRL export name: 1–128 ASCII characters, beginning with a letter or number and containing only letters, numbers, hyphens, or underscores.
examples no array<SftExample> - Examples.
dataset_path no NonEmptyString | null - Dataset path.
dataset no NonEmptyString | null - Dataset.
invalid_row_policy no SftInvalidRowPolicy default "fail" Invalid row policy. Whether an invalid SFT row rejects the export or is skipped and recorded.
input_adapter no AdapterName | null - Input adapter.
split_manifest no AnyJson | null - Split manifest.

Composition and conditional rules

The following JSON is copied exactly from this schema node.

{
  "oneOf": [
    {
      "required": [
        "examples"
      ],
      "properties": {
        "examples": {
          "minItems": 1
        },
        "dataset_path": {
          "type": "null"
        },
        "dataset": {
          "type": "null"
        }
      }
    },
    {
      "required": [
        "dataset_path"
      ],
      "properties": {
        "examples": {
          "maxItems": 0
        },
        "dataset_path": {
          "type": "string",
          "minLength": 1
        },
        "dataset": {
          "type": "null"
        }
      }
    },
    {
      "required": [
        "dataset"
      ],
      "properties": {
        "examples": {
          "maxItems": 0
        },
        "dataset_path": {
          "type": "null"
        },
        "dataset": {
          "type": "string",
          "minLength": 1
        }
      }
    }
  ]
}

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "SftExportRequest"
}
SftInvalidRowPolicyWhether an invalid SFT row rejects the export or is skipped and recorded.0 fields

Type: string. Constraints: enum "fail", "skip".

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "SftInvalidRowPolicy"
}
Sha256A lowercase SHA-256 digest prefixed with `sha256:`.0 fields

Type: string. Constraints: pattern ^sha256:[0-9a-f]{64}$.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "String"
}
StringA text string.0 fields

Type: string.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "String"
}
TeacherAdapterIdentityV1Exact static adapter identity served with a teacher model.3 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
name yes NonEmptyString - Name. A text string containing at least one character.
weights_sha256 yes RawSha256 - Weights SHA-256. A raw lowercase 64-character SHA-256 digest.
config_sha256 yes RawSha256 - Config SHA-256. A raw lowercase 64-character SHA-256 digest.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "kiln_train::TeacherAdapterIdentityV1"
}
TeacherDescriptorTeacher identity retained by a legacy adapter receipt.5 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
alias yes NonEmptyString - Alias. A text string containing at least one character.
model_id yes NonEmptyString - Model ID. A text string containing at least one character.
model_version_hash no NonEmptyString - Model version hash. A text string containing at least one character.
identity no TeacherIdentityV1 - Identity. Model, tokenizer, adapter, protocol, and serving-capability identity pinned during teacher registration.
snapshot_url no NonEmptyString - Snapshot URL. A text string containing at least one character.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "kiln_train::TeacherDescriptor"
}
TeacherEntryStored teacher configuration plus its resolved identity, capabilities, and current usability.7 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
spec yes TeacherSpec - Spec. Stored teacher configuration. Kiln derives identity and capability claims instead of accepting them from this object.
capabilities yes LogitSourceCaps | null - Capabilities.
status yes TeacherStatus - Status. The registry's stable usability state.
usable yes Boolean - Usable. Either true or false.
identity_revision no Sha256 - Identity revision. A lowercase SHA-256 digest prefixed with sha256:.
off_policy_manifest no NonEmptyString - Off policy manifest. A text string containing at least one character.
status_message no NonEmptyString - Status message. A text string containing at least one character.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "TeacherEntry"
}
TeacherIdentityV1Model, tokenizer, adapter, protocol, and serving-capability identity pinned during teacher registration.14 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
schema yes any const "kiln.teacher-identity.v1" Schema.
protocol yes any const "vllm.prompt-logprobs.numeric-token-ids.causal.v1" Protocol.
served_model_id yes NonEmptyString - Served model ID. A text string containing at least one character.
base_model_sha256 yes RawSha256 - Base model SHA-256. A raw lowercase 64-character SHA-256 digest.
tokenizer_vocab_sha256 yes RawSha256 - Tokenizer vocab SHA-256. A raw lowercase 64-character SHA-256 digest.
tokenizer_config_sha256 yes RawSha256 - Tokenizer config SHA-256. A raw lowercase 64-character SHA-256 digest.
adapter yes TeacherAdapterIdentityV1 | null - Adapter.
vocab_size yes integer minimum 1; maximum 16777216 Vocab size.
max_top_k yes integer minimum 1; maximum 65536 Max top k.
max_model_len yes integer minimum 1; maximum 16777216 Max model len.
max_prompt_logprob_candidates yes integer minimum 1; maximum 1000000 Max prompt logprob candidates.
logprobs_mode yes any const "raw_logprobs" Logprobs mode.
implementation yes NonEmptyString - Implementation. A text string containing at least one character.
inference_config_sha256 yes RawSha256 - Inference config SHA-256. A raw lowercase 64-character SHA-256 digest.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "kiln_train::TeacherIdentityV1"
}
TeacherKindThe teacher implementation family.0 fields

Type: string. Constraints: enum "fixture", "local", "remote".

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "TeacherKind"
}
TeacherSpecStored teacher configuration. Kiln derives identity and capability claims instead of accepting them from this object.13 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
alias yes NonEmptyString - Alias. A text string containing at least one character.
kind yes TeacherKind - Kind. The teacher implementation family.
provider yes RemoteProvider | null - Provider.
model_id yes String - Model ID. A text string.
max_top_k yes NonNegativeInteger | null - Max top k.
vocab_size yes PositiveInteger | null - Vocab size.
supports_full_vocab yes Boolean | null - Supports full vocab.
tokenizer_hash yes NonEmptyString | null - Tokenizer hash.
identity no TeacherIdentityV1 - Identity. Model, tokenizer, adapter, protocol, and serving-capability identity pinned during teacher registration.
url yes NonEmptyString | null - URL.
credential_id no NonEmptyString - Credential ID. A text string containing at least one character.
notes yes String | null - Notes.
adapter yes AdapterName | null - Adapter.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "TeacherSpec"
}
TeacherStatusThe registry's stable usability state.0 fields

Type: string. Constraints: enum "verified", "configured", "legacy_unverified", "unavailable".

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "TeacherStatus"
}
TeachersListResponseAll teachers currently stored in the server registry.1 field

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
teachers yes array<TeacherEntry> - Teachers.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "TeachersListResponse"
}
TrainingChatMessageA chat message accepted for export. Text content parts are concatenated; non-text parts are ignored.5 fields

Type: object.

Field Required Type Constraints and default Description
role yes NonEmptyString - Role. A text string containing at least one character.
content no string | null | array<AnyJson> default "" Content.
tool_calls no array<AnyJson> | null - Tool calls.
name no String | null - Name.
tool_call_id no String | null - Tool call ID.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "kiln_core::tokenizer::ChatMessage",
  "x-kiln-unknown-field-policy": "accepted_and_ignored"
}
TrainingCheckpointPrecisionThe exact precision policy recorded by a native training checkpoint.5 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
parameter_dtype yes NonEmptyString - Parameter dtype. A text string containing at least one character.
optimizer_state_dtype yes NonEmptyString - Optimizer state dtype. A text string containing at least one character.
activation_dtype yes NonEmptyString - Activation dtype. A text string containing at least one character.
gradient_dtype yes NonEmptyString - Gradient dtype. A text string containing at least one character.
stochastic_rounding yes object - The validated stochastic-rounding policy object.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "kiln_train::TrainingCheckpointPrecision"
}
TrainingJobTypeThe native training workflow that produced a linked job.0 fields

Type: string. Constraints: enum "sft", "grpo", "opd".

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "TrainingJobType"
}
TrainingStateTraining-job lifecycle state. Cancelled training jobs are represented as `failed` with a cancellation error.0 fields

Type: string. Constraints: enum "queued", "running", "completed", "failed".

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "kiln_train::TrainingState"
}
TurnKindThe supervision role of one trajectory segment.0 fields

Type: string. Constraints: enum "context", "action", "observation".

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "kiln_train::TurnKind"
}
TurnSegmentOne context, action, or observation segment in an agentic rollout.5 fields

Type: object.

Field Required Type Constraints and default Description
role yes NonEmptyString - Role. A text string containing at least one character.
content yes String - Content. A text string.
kind no TurnKind - Kind. The supervision role of one trajectory segment.
tool_call_id no String | null - Tool call ID.
warning_prefix_len no NonNegativeInteger | null - Warning prefix len.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "kiln_train::TurnSegment",
  "x-kiln-unknown-field-policy": "accepted_and_ignored"
}
UnitIntervalA merge density greater than 0 and no greater than 1.0 fields

Type: number. Constraints: exclusive minimum 0; maximum 1.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "f32"
}
UnloadAdapterResponseConfirmation that no runtime adapter is loaded.1 field

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
status yes any const "unloaded" Status.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "UnloadAdapterResponse"
}
UploadAdapterResponseSummary of an adapter archive installed without replacing an existing directory.3 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
name yes AdapterName - Name. An adapter registry name: non-empty, relative, not dot-prefixed, and without separators or ... The generic adapter routes currently impose no byte limit or control-character restriction.
size_bytes yes NonNegativeInteger - Size bytes. A whole number greater than or equal to zero.
files yes PositiveInteger - Files. A whole number greater than or equal to one.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "UploadAdapterResponse"
}
kiln_train_AdapterReceiptLegacy adapter audit receipt. It records useful provenance and diagnostics but does not contain enough identity for exact replay.12 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
schema_version yes any const 1 Schema version.
adapter yes AdapterName - Adapter. An adapter registry name: non-empty, relative, not dot-prefixed, and without separators or ... The generic adapter routes currently impose no byte limit or control-character restriction.
produced_at yes Rfc3339Timestamp - Produced at. An RFC 3339 timestamp.
kiln_version yes NonEmptyString - Kiln version. A text string containing at least one character.
kernel_versions yes object - Kernel versions.
seed yes NonNegativeInteger - Seed. A whole number greater than or equal to zero.
source_kind yes NonEmptyString - Source kind. A text string containing at least one character.
teacher no TeacherDescriptor - Teacher. Teacher identity retained by a legacy adapter receipt.
prompts no PromptSourceDescriptor - Prompts. Source, manifest digest, and row count for the prompts used by training.
hyperparameters yes AnyJson - Hyperparameters. Any valid JSON value; Kiln does not interpret its nested fields here.
diagnostic_summary yes DiagnosticSummary - Diagnostic summary. High-level diagnostics retained after an adapter training run.
post_eval yes object - Post eval.

Kiln contract annotations

These machine-readable annotations are copied exactly from this schema node.

{
  "x-kiln-field-schema-status": "complete",
  "x-kiln-rust-type": "kiln_train::AdapterReceipt"
}