Table of Contents

How to test your agent

Desirée M Updated by Desirée M

Test a Web agent with Preview while you build it, then with its share link once you publish it. Preview runs your latest changes without publishing them, and the share link runs the version your visitors see. WhatsApp, Facebook Messenger and APIchat agents each have their own way to test.

🌐 How to test a Web agent

How to test your changes with Preview

To test your changes before you publish them, click Preview in the top-right corner of the builder, next to Publish.

Landbot builder top bar with the Preview and Publish buttons

Preview opens Live Preview, which updates as you build: every change you make in the builder shows there, without publishing it. Conversations in Preview don't count as chats or AI chats, so you can test as often as you need without touching your agent's analytics or your plan's usage.

Preview runs every block of the flow, AI agents included. An AI Agent block answers from its instructions and hands the conversation back through its exits, exactly as it does for visitors.

To see the agent on your own website, type the website's address in the URL field at the top of Live Preview: the agent opens on top of your page.

Landbot Live Preview with the website URL field at the top and a Lotus Yoga chat where Sofia Kim books a trial class

Integrations run for real in Preview, just as they do for visitors: a Webhook block sends its request and saves the answer, and a Google Sheets block writes its row. In this example, a yoga studio agent, Lotus Yoga, saves each visitor's name and email with a Google Sheets block: every test chat in Preview adds a row to the spreadsheet, even before the agent is published.

Point integrations at a test spreadsheet, list or inbox while you build, so test chats don't end up in your real data.
Human takeover doesn't work in Preview. Test it with the agent's share link.

To test the agent your visitors see, click Publish and open its share link: Landbot shows the link as soon as the agent is live, and it's always in Launch > Share with a link. The share link runs the last published version, so publish again after every change you want to test there.

Landbot builder with the Launch tab open on Share with a link, showing the agent's link with Open and Copy buttons and share buttons

The share link is the best way to test Human takeover and the whole flow the way visitors get it, and to share the agent with teammates or clients.

On the Sandbox plan and during the trial, an agent's share link opens a Landbot safety page before the chat: click Continue to chat to start. Embedded agents don't show it, and a paid plan removes it. See How to launch and share your agent.
Landbot safety page before a shared agent, with warnings, a Continue to chat button and an Upgrade your plan link
To test the agent with your website's styles and layout, embed it on a staging page first. The embed code is in Launch > Embed into your website: see How to embed your agent into your website.

📱 How to test a WhatsApp agent

How to test a WhatsApp agent without your own number

To test a WhatsApp agent before you connect your own number, click Test this agent in the top-right corner of the agent's builder, next to Publish: Landbot's test number sends the agent to your phone, so you see it exactly as your customers will.

Landbot WhatsApp agent builder with a Lotus Yoga flow and the Test this agent button next to Publish

1️⃣ Click Test this agent.

2️⃣ Pick the country and type the phone number that gets the test. It can be your own, or a client's or a colleague's.

3️⃣ Click Add number & send test.

Landbot Test this agent on WhatsApp window with a country selector, a phone number field and an Add number and send test button

4️⃣ Open WhatsApp on your phone or on the web: the message "Your chatbot is ready for testing" is waiting from Landbot's test number. Tap Ok, let's test to start the agent.

Landbot Start the chat on WhatsApp window with a preview of the test message and its Ok, let's test button, and an Add new number button

To send the test to another number, click Add new number.

To test another agent, open that agent's builder and click Test this agent again. For more on testing WhatsApp agents, see WhatsApp Testing.

Test chats with Landbot's test number don't show in the Inbox.
Each phone number can have only one WhatsApp testing channel. If the number is already linked to another Landbot account, you see "This number already exists": contact Landbot support to remove that testing channel.
How to test a WhatsApp agent with your own number

To test an agent on your own WhatsApp number, click Test this agent in the agent's builder: the agent runs once, for one phone number you choose, while your customers keep talking to the agent linked to your number.

● Who gets the test: only the phone number you enter. Everyone else who writes to your WhatsApp number keeps talking to the linked agent, as usual.

● How long the test lasts: one run through the flow. When the flow ends, or when you close the test window, the test is over: the next message from that phone number goes to the linked agent, even in the same WhatsApp chat.

● How to test again: click Test this agent again. Every run needs a new click, because a test doesn't repeat on its own.

Testing with your own number needs a WhatsApp number connected to Landbot through the Meta Cloud API: see Adding a WhatsApp number to your account. During the trial, you can test your WhatsApp number with up to 100 conversations.

Landbot WhatsApp page with the Connect phone number button

To run a test on your own number:

1️⃣ Open the builder of the agent you want to test and click Test this agent, not Start a chat.

2️⃣ Enter the phone number that gets the test and click Next.

3️⃣ If you have several WhatsApp numbers connected, pick the one that sends the test.

4️⃣ Open WhatsApp with the link or the QR code and chat with the agent.

To stop a test before the flow ends, click End test, close the test window or type #reset in WhatsApp. For more, see WhatsApp Testing.

To know which agent is answering, change a word in the first message of the agent you're testing before you click Test this agent: if that word shows up in WhatsApp, you're in the test. Change the word back before you publish.
Fields saved in an earlier test stay until a new run overwrites them. To start clean, clear the test contact from the Inbox, or reset the values with a Set a Field block at the start of the flow.
Test chats count as Service conversations, so they use part of what your plan or trial includes.
When the trial ends, you need a WhatsApp plan to keep using your number and receiving messages.

💬 How to test a Facebook Messenger agent

To test a Facebook Messenger agent, connect a Facebook Page to Landbot, link the agent to it and send the Page a message.

1️⃣ Create a Facebook Page, if you don't have one: see Facebook's guide to create a Page. Facebook Messenger agents always answer through a Page.

2️⃣ Connect the Page to Landbot in the Channels section, following The Facebook Messenger Ultimate Guide.

Landbot Channels section with the Messenger channel

To connect a Page:

● You must be an admin of the Page.

● The Page must be published, with Messenger turned on in its settings.

● The Page needs the right permissions: see Facebook's guide to Page access.

3️⃣ Link the agent to the Page in the channel's LINKED BOT tab. From then on, the agent answers every message sent to the Page on Messenger.

Landbot Messenger channel settings, Linked bot tab, with an agent selected

To test the agent, send a message to the Page from another Facebook account, or ask teammates to message the Page. For more ways to test, see How to Preview a Messenger bot.

🔌 How to test an APIchat agent

APIchat agents have no built-in preview, so you test them through another platform or by calling the API yourself.

To test an APIchat agent through a Web agent, add a Jump To block in a Web agent's flow that sends the conversation to the APIchat agent. You then chat with the Web agent, and the APIchat agent's flow answers.

To test the API directly:

1️⃣ Go to the APIchat channel and copy its API endpoint details.

Landbot APIchat channel settings with the hook URL and token hidden

2️⃣ Send a test payload to the endpoint with a tool such as Postman or cURL, or from your own app.

3️⃣ Check the APIchat agent's answer: it follows your request and the agent's flow.

For how to create an APIchat agent, see How to create an APIchat bot and set up the Hook Url.

Was this article helpful?

Flow logic: how your agent decides what comes next

How to debug your agent's flow without code