sktime for AI agents
Agents that speak sktime.
sktime works with AI agents in three ways: a skill that teaches them the framework, an MCP server that lets them run it, and harnesses that put a language model in a loop. This page explains each one and how they combine.
Compared
How they differ
A skill is what an agent knows, MCP is what it can do, and a harness is the loop that decides what happens next. You can use one of them or all three.
Skills
What the agent knows
A SKILL.md plus topic references. The agent reads them and writes idiomatic sktime code.
- It gives the agent
- Knowledge
- Who drives
- Your agent
- You get back
- Better code
MCP
What the agent can do
A server that exposes sktime's registry as tools: discover, instantiate, fit, predict, evaluate.
- It gives the agent
- Tools
- Who drives
- Your agent
- You get back
- Results and handles
Harnesses
What runs the loop
A loop around a language model. sktime ships one, AutoResearchForecaster, and works with others.
- It gives the agent
- A working loop
- Who drives
- The harness
- You get back
- A fitted estimator
What the agent knows
Skills
The sktime skill is a folder an agent can load: one SKILL.md and eleven reference files. It records the conventions that are easy to get wrong, so the code the agent writes works with the framework.
Look models up
Find models with all_estimators and capability tags instead of guessing class names.
Install dependencies
Pass the constructor spec to sktime.registry.deps and install what it returns before fitting.
Evaluate fairly
Keep a naive baseline, fit transformers inside the pipeline and treat intervals as model statements.
1---2name: sktime3description: Time series learning tasks with sktime ...4license: BSD-3-Clause license5allowed-tools: Read Write Edit Bash6compatibility: Requires Python 3.11+ and sktime 1.2.07---89# sktime1011## Discovery12Search the model zoo with all_estimators ...1314## Best practices15- Keep a naive baseline on the same task.16- Fit transformers inside the pipeline.17- Install what deps returns before fit.Excerpt, shortened. The current skill targets sktime 1.2.0 and Python 3.11+.
Eleven topic references
- references/forecasting.md
- references/classification.md
- references/regression.md
- references/clustering.md
- references/detection.md
- references/transformations.md
- references/composition.md
- references/distances.md
- references/benchmarking.md
- references/datasets_evaluation.md
- references/extensions.md
What the agent can do
MCP server
sktime-mcp is a Model Context Protocol server. It gives a language model access to sktime's registry, so the agent can find valid estimators, check what they support and run workflows on your data.
sktime is the source
Model metadata comes from all_estimators, estimator tags and sktime's API contracts.
Registry first
The server starts from the registry, adds the estimator semantics, and only then executes. It does not infer anything from source files.
Small surface
Tools to find, describe, build, run and save models, plus a shell for setup work.
Connect it
Add this to your MCP client config, for example Claude Desktop. uvx fetches the server on first use.
1{2 "mcpServers": {3 "sktime": {4 "command": "uvx",5 "args": ["sktime-mcp"]6 }7 }8}Runs over stdio for MCP clients such as Claude Desktop and Claude Code, or over HTTP and SSE.
What the agent can call
- Discover
- Find demo data, estimators, tags and component details.
list_available_dataquery_registrydescribe_component - Bring data
- Load files, inline data, SQL or URLs into handles. Inspect, clean, split, persist.
load_data_sourceinspect_datatransform_datasplit_datasave_data - Build and run
- Create estimators or pipelines, fit them, forecast, update.
instantiatefitpredictupdateget_fitted_paramscall_method - Evaluate
- Cross-validate, generate Python code, persist fitted models.
evaluateexport_codesave_modelload_model - Manage state
- See what is in memory, clean up, track async work.
list_handlesrelease_handlerelease_data_handlelist_jobscheck_job_statuscancel_job - Plot and shell
- Plot a series, or run a shell command on the host, say to install a package.
plot_seriesrun_command
Prompt → Tool call → Handle → Next prompt
Security
The run_command tool runs any shell command on the host, without a sandbox and with the rights of the user who started the server. Only run the server where you would let the agent run its own code, and keep the HTTP endpoint behind its token.
What runs the loop
Harnesses
A harness is the loop around a language model. It defines what the model may propose, how the result is checked, and what is fed back. Skills and MCP equip an agent; the harness sets how it works.
One harness among several
AutoResearchForecaster is sktime's own harness. It is part of the library and works on forecasting. Coding agents that load the skill and connect the MCP server are harnesses too, with a person steering. sktime does not tie you to any one of them.
AutoResearchForecaster
A language model designs the pipelines and sktime judges them. After fit you hold an ordinary forecaster.
- 01
Propose
The LLM sees a description of your data and the registry, and proposes candidate pipelines as specifications.
- 02
Build
sktime builds each specification with craft(). If one fails to build or run, it counts as failed and the error goes back to the LLM.
- 03
Score
Each candidate is evaluated on your data with a real cross-validation splitter.
- 04
Refine
The scores go back to the LLM, which proposes improved candidates for the next round.
1from sktime.datasets import load_airline2from sktime.forecasting.agentic import AutoResearchForecaster3from sktime.split import SingleWindowSplitter45y = load_airline()67forecaster = AutoResearchForecaster(8 cv=SingleWindowSplitter(fh=3),9 model="openai/gpt-4o-mini",10)11forecaster.fit(y, fh=3)12y_pred = forecaster.predict()best_forecaster_ is a normal sktime forecaster. You can inspect it, serialize it and run it without the LLM.
Any provider
Model calls go through litellm, so any provider it supports works. Set its API key in your environment.
It uses tokens
The search calls the model in every round, so it costs tokens.
Runs can differ
With a language model in the loop, two runs can end on different pipelines.
Other harnesses
The skill and the MCP server are open, so any agent harness can use them. AutoResearchForecaster fits when you want a forecaster built for you. The skill and MCP fit when you want an agent to work alongside you.
AutoResearchForecaster was contributed by Benedikt Heidrich.
Questions about agentic workflows?
The core team can go through how skills, MCP or a harness fit your setup. 60 minutes, free, no commitment.