Lightweight time-series forecasting and anomaly detection engine for real-time environments
490
Real-time time-series intelligence — forecasting, anomaly detection, and pattern matching — running entirely on your machine.
DriftMind is a self-adaptive engine for multivariate time-series data. It learns continuously from the first data point, detects anomalies automatically, and recognises known failure signatures in real time. No training, no GPU, no retraining cycles.
As of v1.1, the edge runtime ships three complementary capabilities in a single ~70 MB native binary:
| Capability | What it answers | Output |
|---|---|---|
| Forecasting | What comes next? | One-step-ahead prediction + confidence bounds per feature |
| Anomaly detection | Is this unusual given what I've learned? | Continuous anomaly score [0, 1] |
| Echo — pattern matching | Does this match a known failure signature? | Per-pattern match score + severity (WARN / MAJOR / CRITICAL) |
| Image | Description | Size |
|---|---|---|
thngbk/driftmind-edge | Native binary only — HTTP server ready | ~70 MB |
thngbk/driftmind-edge-lab | Binary + Jupyter Lab with validation notebooks | ~500 MB |
Both images now run as a non-root user and include latest Ubuntu security patches applied at build time.
docker run -p 8080:8080 thngbk/driftmind-edge:latest
The API is immediately available at http://localhost:8080. Open the root URL in a browser for an auto-generated documentation page covering architecture, endpoints, and examples.
docker run -p 8080:8080 -p 8888:8888 thngbk/driftmind-edge-lab:latest
http://localhost:8080 — REST API + self-hosted docshttp://localhost:8888 — Jupyter Lab with pre-loaded notebooks, including echo_validation.ipynb — four realistic scenarios (Industrial IoT, Telecom RAN) that walk through pattern detection end-to-endThe edge engine exposes the same API as the DriftMind Cloud service. All endpoints, request formats, and response formats are identical across every deployment tier.
| Method | Endpoint | Description |
|---|---|---|
POST | /forecasters | Create a new forecaster |
GET | /forecasters | List all forecasters |
GET | /forecasters/{id} | Get forecaster details |
DELETE | /forecasters/{id} | Delete a forecaster |
POST | /forecasters/{id}/observations | Feed time-series data |
GET | /forecasters/{id}/predictions | Forecast + anomaly score + Echo matches |
GET | /forecasters/{id}/recent | Get recent observations |
| Method | Endpoint | Description |
|---|---|---|
POST | /patterns | Create a reference pattern |
GET | /patterns | List all patterns |
GET | /patterns/{id} | Get pattern details with signal data |
DELETE | /patterns/{id} | Delete a pattern |
| Method | Endpoint | Description |
|---|---|---|
GET | /attachments | List every attachment across all forecasters |
POST | /forecasters/{id}/attachments | Attach a pattern with severity |
GET | /forecasters/{id}/attachments | List patterns attached to a forecaster |
PUT | /forecasters/{id}/attachments/{patternId} | Update severity |
DELETE | /forecasters/{id}/attachments/{patternId} | Detach a pattern |
curl -X POST http://localhost:8080/forecasters \
-H "Content-Type: application/json" \
-d '{
"forecasterName": "pump-monitor",
"features": ["temperature", "vibration"],
"inputSize": 15,
"outputSize": 1,
"fitRate": 1
}'
curl -X POST http://localhost:8080/forecasters/{id}/observations \
-H "Content-Type: application/json" \
-d '{"temperature": [22.5, 22.7], "vibration": [0.5, 0.6]}'
curl -X POST http://localhost:8080/patterns \
-H "Content-Type: application/json" \
-d '{
"patternName": "bearing-failure",
"features": {
"temperature": [22, 24, 28, 35, 44, 55, 68],
"vibration": [0.3, 0.5, 0.8, 1.2, 2.1, 3.0, 4.5]
}
}'
curl -X POST http://localhost:8080/forecasters/{forecasterId}/attachments \
-H "Content-Type: application/json" \
-d '{"patternId": "{patternId}", "severity": "CRITICAL"}'
curl http://localhost:8080/forecasters/{id}/predictions
Response includes DriftMind forecasts + anomaly score + per-pattern Echo matches:
{
"anomalyScore": 0.18,
"numberOfClusters": 4,
"features": {
"temperature": { "predictions": [22.34], "upperConfidence": [22.8], "lowerConfidence": [21.9], ... }
},
"echoPatterns": {
"bearing-failure": { "score": 0.92, "severity": "CRITICAL" }
}
}
The lab image ships a driftmind-benchmark CLI for offline datasets. Point it at a config JSON (with optional echoAttachments) and a CSV, get a per-row result file with forecasts, anomaly scores, and Echo pattern matches.
docker run --rm -v $(pwd):/data thngbk/driftmind-edge-lab:latest \
./driftmind-benchmark /data/config.json /data/data.csv
The output CSV now includes a {feature}_sequence column when outputSize > 1, containing the full predicted vector (pipe-separated). outputSize = 1 outputs remain byte-identical to earlier releases.
Use the official DriftMind Python client — no code changes beyond the base URL:
pip install driftmind
from driftmind import DriftMindClient
client = DriftMindClient(api_url="http://localhost:8080", api_key="")
forecaster = client.create_forecaster({
"forecasterName": "My Forecaster",
"features": ["y"],
"inputSize": 15, "outputSize": 1, "fitRate": 2
})
client.add_observation(forecaster["id"], {"y": [42.0]})
predictions = client.get_predictions(forecaster["id"])
print(predictions["anomalyScore"])
print(predictions.get("echoPatterns"))
Full client docs: github.com/thngbk/driftmind
The community edition allows 100,000 API calls per container instance (raised from 20,000 in v1.1 — enough headroom for the full validation notebook, NAB benchmark, or multi-pattern demos). Once exhausted:
HTTP 429 — Credit exhausted. Upgrade at https://thingbook.io
Each response includes an X-Calls-Remaining header. Restart the container to reset the counter. For unlimited calls, upgrade at thingbook.io.
DriftMind uses online micro-clustering to model time-series behaviour continuously — no pre-training, no retraining cycles, instant adaptation to concept drift.
Echo detects known reference signatures via streaming Pearson correlation combined with magnitude filtering. Zero-allocation hot path, O(m) per point (m = pattern length), amplitude-sensitive, multivariate.
Both engines run in the same process, feed off the same data stream, and produce complementary signals. DriftMind catches the unknown; Echo names the known.
The edge binary is compiled natively with GraalVM — no JVM required, sub-second startup, minimal memory footprint.
/attachments endpoint — single view across all forecasters{feature}_sequence column when outputSize > 1 (fully backward-compatible)GET / — architecture, endpoints, and examples embedded in the binaryecho_validation.ipynb with four realistic Telecom and Industrial IoT scenariosSame engine, same API, every scale:
| Tier | Target | Image |
|---|---|---|
| Cloud / SaaS | Managed | api.thingbook.io |
| On-Prem / K8s | Enterprise infra | Helm chart |
| Edge / Docker | Single node | thngbk/driftmind-edge |
| On-Device | Raspberry Pi, ARM gateways | Native binary |
Real-time intelligence shouldn't require a GPU budget. It should require a CPU and a problem.
Content type
Image
Digest
sha256:1f55d50b3…
Size
69.7 MB
Last updated
16 days ago
docker pull thngbk/driftmind-edge