With an AI Agent you can answer your customers automatically: sales questions, support, appointments or frequently asked questions. This article covers how to create an agent, add its knowledge, train it, test it and connect it to a channel.
Before you start
A 2Chat account with access to AI Agents.
The information the agent will answer with: your website, files, texts, questions and answers or your WhatsApp Catalog.
AI credits: each agent response uses credits, and the amount depends on the model you choose.
A WhatsApp number connected to 2Chat, to put the agent to work. See How to create a WhatsApp connection? or How to connect your WhatsApp Business API channel in 2Chat.
Step 1: Create the agent
Go to AI Agents in the side menu.
Click Create Your First Agent.
Enter a name for your agent.
Under Use Case, choose one: Customer support, Sales and lead generation, Appointment scheduling, Answer frequently asked questions or Other. This article uses Sales and lead generation.
Click Create.
The agent starts with instructions written for the use case you chose. You can change the name and the use case later.
Step 2: Configure the instructions
In the Instructions tab, set how your agent behaves.
Provider and Model: the AI model that writes the answers. More capable models use more credits per response.
Creativity: use a lower value to reduce made-up answers.
Human handoff: the team that receives the chat when the agent hands it off to a person, for example when it can't give a good answer, when a condition in your instructions is met or when the customer asks for a human.
Instructions (System prompt): the personality, context and rules of your agent. Adapt the base text with your requirements and your business information.
When you finish, click Save.
Step 3: Add knowledge sources
Open the Sources tab.
Click Add Source.
Choose the type of source. To use your website, choose Website.
Enter the URL of your website and click Add.
Types of sources
Website: 2Chat reads and indexes the pages of your site.
Files: PDF, DOCX or TXT documents.
Text: content you write yourself.
Q&A: questions with their answers.
WhatsApp Catalog: your products, so the agent can give better answers.
A website source shows Processing while its pages are read. This can take a few minutes, depending on the size of your site.
Step 4: Train and test your agent
Go back to the Instructions tab.
Once your instructions are saved and your sources are loaded, click Train.
Wait while the status shows Training.
When the status changes to Trained, write a message in the Playground to try your agent.
The Usage tab shows the credits your agent uses. In the Settings tab you can change its avatar, name and description, or delete it permanently.
Step 5: Connect your agent to a channel
Connect the agent to your phone numbers so it answers the messages they receive.
Open the Channels tab of your agent.
Click Connect A Channel.
In Channel, select the number. It can be a WhatsApp Web or a WhatsApp API (WABA) channel.
If you want to try it first, enter a number in Test number (optional). The flow only runs when that number writes. Leave it empty to reply to everyone.
Click Connect.
Connecting the channel creates a 2Chat flow. Click Edit Flow to change it, or use the Live switch to turn it on or off.
Your agent is now ready to be used in a 2Chat flow. You can also add it to your own flows with the Engage with AI component, so it can answer your customers when you are unavailable. See Flow component: Engage AI Agent.
