Skip to main content

Retool Agents IDE

The Retool Agents IDE provides the development interface for developing AI Agents. We will start by using a very simple dataset in the Retool Database and ask an Agent to examine the data and answer questions about it. This will help someone new to Agent technology understand how to configure it, integrate it with data, and then run it.

How does an AI Agent work?

OpenAI, Anthropic, and other reasoning models do not have direct access to your data running in your systems as shown in the following image.

LLM lack of data access
LLM lack of data access

A Retool Agent can run within your company’s network, access the reasoning models, and your company’s data, if allowed. Retool Agents use Tools as the mechanism to connect to data.

Retool Agent with a Tool
Retool Agent with a Tool

Data

Before we can build an agent, we need to identify our data source. Retool Database is a safe way to start and can store information and display it in a spreadsheet-like format. To get started, we will provide you with a Comma-Separated Value (CSV) file. The file has the following information.

Column nameDescriptionData type
nameName of the supplierText
street_addressStreet address of supplierText
stateState of the supplierText
assemblyThe assembly that is manufactured.Number
lead_timeTime needed prior to manufacturing to acquire materials necessary for assembly.Number
manufacturing_timeTime needed to manufacture the minimum batch size.Number
delivery_timeTime needed to package and deliver the assembly to the customer.Number
cost_per_unitCost per unit when ordering a minimum batch_size.Number
batch_sizeNumber of units in a batch.Number

Import CSV

The following arcade video demonstrates importing a CSV.

Let’s start by import the following CSV into Retool Database.

  • First download the CSV file: flash_suppliers.csv
  • Select Retool Home > Database > + > Import from CSV.
  • Select the CSV file. A mapping console will display with the table name and columns to import and data type. Leave the values unchanged and select Create table.
Import CSV mapping
Import CSV mapping
  • The table should display the suppliers as shown in the following image with 21 rows of data.
Retool DB Table afer import
Retool DB Table afer import

Retool Agent

Now that we have a simple suppliers table in Retool Database. Let’s create an agent that can access this information and answer questions via chat.

Create an Agent

  • Under Retool Home, Select Agents(Beta)
  • Select + New Agent
  • Select Start from scratch
  • Specify Agent name as Inventory Agent, select an icon box, and a color purple
  • Provide description of agent as:
Inventory agent provides a way to ask about current inventory, suppliers and more.
  • The above image is the completed agent details. Select Create.
New Agent
New Agent
  • This will then display the following Agent configuration as shown below.
Configuration screen
Configuration screen

Retool Agent IDE walkthrough

Let's get oriented within the Agent IDE via the following video.

Configuration Assistant

We start by asking Retool to configure an Agent. Use the following prompt to generate the configuration.

Create a inventory management agent that is able to examine @Retool Database , flash_inventory table and 
answer questions about the suppliers in this table including costs, lead time, manufacturing time and delivery time.
Configuration prompt
Configuration prompt

The following video walks through the configuration.

Tools

The previous prompt will configure the agent and generate a Tool to access the database. Let’s finish the tool by selecting Finish.

Function Generator

When you select Finish, a canvas displays that is unfinished and provides a Function generator. Put the following prompt into the Function generator to have it create a function to connect to the database.

Create a function that queries @Retool database and the flash_suppliers table to return all suppliers information.

The Function Generator may ask for you to @mention Retool Database to make it clear what resource it will be using. In the Function Generator prompt, enter @Retool and you can then select Retool Database.

  • The Function Generator once it has completed thinking will present a plan as to what function blocks it will use such as Params, SQL Query, Response. Accept this plan and the function canvas will be updated with the three blocks it suggested.

  • You can now test the function by selecting Test Function and review the supplier results that are matching what is in Retool Database.

  • Select Done.

  • Select Save.

This will return you to the Agent Configuration screen and the Tool will no longer display an orange Finish button.

Here is a video walking through the process.

Chat

Now that we have a Retool Agent, let’s chat with it to ask questions about this data. Here are sample questions you enter.

  • Select Chat. This will display the chat interface, try the following prompts.

First Prompt

Let’s start simple so that you can validate easily.

My manufacturing location is in Piscataway, NJ. Which of these suppliers is closest to me? 

Second Prompt

Let’s turn up the complexity and see that the Agent identifies the proper rows with the lowest cost.

For assembly 3, which supplier provides the lowest cost per unit using?

Third Prompt

Let’s ask a more complicated question that would take time for everyone to figure out.

I need to order 100 units for assembly 3. Which supplier should I contact to get my assembly quickest?

Summary

Retool Agents IDE provides an interface focused on using the Configuration Assistant and Function Generator to help you develop your Agent and Tools quickly but yet allow for manual modifications if you require it.