Build an 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’ll 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.Scenario
Imagine you own a gym and want to use Moveo’s AI Agent (referred to as "Agent") to help customers pay their subscriptions. To achieve this, you'll need to:
- Create a new Debt Collection AI Agent.
- Set up the AI Agent's knowledge.
- Adjust the #greetings dialog.
Create a New AI Agent
To start, create a new AI Agent to define the logic of your AI Agent. Follow these steps:
- Navigate to Build → AI Agents in the sidebar.
- Click + Create new AI Agent.
- Select Debt Collection as the agent type.
- Choose a name and set the language your Agent will use.
Configure Your AI Agent
In the Setup section
, share details about your company and its goals. This helps the Agent always understand its role and who it represents.- Enter your company's name.
- In AI Agent Goal, describe what you want your agent to do. For example:
Guide the user through the process of paying a subscription at Moveo Gym.
Knowledge
You can provide the Agent with information in two ways:
- Knowledge (Collections) for general company or product details.
- Custom guidelines to train the LLM on handling specific scenarios.
Preset Guidelines
Each AI Agent type includes preset guidelines that cannot be deleted. While you can leave them blank, filling them in enhances the Agent’s performance. Since we chose the Debt Collection Agent, the preset is Handle Objections.
- Identify a possible user objection.
- Provide an example response for how the Agent should handle it.
- Click + Add objection.
- 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
Since we’re building a Debt Collection Agent, a key guideline is instructing the Agent on how to collect payments. To integrate with our gym, the Agent must retrieve the user’s ID number to generate a payment link. Follow these steps:
- Click + Add guideline in the summary card on the right.
- Provide a relevant name and description—the Agent will consider them.
- 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/)
You can also configure the Agent to pass the user’s ID as a query parameter in the link.
Gym Schedule
We also need to inform the Agent about the gym’s schedule. The steps are the same as in Payment Process, but the body should be:
## Business Hours
- **Monday – Saturday:** 7:00 AM – 8:00 PM
- **Sunday:** 7:00 AM – 12:00 PM
Testing the AI Agent
Now that our AI Agent is set up, it’s ready to start receiving messages. But before deploying it to production, we should test how it behaves. Testing allows us to fine-tune its responses to better match our goals.
To test the Agent:
- Click the Test button in the top-right corner.
- A popup chatbox will appear, where you can interact with your Agent and review its responses.
- In the details section, you can check the context variables in use and other useful information.
For example, if we ask the Agent, "What is your schedule?", it should respond correctly. However, since our goal is to encourage payment collection, we might want the Agent to be more persistent.
To adjust this, we can refine our guidelines:
- Navigate to the Setup section.
- Under AI Agent Goal, modify the guideline by adding:
"**Always** try to complete this task by prompting the user to continue or subtly encouraging them to proceed."
- Save changes.
- Re-run the test.
This results in a more goal-oriented Agent that consistently encourages users to proceed with payment.