Importing & Exporting Models
You can import and export AI model configurations (including their bindings) as CSV files. This is useful for migrating models between Koios instances, bulk-editing binding settings in a spreadsheet, or backing up model configurations before making changes.
How Models and Bindings Relate
Each AI model has a set of bindings: input bindings that map tags to model inputs, and output bindings that map model outputs back to tags. When you export models, Koios exports both the model settings and all of their bindings together.
The export produces a ZIP file containing two CSV files:
Exporting Models
How to Export
There are two ways to export model configurations:
- From the model table: select one or more models using the checkboxes, then click Export config in the bulk actions menu. Only the selected models and their bindings are exported.
- Export all: if no models are selected, the export includes every model and binding in the system.
The export downloads a file named models_export.zip.
What's Included
Both CSVs contain all configuration fields. Columns that don't apply to a particular model or binding will be empty.
Model CSV Columns
Core fields:
Inference settings:
References:
System-managed fields (read-only):
Binding CSV Columns
Core fields:
Normalization:
Calibration:
Output settings:
Failure detection:
Rate-of-change detection:
Structured inputs (only populated for models whose active file declares a structured input space):
Audit fields (read-only):
Importing Models
How to Import
- Navigate to the Models page
- Click the Import button in the table toolbar
- Select a file: either a ZIP (with
models.csvand/orbindings.csv) or a single CSV - Review the preview to verify what will change
- Click Confirm Import to apply the changes
File Formats
The import accepts three file formats:
Koios auto-detects whether a CSV contains models or bindings based on the column headers: a CSV is read as bindings only when it has both an aiopmodel and a binding_order column. Keep both columns in a bindings CSV, even when you remove others. Koios ignores the aiopmodel values but imports binding_order, so leave its values as exported unless you mean to renumber the bindings.
Models: Create or Update
How the import determines what to do with each model row:
Bindings: Update Only
How the import determines what to do with each binding row:
Import Order
When importing a ZIP with both files, Koios processes models first, then bindings. This ensures any new models exist before their bindings are updated.
Example: Creating New Models
To create new models, leave the id column empty. Provide at least a name:
Example: Bulk-Editing Binding Normalization
Export your models, then edit the bindings CSV to set normalization for all input bindings at once:
This sets Min-Max normalization with custom ranges on three bindings.
Example: Assigning Tags to Bindings
This assigns tag IDs 42, 43, and 44 to the three input bindings.
Preview Step
After selecting a file, Koios performs a dry run. It processes the CSV(s) without saving anything and shows you exactly what will happen:
- Counts: how many items will be created, updated, or rejected, and how many of the file's columns change at all
- Row details: select any row to open a panel showing each changed field, with its current value above the new one
- Filtering: search the rows, or narrow the grid to one action — rejected rows sort to the top and are marked
- All columns: the grid shows only the columns your file changes. Switch it to show every column when you want the full picture
If a ZIP includes both files, the preview checks the bindings against the models as the import will leave them, and a rejected row in either file blocks the import. When the model rows pass but binding rows are rejected, the review lists the binding rows instead.
Validation Rules
Model validation:
Binding validation:
Boolean fields accept: True/False, true/false, 1/0, yes/no.
Foreign key fields (tag, scan_group, remote_enable_tag, parent) expect integer IDs.
After Import
Once you confirm the import:
- Models and bindings are created or updated in a single transaction. If anything fails, all changes are rolled back
- An audit event is recorded (e.g. "Imported 5 models") with your username
- The model table automatically refreshes to show the updated list
- Updated models pick up changes on the next inference cycle if they are enabled
Tips
- Typical workflow for new models: create models via import (or the UI), upload model files to generate bindings, export the bindings, bulk-edit tag assignments and normalization in a spreadsheet, then re-import the bindings.
- Bulk-edit normalization: export, filter the bindings CSV to input bindings (
usage=0), setnormalization_type,normalization_source, and custom range columns, then import just the bindings CSV. - Move models between Koios instances: export from one instance, clear the
idandslugcolumns inmodels.csv, adjust thescan_group,remote_enable_tag, andparentIDs to match the target instance, and importmodels.csvon its own on the target. Then upload the model files and follow the workflow for new models above to set up the bindings. Bindings cannot travel in the ZIP, because import only updates bindings that already exist. - Audit trail: every import creates an event visible on the Events page, grouped under a single parent event so you can see what was imported in one action.
- Read-only columns:
inputs,outputs,aiopmodel_file,created_at,updated_at, andlast_modified_byare never read back on import, for new or existing models, and neither are a binding'saiopmodel,usage,leaf_path, andleaf_size. You can leave them in the CSV; they won't overwrite system-managed values, and re-importing an export you have not edited reports no change to them. Keep theaiopmodelcolumn in a bindings CSV all the same: Koios uses it to recognise the file as bindings.
