Your sklearn model, now something an LLM can actually call
predikit wraps trained sklearn/XGBoost models as typed, schema-carrying tools for OpenAI, LangChain, or MCP — without the glue code.

What it does
You hand it a fitted estimator plus a Pydantic input schema, and it produces a tool object with auto-generated JSON schema, validated inputs, and one-line exports: .to_openai(), .to_langchain(), .to_callable(). The LLM sees a named tool with a description; behind it, Pydantic v2 checks every argument before the model ever runs. There’s also a ToolRegistry for bulk export and an MCP server mode for serving a registry to MCP clients.
The interesting bit
The boring details are the value: it maps inputs to features by name, not position, and raises a precise error telling you which schema fields don’t match the training columns. It also coerces LLM-isms like "yes"/"1" into real booleans before validation — the exact class of silent failure you’d otherwise debug at 2am.
Key highlights
ModelEnsembleruns multiple wrapped models in parallel with five reconciliation strategies (mean,vote, weighted variants,collect)- Confidence-aware routing:
confidence_thresholdplus warn/raise/fallback modes for classifiers withpredict_proba - Loaders for MLflow and Snowflake model registries
- Async support via
ainvoke() - Optional CLI extras for
predikit inspectandpredikit serve
Caveats
- Scikit-learn and XGBoost only — no PyTorch/transformers support
- Field names in your Pydantic schema must exactly match training column names; numpy-trained models fall back to field order with no name checking
- Confidence routing only works for classifiers exposing
predict_proba
Verdict If you have tabular models sitting in a registry and agents that should be calling them, this removes a genuinely tedious layer. If your models are deep learning or your agents don’t need typed tool I/O, it’s not for you.
Frequently asked
- What is Tejas-TA/predikit?
- predikit wraps trained sklearn/XGBoost models as typed, schema-carrying tools for OpenAI, LangChain, or MCP — without the glue code.
- Is predikit open source?
- Yes — Tejas-TA/predikit is open source, released under the MIT license.
- What language is predikit written in?
- Tejas-TA/predikit is primarily written in Python.
- How popular is predikit?
- Tejas-TA/predikit has 856 stars on GitHub.
- Where can I find predikit?
- Tejas-TA/predikit is on GitHub at https://github.com/Tejas-TA/predikit.