Agent
With MindsDB, you can create and deploy AI agents that comprise AI models and customizable skills such as knowledge bases and text-to-SQL.
AI agents use a conversational model (like OpenAI or Anthropic) from LangChain utilizing tools as skills to respond to user input. Users can customize AI agents with their own prompts to fit their use cases.
A chatbot can be thought of as an agent connected to some messaging interface.
How to work with AI agents
Create skills
Start by setting up the skills. Here is how you can create and manage skills using SQL API.
-
Creating, inserting into, updating, and deleting a knowledge base:
-
Creating, updating, and deleting a skill that utilizes a knowledge base:
-
Creating, updating, and deleting a text-to-SQL skill:
You can query all skills using this command:
Create an agent
An agent can be created, deleted, queried, and updated. Here is how you can do that using SQL API.
-
Creating an AI agent:
-
Updating an AI agent:
-
Deleting an AI agent:
You can query all agents using this command:
Example
Agents with Text-to-SQL Skills
Start by creating a conversational large language model to be used by an agent.
Then, connect a data source to be used for creating a skill.
Create a skill using one or more tables from a connected data source.
Now that we have a model and a skill, let’s create an agent.
The next step would be to connect a chat app, like Slack, to MindsDB and create a chatbot utilizing this agent.
Learn about chatbots here.
Agents with Knowledge Bases as Skills
In this example, let’s create an embedding model (you can choose one from OpenAI, Hugging Face, or LangChain) for the knowledge base.
Now let’s create a knowledge base that uses this embedding model and the default storage vector database (that is, ChromaDB).
This is how you can insert data into the knowledge base and select it.
Use this knowledge base to create a skill for an agent: