Flowlib
Reference

Database Schema

Core table definitions and column types.

These are the core tables created by npx flowlib-cli generate. Exact column types vary by dialect (SQLite, PostgreSQL, MySQL) but the structure is the same.

flows

ColumnTypeNotes
idstringPrimary key (UUID)
namestringFlow name
descriptiontextOptional description
categorystringOptional categorisation
tagstextJSON array of tags
isActivebooleanWhether the flow is active
metadatatextJSON metadata
latestVersionintegerCurrent version number
createdAtstringISO timestamp
updatedAtstringISO timestamp

flow_versions

ColumnTypeNotes
idstringPrimary key (UUID)
flowIdstringForeign key → flows.id
versionintegerVersion number
definitiontextJSON flow definition (nodes, edges)
createdAtstringISO timestamp

flow_runs

ColumnTypeNotes
idstringPrimary key (UUID)
flowIdstringForeign key → flows.id
flowVersionIdstringForeign key → flow_versions.id
statusstringRUNNING, COMPLETED, FAILED, PAUSED_FOR_BATCH, CANCELLED
inputstextJSON input data
outputstextJSON output data
errortextError message (if failed)
startedAtstringISO timestamp
completedAtstringISO timestamp
metadatatextJSON metadata

node_executions

ColumnTypeNotes
idstringPrimary key (UUID)
flowRunIdstringForeign key → flow_runs.id
nodeIdstringNode ID within the flow
nodeTypestringAction ID or AGENT
statusstringRUNNING, COMPLETED, FAILED, SKIPPED, PENDING
inputDatatextJSON incoming data
outputDatatextJSON output data
resolvedParamstextJSON resolved configuration
errortextError message (if failed)
startedAtstringISO timestamp
completedAtstringISO timestamp
durationMsintegerExecution duration
metadatatextJSON metadata (token usage, etc.)

credentials

ColumnTypeNotes
idstringPrimary key (UUID)
namestringHuman-readable name
typestringllm, http-api, database
providerstringProvider ID
authTypestringapiKey, oauth2, etc.
configtextEncrypted JSON (AES-256-GCM)
descriptiontextOptional description
isSharedbooleanVisible to all users
isActivebooleanWhether the credential is active
lastUsedAtstringLast usage timestamp
expiresAtstringExpiration timestamp (OAuth2)
metadatatextJSON metadata
createdAtstringISO timestamp
updatedAtstringISO timestamp

triggers

ColumnTypeNotes
idstringPrimary key (UUID)
flowIdstringForeign key → flows.id
typestringmanual, cron, webhook
configtextJSON trigger config (cron expression, etc.)
isActivebooleanWhether the trigger is active
lastTriggeredAtstringLast execution timestamp
createdAtstringISO timestamp
updatedAtstringISO timestamp

batch_jobs

ColumnTypeNotes
idstringPrimary key (UUID)
flowRunIdstringForeign key → flow_runs.id
nodeIdstringNode ID that submitted the batch
providerstringAI provider (openai, anthropic)
batchIdstringProvider's batch ID
statusstringPENDING, PROCESSING, COMPLETED, FAILED
inputtextJSON batch input
outputtextJSON batch result
createdAtstringISO timestamp
updatedAtstringISO timestamp

On this page