Tejas-TA/predikit
The missing bridge between your ML models and your AI agents.
What it solves
predikit removes the tedious glue code required to make traditional machine learning models (like those from scikit-learn and XGBoost) callable by LLM agents. It automates the creation of JSON schemas, handles input validation and type casting, and provides a standardized way to integrate these models as tools for AI agents.
How it works
The library wraps a trained ML model in a ModelTool object. By defining a Pydantic BaseModel for the input schema, predikit automatically generates the necessary JSON schemas for LLM APIs (such as OpenAI or LangChain). It ensures that the input field names exactly match the model's training features and handles the execution of the model's .predict() method, returning the result in a structured format.
Who it’s for
Data scientists and AI engineers who want to expose their trained predictive models as tools for LLM-powered agents without writing manual boilerplate for API schemas and validation.
Highlights
- Auto-generated Schemas: One-line exports to OpenAI function-calling and LangChain
StructuredToolformats. - Model Ensembles: Built-in strategies to combine multiple models via voting, averaging, or collection.
- Confidence Routing: Ability to warn, raise errors, or route to a fallback tool when a classifier's prediction confidence is below a specified threshold.
- Registry Loaders: Direct integration with MLflow and Snowflake Model Registries to load models without manual loading code.
- MCP Server Support: Ability to serve a tool registry over the Model Context Protocol (MCP) via CLI or in-process server.
- Type Safety: Uses Pydantic v2 for strict input validation and automatic coercion of LLM-generated strings (e.g., "yes" to
True).
Related
- Project
- Project
- Project
- Project
- Project