Installation¶
skforecast-ai needs Python 3.10 or newer and is available on PyPI. The core package runs the whole forecasting pipeline offline, with no API key; the LLM reasoning layer and the foundation model backend are optional extras.
To try it before installing anything, open Your first forecast in Google Colab: its first cell installs the package.
Install¶
Profiling, planning, forecasting, backtesting, comparison and the CLI. No LLM, no network access at run time.
pip install skforecast-ai
Adds ask() and the LLM-guided variants of refine_plan() and create_cv(). Enough for OpenAI, Anthropic, Google, Groq, Ollama and any OpenAI-compatible endpoint.
pip install "skforecast-ai[llm]"
The LLM layer plus the AWS client that Bedrock needs.
pip install "skforecast-ai[bedrock]"
Adds the backend of Chronos-2, the default model of ForecasterFoundation, so it can run in forecast(), backtest() and compare(). Scripts that use it can be generated without it.
pip install "skforecast-ai[foundation]"
To install a specific version, pin it (pip install skforecast-ai==0.4.2). The development version, which may be unstable, installs from GitHub:
pip install git+https://github.com/skforecast/skforecast-ai@main
To work on the code, see the Contribution Guide.
Check the installation¶
The snippet below downloads a small monthly dataset, evaluates a model on its last 12 months and prints the metrics. It runs in deterministic mode, so it needs no LLM and no configuration.
from skforecast.datasets import load_demo_dataset
from skforecast_ai import ForecastingAssistant
data = load_demo_dataset(verbose=False)
assistant = ForecastingAssistant()
result = assistant.forecast(data=data, target="y", steps=12, test_size=12)
print(result.metrics)
If the installation works, it prints one row of metrics:
series MAE MSE MASE MAPE
0 y 0.078442 0.008933 0.802828 0.088608
The command line interface is installed with the package:
skforecast-ai --version
Check the LLM configuration¶
With the LLM extra installed, check-llm reports how the provider, the model and the credentials resolve, without calling the model. It exits with an error when something is missing, for example the API key:
export OPENAI_API_KEY="sk-..."
skforecast-ai check-llm --llm openai:gpt-5.5
The same check is available in Python as assistant.check_llm(). Configuring the LLM covers every provider and its credentials.
Optional dependencies¶
| Extra | Adds | Use it for |
|---|---|---|
llm |
pydantic-ai, the only LLM abstraction the package uses | OpenAI, Anthropic, Google, Groq, Ollama and OpenAI-compatible endpoints |
bedrock |
pydantic-ai with its Bedrock support, and boto3 |
Amazon Bedrock |
mcp |
mcp, the Model Context Protocol SDK | The MCP server for coding agents |
all |
Every provider-specific dependency and the mcp extra (full is an alias) |
Several providers in the same environment |
foundation |
chronos-forecasting, the backend of Chronos-2 |
Running ForecasterFoundation with its default model |
The core dependencies (skforecast, pandas, pydantic, statsmodels, typer and rich) are listed with their versions on PyPI.
Without the foundation extra, compare() leaves ForecasterFoundation out of the automatic candidates with a MissingBackendWarning. Other foundation models (TimesFM, Moirai, TabICL, ...) need their own backend; skforecast names the package to install when it is missing.
Groq
The groq extra (pip install "skforecast-ai[groq]") is kept for backwards compatibility. Groq support is already included in the llm extra.
Next steps¶
-
Your first forecast
From raw data to a validated forecast and the script that produced it, with no LLM.
-
Ask the assistant
Connect an LLM to explain results, add domain knowledge to the plan and describe the deployment.