# Modelbit MCP for AI Agents AI Agent Connect

> Modelbit (ML Model Deployments) lets you run your production machine learning models directly from your AI agent. Instead of writing glue code or managing complex API calls, you can just ask your agent to get a prediction. It connects your Modelbit workspace to your chat interface so you can test, showcase, and integrate ML outputs in real-time without leaving your workspace.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_U02S7R70GaoTP6dztOIIMDtmgDyuN2GTH3Or66r0/ai-agent-connect
- **Tags:** machine-learning, mlops, inference, model-deployment, python-models

## Description

This Connector connects your Modelbit workspace to any AI agent to run production-grade machine learning models through natural conversation. You've spent weeks training a model, tuning hyperparameters, and getting it ready for production. The hardest part is often getting that model to actually talk to the tools you use every day. This connection closes that gap. It lets you pull your deployed machine learning models into your daily conversation with an AI agent. Instead of jumping back and forth between a notebook and a production dashboard, you can just tell your agent to run a prediction or check a score. It handles the heavy lifting of passing complex data structures to your ML backend and bringing back the results instantly. You can point your agent at specific versions of your models to keep things consistent, which is a lifesaver when you're trying to debug a specific production behavior. It's a way to make your data science work more interactive and less manual. By adding this to your Vinkius setup, you're basically giving your agent a specialized brain for custom logic. Whether you're checking a fraud score, running a sales forecast, or processing image data, the results show up right in your chat. It's about moving from 'how do I call this API' to 'just give me the answer.' You get to stay in your flow while the agent handles the technical details of the inference request.

## Tools

### get_inference
Pass data to your ML models and get the computed output instantly. This lets your agent interact with your production inference endpoints.

## Prompt Examples

**Prompt:** 
```
Call the 'sales_forecast' model with data: {'region': 'north', 'month': 12}.
```

**Response:** 
```
I've sent the request to the 'sales_forecast' deployment. The model predicts a revenue of **$450,000** for the North region in December.

**Summary Table:**
| Region | Month | Predicted Revenue |
| :--- | :--- | :--- |
| North | 12 | $450,000 |
```

**Prompt:** 
```
Get an inference from 'image_classifier' version 'v2' for this input array of pixel values.
```

**Response:** 
```
Using version **v2** of 'image_classifier', the model has identified the object as **high-resolution satellite imagery** with 98% confidence.

*   **Confidence Score:** 0.98
*   **Object Type:** Satellite Imagery
*   **Version Used:** v2
```

**Prompt:** 
```
Run the 'fraud_detection' model on the latest transaction data.
```

**Response:** 
```
I've executed the request for 'fraud_detection'. The model flagged the transaction as **low risk**.

**Details:**
*   **Risk Score:** 0.02
*   **Status:** Approved
*   **Flag:** None
```

## Capabilities

### Run production ML predictions
Call your deployed models to get real-time results without writing extra code.

### Pinpoint specific model versions
Ensure your agent uses the exact tag or version you need for consistent results.

### Pass complex data structures
Send full JSON objects or arrays to your models without worrying about manual formatting.

### Bridge notebooks and agents
Connect your training environment directly to your daily chat interface.

### Get instant inference results
Receive computed outputs immediately after the agent sends the data to the backend.

## Use Cases

### Real-time Fraud Detection
A security analyst asks the agent to check a transaction. The agent uses get_inference to pull the live risk score from the fraud_detection model.

### Dynamic Sales Forecasting
A sales lead asks for a Q4 forecast. The agent pulls the latest regional data and runs it through the sales_forecast model to provide a summary.

### Image Classification Testing
A researcher sends a pixel array to the agent. The agent calls the image_classifier model to identify the object and reports the confidence score.

### Proprietary Pricing Logic
A product manager asks for a price point. The agent sends current inventory data to the ML model to get a recommended price for a specific item.

## Benefits

- Stop writing glue code. Use get_inference to let your agent handle the API calls for your ML models automatically.
- Maintain consistency. Specify model tags or versions to ensure your agent doesn't pull the wrong version of a prediction.
- Handle complex data. Send full JSON objects or arrays directly to your models without worrying about manual string formatting.
- Faster prototyping. Move from a notebook to a functional AI workflow in minutes instead of days of development.
- Real-time feedback. Get immediate results from your Python, Scikit-learn, or PyTorch models right inside your chat window.

## How It Works

The bottom line is you get to run production ML models through a chat interface without writing any extra glue code.

1. Subscribe to this Connector and enter your Modelbit Workspace name.
2. Enter your Modelbit API Key if you are using private deployments.
3. Ask your agent to run a prediction on a specific model and receive the results in the chat.

## Frequently Asked Questions

**Can I use my existing Modelbit models with this Connector?**
Yes, this connects your Modelbit workspace so your agent can call your already deployed models.

**Does this work with my Python models?**
It supports models deployed via Modelbit, including those built with Python, Scikit-learn, and PyTorch.

**How do I ensure the agent uses the right version of my model?**
You can specify exact version tags like 'v2' or 'latest' when asking your agent to run a prediction.

**Can I send complex data to my ML models?**
Yes, your agent can pass JSON objects and arrays directly to the model for inference.

**Is this for production use?**
It's designed for production-grade inference, allowing you to bridge the gap between your ML backend and your AI assistant.

**Do I need to write any code to connect this?**
No, once you subscribe and enter your workspace name, your agent handles the tool calls for you.

**Can I specify which version of a model to use for inference?**
Yes. When using the `get_inference` tool, you can provide an optional `version` string (e.g., 'v1', 'latest', or a specific tag) to target a precise deployment.

**What format should the input data be in?**
The `get_inference` tool accepts a `data` parameter which should be a JSON object or array, matching the input schema expected by your Modelbit deployment.

**Is an API Key required for all models?**
The `MODELBIT_API_KEY` is optional. It is only required if your Modelbit deployment is private. Public deployments only require the `MODELBIT_WORKSPACE` name.