Skip to main content

Build your first AI Agent

This tutorial guides you through the process of creating, setting up, and testing a simple AI Agent

. Each section provides clear, step-by-step instructions, making it easy to follow. You’ll also find links to more detailed pages if you want to explore specific topics further. Along the way, we explain not just what to do, but why, so you can gain a solid understanding of how AI Agents work. This guide will help you build a functional AI Agent with confidence.

Create a new AI Agent

To begin, create a new AI Agent where you'll define the logic and overall purpose of the Agent.

  1. Go to Build → AI Agents in the navigation bar.
  2. Click + Create new AI Agent.
  3. Select an agent type. (For this example, we'll use Debt Collection)
  4. Choose a name and set the language your Agent will use.

Configure your AI Agent

In the Setup section

, provide details about your company and its goals. This helps the Agent understand its role and who it represents.

  1. Enter your company's name.
  2. In AI Agent Goal, describe what you want your Agent to do. For example:

Guide the user through the process of paying a subscription.

Knowledge

You can provide the AI Agent with knowledge in two ways:

  • Static knowledge (Collections): This is the information the AI Agent will use to answer questions.
  • Custom guidelines: These are the instructions the AI Agent will follow when crafting its responses.
tip

Think of collections as what the AI Agent should answer, and custom guidelines as how it should answer.

Preset guidelines

Each AI Agent type includes preset guidelines that cannot be deleted. While you can leave them blank, filling them in improves the Agent’s performance. Since we chose the Debt Collection Agent, the preset is Handle Objections.

  1. Identify a possible user objection.
  2. Provide an example response for how the Agent should handle it.
  3. Click + Add objection.
  4. Save your changes.

Example

  • Objection: I don't like using my credit card online.
  • Answer: 💳 **Your payment is secure!** We use **encrypted, PCI-compliant** processing, and your card details aren’t stored. You may also get **bank verification (OTP)** for extra security. Let me know if you need help! 😊

Custom guidelines

Payment process

A key guideline for a Debt Collection Agent is instructing it on how to collect payments. In this case, the Agent must retrieve the user’s ID number in order to generate a payment link. Follow these steps:

  1. Click + Add guideline in the summary card on the right.
  2. Provide a relevant name and description—the Agent will consider them.
  3. A new card appears below Handling Objections. Enter the following instructions in markdown:
## What information should be collected from the user?

We must get the user's ID number to generate a payment link.
Once this information is provided, send the following link to the user: [Payment Link](https://payment.link/)
tip

You can also configure the Agent to pass the user’s ID as a query parameter in the link.

Business hours

In addition to payment handling, you may want the Agent to provide your company’s schedule. Follow the same steps as in Payment process, but use the following content:

## Business Hours

- **Monday – Saturday:** 7:00 AM – 8:00 PM
- **Sunday:** 7:00 AM – 12:00 PM

Testing the AI Agent

Once your AI Agent is configured, you can start testing it. Testing allows you to evaluate how the Agent responds and fine-tune its behavior.

To test the Agent:

  1. Click the Test button in the top-right corner.
  2. A popup chatbox will appear where you can interact with the Agent and review its responses.
  3. In the details section, check the context variables and other runtime information.

For example, if you ask the Agent, "What is your schedule?", it should respond with the business hours you provided. However, since the goal is payment collection, you may want the Agent to more actively guide users toward that task.

To improve this:

  1. Navigate to the Setup section.
  2. In AI Agent Goal, modify the description by adding:
    "**Always** try to complete this task by prompting the user to continue or subtly encouraging them to proceed."
  3. Save changes.
  4. Re-run the test.

This change helps create a more persistent Agent that nudges users toward completing a payment.