Skip to main content
Creating your first AI Agent

Follow these steps to create your first AI agent

Updated over 3 weeks ago

πŸ’‘ Before creating your agent, make sure to complete these steps first:
- Install the application
- Grant table access to your AI Agent

- Set up access to your users
​
If you want to have data ready to be used, follow this step to create a sample database.

1. Creating the AI Agent

Select the Agent

The first thing to do is to choose the AI agent that aligns with your goal:

Write the SQL query for the Agent

Make sure to Grant table access to your AI Agent before moving on.

The next step is to write down the SQL query the AI agent will be using to fetch the data.

There are a set of required table columns that the agent needs to work as expected. See below:

🀚 Required Table Columns:

  • ID: Unique identifier for each document

  • TEXT: The content to be analyzed (e.g., ticket message, survey response)

  • CREATION_DATE: Timestamp for temporal analysis and trend detection

  • USER_ID: Customer identifier for user-level insights

Here is an example query that include the required columns (using an alias):

SELECT 
m.ID,
m.CANCELLATION_REASON as TEXT,
m.DATE as CREATION_DATE,
m.USER_ID,
u.PLAN_TYPE
FROM lang_ai_demo.public.zoom_cancellations m
JOIN lang_ai_demo.public.zoom_users u WHERE u.ID = m.USER_ID;

In "Selected View", click on "Create a new one" and paste the SQL query for your agent:

Include additional columns as metadata

You may include additional columns that can be used by the AI agent to aggregate the insights generated. In the example below, the column called user_plan is not mandatory, but we included it so o the agent is able to group the insights by the user's subscription plan. You may change this or include new attribute after creating the agent.

This is how a preview looks like:

2. Reviewing the Insights of Your AI Agent

Navigate your Agent insights

Once the agent has finished processing you can navigate through the data by sorting and searching:

Navigate Your Agent Insights


Review the data associated with the insights

To view the unstructured text that was analyzed to generate an insight, simply click on the specific insight.

Additionally, you have the option to download the data from your active filters by clicking on Download CSV.

3. Connecting to Slack (optional)

The final step is to connect your AI agent to a Slack channel. This will enable the AI agent to send new insights directly to the selected Slack channel, keeping you informed in real-time. Note that this step is optional. Learn more here.

After you've successfully created and run an agent, the system will automatically send the insights to the Slack channel you specified during setup.


​

Slack message example

Related Resources

Did this answer your question?