ALEC Complexity

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.

Auto
Baseline learning
Z-Score
Statistical detection
7
Event types
No ML
Required

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%.

40% less downtime
๐ŸŒพ

Agriculture Monitoring

Spot irrigation anomalies, pest patterns, or sensor drift before crop damage occurs.

70% earlier detection
๐Ÿฅ

Healthcare IoT

Monitor patient device patterns. Alert on abnormal readings before they become critical.

24/7 autonomous monitoring

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

1

Build Baseline

Collect metrics during normal operation (1-5 minutes)

2

Compute Deltas

Compare current values to baseline mean/std

3

Trigger Events

Alert when z-scores exceed thresholds persistently

Based on Quantitative Complexity Theory
z = (x - ฮผ) / ฯƒ
Augmented Shannon entropy for system health

Configuration Defaults

Sensible defaults that work out of the box. Override any parameter to fit your use case.

๐Ÿ“Š Baseline

Build time 5 minutes
Min samples to lock 20
Auto-rebuild enabled

๐ŸŽฏ Detection

Warning threshold 2.0 ฯƒ
Critical threshold 3.0 ฯƒ
Persistence required 30 seconds
Cooldown between events 2 minutes

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

๐Ÿ’ฌ
Slack Real-time channel alerts
๐Ÿ‘ฅ
Microsoft Teams Teams webhook integration
๐ŸŽฎ
Discord Server notifications

Incident Management

๐Ÿšจ
PagerDuty On-call escalation
๐Ÿ””
OpsGenie Alert routing
๐Ÿ“Ÿ
VictorOps Incident response

Custom Integration

๐Ÿ”—
Webhooks HTTP POST to any endpoint
๐Ÿ“ง
Email SMTP notifications
๐Ÿ“ก
MQTT Publish to broker

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.