Detect Anomalies Before They Matter
ALEC Complexity learns what "normal" looks like and alerts you when things change. No ML expertise requiredโjust plug in and protect.
From Reactive to Proactive
Stop waiting for failures. ALEC Complexity uses Quantitative Complexity Theory to detect system degradation before it impacts your operations.
Predictive Maintenance
Detect equipment degradation weeks before failure. Reduce unplanned downtime by 40%.
Agriculture Monitoring
Spot irrigation anomalies, pest patterns, or sensor drift before crop damage occurs.
Healthcare IoT
Monitor patient device patterns. Alert on abnormal readings before they become critical.
Learn normal, detect abnormal
Baseline Learning
Automatically learns what "normal" looks like from your data
Z-Score Detection
Statistical anomaly detection with configurable thresholds
Structure Analysis
S-lite tracks sensor dependencies and correlation changes
Smart Events
Persistence and cooldown prevent alert fatigue
How Detection Works
Build Baseline
Collect metrics during normal operation (1-5 minutes)
Compute Deltas
Compare current values to baseline mean/std
Trigger Events
Alert when z-scores exceed thresholds persistently
Configuration Defaults
Sensible defaults that work out of the box. Override any parameter to fit your use case.
๐ Baseline
๐ฏ Detection
Event Types
Complexity emits structured events that you can route to alerting systems, dashboards, or logs.
| Event | Trigger | Severity |
|---|---|---|
| BaselineBuilding | Baseline not yet locked | Info |
| BaselineLocked | Baseline ready for detection | Info |
| PayloadEntropySpike | H_bytes z-score exceeds threshold | Warning |
| StructureBreak | S-lite edges change abruptly | Warning |
| RedundancyDrop | R z-score drops below threshold | Critical |
| ComplexitySurge | TC/H_joint z-score persists high | Warning |
Alert Destinations
Route alerts to your existing tools. Native integrations for popular platforms, plus webhooks for custom workflows.
Team Communication
Incident Management
Custom Integration
Works with Gateway
Complexity integrates seamlessly with ALEC Gateway's metrics module. Just enable the
gateway feature.
// Cargo.toml
[dependencies]
alec-complexity = { version = "0.1", features = ["gateway"] }
// main.rs
use alec_complexity::MetricsSnapshotExt;
if let Some(metrics) = gateway.last_metrics() {
let input = metrics.to_complexity_input();
if let Some(snapshot) = engine.process(&input) {
// Handle events
}
} Complete Example
use alec_complexity::{ComplexityEngine, ComplexityConfig};
use alec_complexity::input::{GenericInput, InputAdapter};
let mut engine = ComplexityEngine::new(ComplexityConfig {
enabled: true,
baseline: BaselineConfig {
build_time_ms: 60_000, // 1 minute baseline
min_valid_snapshots: 10,
..Default::default()
},
anomaly: AnomalyConfig {
enabled: true,
z_threshold_warn: 2.0, // 2 sigma = warning
z_threshold_crit: 3.0, // 3 sigma = critical
persistence_ms: 5000, // Must persist 5s
cooldown_ms: 30000, // 30s between events
..Default::default()
},
..Default::default()
});
// Feed metrics from Gateway
let input = GenericInput::new(timestamp_ms, 6.5) // h_bytes
.with_tc(2.3)
.with_r(0.45)
.build();
if let Some(snapshot) = engine.process(&input) {
for event in &snapshot.events {
println!("Alert: {:?} - {:?}", event.event_type, event.severity);
}
} From reactive to proactive
Stop waiting for problems to happen. Detect anomalies before they impact your operations.