ForecastAgent 1.0
ForecastAgent 1.0 is a professional, production-ready Python SDK and Serving API for Zero-Shot Time Series Forecasting, powered by the TiRex-2 xLSTM-based time series foundation model.
With ForecastAgent 1.0, you can run accurate, probabilistic time series forecasting out of the box with zero training, or deploy a self-hosted SaaS API for scalable production workloads.
Key Features
- Zero-Shot Generalization: Perform high-quality forecasting on new time series datasets without fine-tuning.
- Probabilistic Quantiles: Predicts 9 distinct quantiles (from 10th to 90th percentile) to model uncertainty.
- Covariate Support: Supports both past (historical) and future (known ahead of time) covariates.
- Windows & Linux Native: Includes automated monkeypatches to support execution on Windows hosts bypassing Triton and MSVC compiler dependencies.
- FastAPI Serve: Built-in CLI command to spin up a high-performance serving backend.
Installation
From PyPI
pip install forecast-agent-sdk
From Source
Clone this repository and install the package in editable mode:
git clone https://github.com/shinydatatech/ForecastAgent.git
cd ForecastAgent
pip install -e .
Dependencies
The package requires:
torch>=2.0.0numpyxlstm>=2.0.0fastapi,uvicorn,pydantichuggingface_hub
Quickstart
1. Python SDK Usage
Load the model (either from Hugging Face or a local directory) and run zero-shot forecasting:
from forecastagent import ForecastAgent
# Load the model (automatically downloads weights from Hugging Face if not cached)
agent = ForecastAgent.from_pretrained("shinydatatech/forecastagent-v1.0")
# Input target history (e.g., hourly electricity consumption)
history = [10.2, 11.5, 12.1, 11.8, 13.0, 14.5, 15.2, 14.8, 13.9, 13.1]
# Predict 3 steps forward
results = agent.predict(
target=history,
prediction_length=3,
freq="h"
)
print("Median Forecast (50th percentile):", results["median"])
print("Lower Bound (10th percentile):", results["lower"])
print("Upper Bound (90th percentile):", results["upper"])
print("All 9 Quantiles:", results["quantiles"])
2. Launch Serving API Server
You can launch the FastAPI server via the command-line interface:
# Launch server locally on port 8000
forecastagent-api --model-path shinydatatech/forecastagent-v1.0 --port 8000
API Endpoints
GET /: Health check and model metadata.POST /v1/predict: Forecast endpoint.{ "instances": [ { "target": [10.2, 11.5, 12.1, 11.8, 13.0], "start": "2026-07-01T00:00:00", "freq": "h" } ], "prediction_length": 3 }
Publishing Model & Package
For detailed step-by-step instructions on:
- Publishing merged model checkpoints to Hugging Face
- Building distribution packages (
.whl/.tar.gz) - Setting up automated release pipelines via GitHub Actions
Please refer to the Implementation & Publishing Guide.
License
Licensed under the Apache License, Version 2.0. See LICENSE for details.
Metadata
Release files for forecast-agent-sdk 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| forecast_agent_sdk-1.0.0.tar.gz | 50.3 kB | Without provenance | Details for forecast_agent_sdk-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| forecast_agent_sdk-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for forecast_agent_sdk-1.0.0-py3-none-any.whl |
Total release size: 110.7 kB
Release files / forecast_agent_sdk-1.0.0.tar.gz
| Download URL | forecast_agent_sdk-1.0.0.tar.gz |
|---|---|
| Size | 50.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dc01b51415baef54584378a28d91571985e253060e66b222a3985a488242c23b
|
|
BLAKE2b-256 checksum How to use checksums |
f428de0a409c063ae453b292c0fcbbdc8e3465dc817630b8131dae96fc8fd4a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / forecast_agent_sdk-1.0.0-py3-none-any.whl
| Download URL | forecast_agent_sdk-1.0.0-py3-none-any.whl |
|---|---|
| Size | 60.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b4c1e96b11c24a8a245c9cbb92318d38d559ed769f26cd063b480de9b553305f
|
|
BLAKE2b-256 checksum How to use checksums |
5c806fa1a10e3036991116c447558a6e0fd543b793bb1eae27402649df0de52f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Security for forecast-agent-sdk 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.