An Agent-Ready Time Series Sandbox, Unified CLI, Web Playground & Reproducibility Benchmark Suite
Built on sktime · Maintained by NetManAIOps
LibraryTS transforms the sktime ecosystem into an end-to-end Time Series Sandbox engineered for both human researchers and autonomous AI agents. It unifies algorithm discovery, standardized train / run / evaluate lifecycles, a native deep & statistical time-series anomaly detection suite (LibraryTS-AD), an interactive Web Playground, and a paper-verified reproducibility leaderboard across 6 core time-series tasks.
- One Unified Interface Across 6 Tasks & 327 Algorithms — Discover and execute Forecasting, Anomaly Detection, Classification, Regression, Clustering, and Causal Discovery models through one consistent JSON-envelope CLI, interactive web UI, or Python API.
- Native
LibraryTS-ADDetection Zoo & Metrics — Ships 15 native deep anomaly detectors (AnomalyTransformer,BeatGAN,COUTA,DAGMM,Donut,FCVAE,FITS,KANAD,KMeansAD,LSTMAD,ModernTCN,OmniAnomaly,TimesNet,TranAD,USAD), PyOD/subspace wrappers, changepoint & HMM detectors, and score/affiliation evaluation metrics (AUC-ROC,VUS-ROC,PA-F1,Affiliation F1). - Deep & Foundation Models Ready to Run — Includes
TSLibforecasting adapters (DLinear,NLinear,FEDformer,SCINet,PatchTST,TimesNet,iTransformer), zero-shot foundation models (Chronos-Bolt,TinyTimeMixer,MOMENT,Time-MoE,Time-LLM), and ensemble/compositor support with nested specs. - Train Once, Evaluate Everywhere —
libraryts trainpersists fitted estimators, preprocessors, and evaluation protocols toplayground/models/<model_id>/;libraryts run --model-idreloads and scores without refitting, and exports standalone Python scripts (script) and Markdown reports (report). - Reproducible by Design — Every benchmark claim pairs exact paper citations with explicit CLI commands in
playground/benchmark/and deploys automatically to the static Benchmark Leaderboard. - Agent-Native Skills & Cloud Sandboxes — Built-in
.agent/skills/specs for local coding agents, OpenClaw harnesses, and Alibaba Cloud Agent Sandbox E2B rollouts.
View the live interactive leaderboard at https://netmanaiops.github.io/sktime/benchmark/ or open playground/benchmark/leaderboard.html locally.
| Task | Tracked Claims | Reproduced | Deviation | Catalog Coverage | Highlights |
|---|---|---|---|---|---|
| Forecasting | 183 | 154 | 29 | 73 / 140 | DLinear, NLinear, FEDformer, SCINet, ConvTimeNet, PatchTST, TimesNet, iTransformer, TinyTimeMixer, Chronos-Bolt, MOMENT, Time-MoE, AutoARIMA, AutoETS, Theta, MAPA, reduction/skforecast |
| Classification | 249 | 230 | 19 | 46 / 66 | ROCKET, MiniRocket, HIVE-COTE v1/v2, Arsenal, DrCIF, CIF, MUSE, ProximityForest, ElasticEnsemble, ShapeletTransform, InceptionTime, ResNet, TapNet, CNTC, MOMENT |
| Clustering | 220 | 196 | 24 | 6 / 11 | k-Shape, TimeSeriesKMeans (Holder et al. 2024 & Javed et al. 2020), k-Medoids, Agglomerative, TimeSeriesDBSCAN |
| Anomaly Detection | 106 | 93 | 13 | 45 / 84 | All 15 native LibraryTS-AD deep models + IForest, LOF, HBOS, OCSVM, COPOD, ECOD, CBLOF, KNN, MCD, SubLOF, SubOCSVM, SubPCA, CAPA, ClaSP, PELT, GaussianHMM |
| Regression | 21 | 20 | 1 | 18 / 22 | All 17 standalone regressors (Rocket, TimeSeriesForest, InceptionTime, FCN, CNN, ResNet, TapNet, LSTMFCN, MACNN, MCDCNN, CNTC, MLP, SimpleRNN, k-NN) |
| Causal Discovery | 7 | 5 | 2 | 3 / 4 | NOTEARS, PC, GES on continuous Sachs (n=7466, 20-edge DAG) |
| Total | 786 | 698 | 88 | 191 / 327 | 88.8% claim reproduction · 97.4% (186/191) enabled standalone algorithms covered |
Requires Python 3.10 – 3.13 (64-bit). Recommended full Playground & Benchmark environment (Python 3.12 + uv):
git clone https://github.com/NetManAIOps/sktime.git
cd sktime
uv venv --python 3.12 .venv
source .venv/bin/activate
uv pip install -r playground/requirements.txtNote:
playground/requirements.txtpins the CPU PyTorch wheel (+cpu) for compact installs; seeDockerfilefor GPU CUDA builds or installpip install -e ".[all_extras]"for a standardsktimesetup.
Docker quickstart
docker build -t libraryts-playground:latest .
docker run --rm -p 8765:8765 libraryts-playground:latest
# Headless CLI via Docker:
docker run --rm libraryts-playground:latest python playground/libraryts.py catalog --compactDesigned for automated research harnesses, CI verification, and agent tool calls — every invocation returns a single-line JSON envelope on stdout:
# Discover tasks, algorithms, datasets, metrics, and preprocessors
python playground/libraryts.py ls tasks
python playground/libraryts.py ls algorithms --task anomaly_detection
python playground/libraryts.py ls datasets --task forecasting
# Train once & persist model + preprocessor under playground/models/<model_id>/
python playground/libraryts.py train \
--algorithm DLinearForecaster \
--dataset hf-etth1 \
--model-id dlinear-etth1-96 \
--param seq_len=336 --param pred_len=96 --param horizon=96 --param eval_mode=rolling
# Score persisted model without refitting & save full output
python playground/libraryts.py run --model-id dlinear-etth1-96 --compact --out run.json
# Re-score a saved run with extra metrics, or export Python / Markdown reproduction artifacts
python playground/libraryts.py evaluate --from run.json --metric rmse --metric smape
python playground/libraryts.py script --from run.json > reproduce.py
python playground/libraryts.py report --from run.json > report.md
# Fork any catalog algorithm into an editable single-file plugin and validate it
python playground/libraryts.py fork registered-anomaly_detection-ECOD --name my_ecod
python playground/libraryts.py check playground/experiments/my_ecod.pyInstalling the package exposes the libraryts console script (playground.cli.app:app) for anomaly detection and experiment specs:
libraryts ls algorithms --task anomaly_detection
libraryts train --spec experiment.json --output-dir ./artifacts/model1
libraryts predict --spec experiment.json --model-dir ./artifacts/model1 --output-dir ./artifacts/pred1
libraryts evaluate --spec experiment.json --prediction-dir ./artifacts/pred1 --output-dir ./artifacts/eval1
libraryts run --spec experiment.json --output-dir ./artifacts/run1See .agent/skills/libraryts-cli/SKILL.md and .agent/skills/libraryts-cli/references/official-configs.md for detector presets and preprocessing pipelines.
# Launch interactive Playground UI (http://127.0.0.1:8765) and live Benchmark (/benchmark)
python playground/server.py
# Re-run benchmark claims and rebuild the static self-contained leaderboard
python playground/benchmark/reproduce.py --task forecasting
python playground/benchmark/build_state.pyAll estimators remain 100% compatible with the standard sktime Python API:
from sktime.datasets import load_airline
from sktime.forecasting.base import ForecastingHorizon
from sktime.forecasting.theta import ThetaForecaster
from sktime.performance_metrics.forecasting import mean_absolute_percentage_error
from sktime.split import temporal_train_test_split
y = load_airline()
y_train, y_test = temporal_train_test_split(y)
fh = ForecastingHorizon(y_test.index, is_relative=False)
forecaster = ThetaForecaster(sp=12)
forecaster.fit(y_train)
y_pred = forecaster.predict(fh)
print("MAPE:", mean_absolute_percentage_error(y_test, y_pred))Native LibraryTS-AD anomaly detectors expose fit / transform_scores alongside score-based metrics:
import numpy as np
import pandas as pd
from sktime.detection.fits import FITS
from sktime.performance_metrics.detection import evaluate_anomaly_scores
frame = pd.read_csv("sktime/datasets/data/yahoo/yahoo.csv")
X = frame[["data"]]
y_true = frame["label"].to_numpy()
detector = FITS(win_len=64, downsample_rate=2, cut_freq=16, epochs=5)
detector.fit(X)
scores = np.asarray(detector.transform_scores(X)).ravel()
print(evaluate_anomaly_scores(y_true, scores, {"AUC-ROC": {}, "PA-F1": {}, "VUS-ROC": {"sliding_window": 100}}))LibraryTS ships structured skill definitions under .agent/skills/ for autonomous coding agents and cloud evaluation runners:
| Resource | Purpose |
|---|---|
time-series-sandbox |
Repository map, catalog-first workflow, runnable user_cases/, and Playground overview |
libraryts-api |
Headless JSON-envelope CLI reference (playground/libraryts.py) for agent harnesses |
libraryts-cli |
Native libraryts Typer CLI and official preprocessing/hyperparameter configs for TSAD |
aliyun-agent-sandbox |
Alibaba Cloud Agent Sandbox Flash Edition template creation & E2B trace rollouts with TSAgentRuntime |
REPO_METHODS_AND_DATASETS.md |
Complete index of implemented estimators, modules, and datasets |
OPENCLAW_INSTALL.md |
One-line setup and validation guide for OpenClaw integrations |
sktime/ Core sktime estimators + native TSAD zoo, TSLib & foundation adapters
playground/
├── server.py Lightweight HTTP server for Web Playground & /benchmark
├── libraryts.py Headless JSON-envelope CLI (catalog, train, run, evaluate, script, report, fork)
├── cli/ & service/ Typer `libraryts` CLI and modular training/evaluation services
├── catalog.py Dynamic estimator/dataset/preprocessor discovery & snapshot generator
├── runners.py & trainer.py Experiment execution, rolling eval, nested specs & persistence
├── benchmark/ Paper groundtruth claims (786), reproduction runner & static leaderboard
└── requirements.txt Pinned Playground runtime dependencies
.agent/skills/ Agent-readable skill specifications, user cases & catalog snapshot
examples/ & lectures/ Jupyter tutorials and course notebooks
LibraryTS is developed on top of the open-source sktime framework and integrates community contributions from TSLib, TSB-UAD, PyOD, statsforecast, skchange, tslearn, Chronos, Granite TTM, MOMENT, and the broader time-series research ecosystem.
Distributed under the BSD 3-Clause License.

