Docs
/
Components
/

Components

Components

Components let you deploy custom logic that runs in real-time inside the Koios platform. Use them to build control algorithms, data transformations, state machines, alarm logic, and custom protocol adapters, all without managing external infrastructure.

Key Concepts

The component system has four main building blocks:

ConceptWhat It Is
LibraryA packaged collection of component types, uploaded as a .kcl (Koios Component Library) file
EnvironmentAn execution context where component instances run at a shared scan rate
InstanceA running copy of a component type, placed on an environment's canvas
WireA data connection between an instance's input/output and a tag, another instance, or historical data

How They Fit Together

Library (.kcl)              Environment
  ├── Adder                   ├── Instance: "Room Temp Avg" (Adder)
  ├── Latch                   ├── Instance: "Alarm Latch" (Latch)
  └── MovingAverage           └── Instance: "Smoothed Pressure" (MovingAverage)
                                     ↕ wires ↕
                              Tags, other instances, historical data
  1. Upload a library containing one or more component types
  2. Create an environment with a scan rate (how often components execute)
  3. Add instances of components to the environment's visual canvas
  4. Wire inputs and outputs to tags, other components, or historical data
  5. Enable the environment: the component engine begins executing your logic

Component Categories

Each component carries a category label chosen by its author. The category controls how components are grouped in the library tray. Any string works as a category, and components without one fall back to Miscellaneous.

Common categories:

CategoryUse CaseExamples
MathArithmetic and numeric operationsAdd, multiply, scale, unit conversion
StatisticsAggregation and summary metricsMoving averages, min/max, standard deviation
FilterSignal conditioningLow-pass, deadband, rate limiting
AnalysisData inspection and trend detectionTrend analyzers, comparisons
LogicDecision making and state managementState machines, latches, edge detection
ControlFeedback loops and setpoint managementPID controllers, cascade control
MonitoringWatching values and raising alertsThreshold alarms, health checks

Koios ships with a Core Library containing common building blocks: math operations, boolean logic, comparisons, and signal processing. You can also build and upload your own libraries.

Execution Model

Each environment runs its components in a continuous loop at the configured scan rate:

  1. Read inputs: resolve all wired input values from tags and other components
  2. Sort by dependencies: components are automatically ordered so that upstream outputs are available before downstream inputs need them
  3. Execute: each component's logic runs in dependency order
  4. Write outputs: results are pushed to wired tags and made available to other components

Components maintain their internal state between cycles. A moving average remembers its buffer, a latch remembers its position, an integrator accumulates over time. State resets when the instance is reconfigured or the engine restarts (offline values provide reset defaults).

What's Next