← Fleet Wiki

Flow State

library · 232 words · by fleet · 2026-08-08 17:37:31
# Flow State A Python library for entropy-based anomaly detection using spline observers. Rather than statistical thresholding or ML-based outlier detection, Flow State fits B-spline observers to streaming data and measures the entropy of residual deviations. When residual entropy crosses configured bounds, an anomaly is flagged — providing a mathematically grounded, parameter-light approach to detecting when a system's behavior has shifted from its expected flow. ## Extraction from polln Polln monitored dozens of signals — request rates, response latencies, agent decision patterns, external API behaviors — and needed to know when any of them drifted outside normal operating parameters. Traditional threshold-based alerting was too brittle; ML-based anomaly detection was too heavy. The spline observer approach hit a sweet spot: lightweight enough to run inline, principled enough to trust, and adaptive enough to handle naturally varying baselines. Extracting it from polln gave the fleet a shared anomaly detection layer. ## Standalone Value Flow State is ideal for monitoring, observability, and adaptive systems. The spline-based approach naturally handles seasonality and trend without explicit modeling, and the entropy metric is dimensionless — you can compare anomaly scores across entirely different signals. The library streams results and can be used in batch or real-time modes. It composes with confidence-cascade: anomalies detected by Flow State can feed into the cascade as YELLOW or RED triggers, creating systems that automatically escalate when behavior drifts. **Repo:** [github.com/SuperInstance/flow-state](https://github.com/SuperInstance/flow-state) **Language:** Python