This guide provides an example of setting up various AI Agentic components, as well as developing and deploying an AI Agent using the Canso AI Agentic System.
We'll create a simple sql-agent that can execute SQL queries based on natural language prompts.
To get started, install Gru by following the instructions here
Setting up the components
Our sql-agent utilizes CansoSQLRunnerTool, which relies on a Task Server to execute the SQL queries. For orchestration between the agent and the Task Server, we also need a Broker. In addition, the agent uses Checkpoint DB to save its state. Let us set up these components.
To set up the components, we first define a YAML file with the configurations for the components. Save the YAML defined below in a file named config.yaml.
sql-agent is now deployed in your cluster and ready to receive prompts!
Prompting the sql-agent
To prompt our sql-agent, we create a file prompt.json with the prompt.
{
"messages": [
{
"type": "human",
"content": "Create a database table with name cars. It should have 3 columns: brand which will be a string, model which will also be a string and year which will be an integer."
}
]
}
Now we execute the gru command to prompt the agent.
gru agent prompt sql-agent prompt.json
A table name cars should be created in your database!
Congratulations! You have successfully created and deployed an AI Agent using Canso AI Agentic System!