Skip to main content
Building an AI Agent lets you automate conversations across your website, WhatsApp, Instagram, email, and more — without writing a single line of code. This guide walks you through the process step by step, from setting up your first agent to configuring how it responds, so you can have it live and handling conversations in just a few minutes.

Step 1: Build your AI Agent

Start by creating a bot and adding an “AI Agent” block to your conversation flow.

Create a bot

  1. Go to Bot Builder
  2. Click Build a Bot.
  3. Select Inbound Bot.
  4. Select the channel where you want to use your AI Agent.
  5. Create your bot.
Once your bot is created, you can build its conversation flow using different blocks.

Add the AI Agent block

The AI Agent block allows your bot to understand user messages and generate responses based on your instructions and knowledge base.
  1. Open your bot in Bot Builder.
  2. Click Add Block.
  3. Select AI Agent.
  4. Add the AI Agent block to your bot flow.
  5. Open the block to configure your agent.
Image
The prompt tells your AI Agent how to behave during a conversation. It defines the agent’s role, response style, boundaries, and the actions it should take.When writing your prompt, clearly define:
  • Role — what the AI Agent is responsible for.
  • Tone — how the agent should communicate with users.
  • Instructions — how it should handle different types of questions.
  • Boundaries — what the agent should and should not answer.
  • Fallback behaviour — what it should do when it does not have enough information.
  • Language — which language or languages it should use.
Keep your instructions clear and specific. Avoid giving the AI Agent conflicting instructions.For example:
You are a customer support assistant. Answer user questions using the information available in the knowledge base. Keep your responses clear and concise. If the required information is not available, do not make up an answer. Instead, offer to connect the user with a support representative.
Learn more

Step 2: Train your AI Agent

Your AI Agent needs relevant information to answer questions accurately. Add this information to a Knowledge Base and connect it to your AI Agent.

Train your knowledge base

You can train your AI Agent using information such as:
  • Website content
  • Product documentation
  • FAQs
  • Business information
  • Policies
  • Support articles
  • Uploaded documents
  • Custom text
To train your AI Agent:
  1. Open the AI Agent block.
  2. Enable Use data from Knowledge Base.
  3. Create a new knowledge base or select an existing one.
  4. Add the sources containing the information your agent needs.
  5. Start training the knowledge base.
  6. Wait for the training to complete before testing the agent.
The knowledge base provides the information your AI Agent uses to answer questions, while the prompt defines how the agent should behave.
Image
Keep your knowledge base accurate and relevant. If the information in your source changes, retrain the knowledge base so the AI Agent can use the latest content.
Image
You can train your AI Agent in 3 ways:
Use a website URL when the information you want your AI Agent to use is already available on your website.To add a website source:
  1. Open your AI Agent and go to the Knowledge base section.
  2. Select Website URL as the source type.
  3. Enter the website URL, domain, sitemap, or individual webpage URL you want to add.
  4. Save the source and start training the knowledge base.
  5. Once training is complete, review the pages that were picked up by the crawler.
Learn more about

Step 3: Test your AI Agent

Before deploying your AI Agent, test it to make sure it understands your instructions and provides the expected responses.

Test the conversation

Use the Test option in Bot Builder to interact with your AI Agent before making it live.Test different types of questions, including:
  • Questions that are directly answered by your knowledge base.
  • Frequently asked customer questions.
  • Questions that require information from different parts of your knowledge base.
  • Questions that should trigger an exit path.
  • Questions outside the scope of your AI Agent.
  • The same question phrased in different ways.
Image

Review responses

While testing, check whether the AI Agent:
  • Provides accurate information.
  • Uses the information from your knowledge base correctly.
  • Follows the instructions in your prompt.
  • Maintains the expected tone and style.
  • Avoids making up information.
  • Triggers the correct exit path.
  • Handles questions outside its scope appropriately.
If the response is not what you expect, update the prompt, knowledge base, or exit paths and test the agent again.

Test questions outside the knowledge base

Also test questions for which the AI Agent does not have an answer.For example: Can you give me the status of an order that isn’t in your system?The AI Agent should follow the fallback behaviour defined in the prompt rather than inventing an answer.
Keep a fixed list of real customer questions and use the same questions whenever you make significant changes. This makes it easier to compare the agent’s performance before and after each change.

Step 4: Deploy your AI Agent

Once your AI Agent is trained and tested, deploy it so users can interact with it on your website.
Image
For this guide, we’ll use the Web Chat deployment.
  1. Open your bot in Bot Builder.
  2. Make sure your AI Agent, knowledge base, and conversation flow are ready.
  3. Click Deploy.
  4. Select the Web channel
  5. Configure the web deployment settings.
  6. Copy the generated installation code.
  7. Add the code to your website.
  8. Save and publish your website.
After adding the code, open your website and start a conversation to verify that the AI Agent is working correctly.You can deploy your AI Agent in different channels. Click Here to Learn more

Your AI Agent is ready

You have now completed the four stages of building an AI Agent:
  1. Build — Create your bot, add the AI Agent block, write the prompt, and configure exit paths.
  2. Train — Connect your knowledge base and provide the information your AI Agent needs.
  3. Test — Test real customer questions and refine your agent’s responses.
  4. Deploy — Publish your AI Agent on your website and customize the web chat widget.
Once your AI Agent is live, continue reviewing conversations and improving its prompt, knowledge base, and flow based on user interactions.
Last modified on November 6, 2026