Skip to main content

cortex.db

sqlite-view db view via Harlequin

This document outlines Cortex database architecture which is designed to store and manage models, engines, files and more.

Tables Structure

schema Table

The schema table is designed to hold schema version for cortex database. Below is the structure of the table:

Column NameData TypeDescription
versionINTEGERA unique schema version for database.

models Table

The models table is designed to hold metadata about various AI models. Below is the structure of the table:

Column NameData TypeDescription
model_idTEXTA unique identifier for each model (Primary Key).
author_repo_idTEXTThe identifier for the repository where the model is stored.
branch_nameTEXTThe branch name in the repository that contains the model.
path_to_model_yamlTEXTThe file path to the YAML configuration file for the model.
model_aliasTEXTThe optional alias or friendly name for the model.
model_formatTEXTThe format or type of the model (e.g., TensorFlow, PyTorch, GGUF, etc.).
model_sourceTEXTThe source or origin of the model (e.g., a URL or file path).
statusTEXTCurrent status of the model (e.g., "downloaded", "downloadable")..
engineTEXTThe name or identifier of the engine or framework used for running or deploying the model..
metadataTEXTAdditional metadata or information about the model, such as a JSON string containing various attributes or properties.

hardware Table

The hardware table is designed to hold metadata about hardware information. Below is the structure of the table:

Column NameData TypeDescription
uuidTEXTthe primary key for the table, meaning that each row must have a unique value in this column.
typeTEXTThe type of hardware.
hardware_idINTEGERAn integer value representing the hardware ID.
software_idINTEGERAn integer value representing the software ID associated with the hardware.
activatedINTEGERA boolean value (0 or 1) indicating whether the hardware is activated or not.
priorityINTEGERAn integer value representing the priority associated with the hardware.

engines Table

The engines table is designed to hold metadata about the different engines available for useage with Cortex. Below is the structure of the table:

Column NameData TypeDescription
idINTEGERA unique identifier for each engine (Primary Key).
engine_nameTEXTThe name of the engine.
typeTEXT
api_keyTEXT
urlTEXT
versionTEXTThe current version of the engine.
variantTEXT
statusTEXTCurrent status of the engine (e.g., "downloaded", "downloadable").
metadataTEXTAdditional metadata or information about the engine.
date_ceatedTEXTDate when the engine was downloaded.
date_updatedTEXTDate when the engine was last updated.

files Table

The files table is designed to hold metadata about objects dowloaded via Cortex.

Column NameData TypeDescription
idTEXTThe primary key for the table
objectTEXTThe type of hardware.
purposeTEXTPurpose of file
filenameTEXTThe name of the file.
created_atINTEGERDate when file was created
bytesINTEGER