Who it is forAn engineer watching sensor or ops metrics for unusual behaviour.
The problemFixed thresholds miss context and fire constantly.
The outcomeAn anomaly score series plus a binary anomaly classification.
What you need first
- Python 3.11 or newer, ideally in a clean environment
- `pip install darts`
- Your series as a pandas DataFrame or one of the supported backends
Steps
- Install it with
pip install darts - Load a series and split it, for example
train, val = series.split_before(0.6) - Fit a scorer with KMeansScorer(k=2, window=5) on the train set and score the validation set
- Fit QuantileDetector(high_quantile=0.99) on the train scores and call detect on the validation scores
Prompt for your agent
With unit8co/darts, build a KMeansScorer and QuantileDetector pipeline over <my metric series> and list the timestamps it flags as anomalies.
Caveat. The quantile detector is calibrated on the training scores, so retrain it when the baseline shifts.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for unit8co/darts and "Flag anomalies in a multivariate series"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer