• TRAINING
  • INFERENCE
  • AUDIT
  • HUMAN

How to train and run SQL models with your agent

Connect MindsDB to your AI client to turn your database into a predictive engine using standard SQL.

Ask AI about this page

Our technology reaches across leading technology and enterprise teams.

  • Amazon
  • NVIDIA
  • Red Hat
  • Fidelity Investments
  • Intuit
  • OLX Brasil
  • Writesonic
  • Artium
  • Trolley
Bunny World Voxel Workspace

Short answer

How can I use SQL to train and run AI models?

You use standard SQL commands to tell MindsDB to train predictors on your data and then query those models for results. Your AI client handles the conversation while the database executes the math. You get immediate predictive insights from your existing tables.

The results of your requests

Where your data turns into intelligence

Your agent manages the lifecycle of a model from creation to inference.

TRAINING

New model creation

Your agent sends SQL to MindsDB to build a predictor from your tables. You get a functional model ready for queries.

INFERENCE

Real-time predictions

Your agent runs SQL to pull predictions from active models. You get instant answers based on your live data.

AUDIT

Model status checks

Your agent checks which models are active or still training. You get a clear view of your predictive assets.

HUMAN

Logic and tuning

You decide which SQL logic to use for training. Your agent executes your commands, but you control the model parameters.

The workflow

What your agent does when you ask for a model.

Your agent translates your intent into SQL commands that MindsDB understands.

  1. Check available models

    Your agent looks at your MindsDB instance to see what predictors are already built and ready to use.

    list_models
  2. Inspect model settings

    If you ask about a specific predictor, your agent pulls its configuration and metadata.

    get_model
  3. Trigger training

    Your agent sends the SQL instructions needed to train a new model on your specific data tables.

    execute_sql_query
  4. Get predictions

    Your agent runs the SQL required to generate real-time predictions from your trained models.

    execute_sql_query

Vinkius Agentic Execution Platform

State the outcome. Agents take it from there.

You don't have to drive this run by hand. Inside the Vinkius Agentic Execution Platform, agents pick up the task above and carry it to the end: you set the limits, you watch the steps, you keep all decisions.

Run it in Vinkius

Agents carry the task to the end

Agents execute MindsDB tasks from end to end inside the Vinkius Agentic Execution Platform: set the outcome, and the steps run.

Take it to any compatible AI

One connection, any client

Same connection follows you to ChatGPT, Claude, Gemini and any other client you love. Switch whenever you want: your connection, your permissions and your record move with you.

Spaces

One Space per activity

A Space gathers the context, tools and tasks of one activity, so you coordinate several agents at once and follow each execution as it happens.

Limits

Autonomy inside limits you set

Permissions and spending limits are yours to define. Agents halt for your approval on anything sensitive, and you choose how far autonomy goes, step by step or end to end.

Record

All steps, on the record

Each action your agents take lands in a signed audit trail. Results are verified, mistakes are learned from, and an emergency stop is one click away.

Models

Included in your plan

A curated selection of AI models is included in your plan, and you can add your own through BYOK whenever you prefer.

Try it

Copy these to start.

Use these prompts to interact with your data immediately.

Starting points

Swap the names in quotes for your actual table or model names.

MindsDB Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_wo8z4btUozCcWNcaSyNerjmMILAoiY0Mm4LOh9m9/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat, MindsDB capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "mindsdb-ai-database-predictors-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_wo8z4btUozCcWNcaSyNerjmMILAoiY0Mm4LOh9m9/mcp"
    }
  }
}
Copy into chat04
  • 01

    List all the models currently in my MindsDB instance.

  • 02

    Show me the details for the 'customer_churn' model.

  • 03

    Train a new model using my 'sales_history' table.

  • 04

    Predict the next order date using the 'delivery_predictor' model.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect MindsDB once, then ask.

Connect your account in one click. Your credentials stay encrypted, and you can start querying your database through your AI client right away.

Connect MindsDB to your agent

FAQ

How this task behaves

  • 01

    Can your agent delete my database tables?

    No. The tools only allow for model management and SQL execution. Your agent cannot drop or delete your underlying tables.

  • 02

    Does your agent write the SQL for me?

    Yes. When you ask to train a model or get a prediction, your agent generates the SQL and runs it via the execution tool.

  • 03

    Can your agent create new database schemas?

    No. Your agent is limited to the tools provided, which do not include schema modification or table creation.

  • 04

    Can I see the training progress?

    Yes. You can ask your agent to check the status of your models to see if they are still training or ready.

  • 05

    Can your agent manage my database users?

    No. There are no tools available for user administration or permission management.

  • More questions about MindsDB? See everything the MindsDB Connector can do

Building with AI? Ship this whole workflow in your product.

Vinkius Connect is the connectivity layer for AI builders. All the capabilities used on this page, from MindsDB to thousands more, arrive through one SDK, already maintained for you. One Application, unlimited seats, each with their own connectors and credentials, isolated and never exposed to Vinkius. No OAuth flows to write, no tokens to store, no APIs to chase.

Explore Vinkius Connect

TypeScript · Python · Java · Go · C# · PHP · Rust

  • 01

    Your customers bring their own keys.

    Each user connects their own apps and keeps their own credentials. Vinkius only sees the identifier your backend sends.

  • 02

    Whole catalog, kept current.

    MindsDB plus thousands more, maintained and growing daily. No integrations to write, no token storage, no OAuth plumbing.

  • 03

    Any agent, any model.

    Capabilities land as framework-neutral objects, with adapters for OpenAI, Anthropic, Gemini, the Vercel AI SDK, LangChain and more.

Connect MindsDB to Claude, Cursor, ChatGPT & more

From idea to done

See what gets done when the agents take over the busywork

Each workflow on this page runs on the same platform. Connect your tools once, and your agents keep working in any AI you trust.