Log in

MCP

Build a bot

This guide shows how to build a working support bot end to end using your connected agent. You will not run any of the tools by hand - you describe what you want, and the agent uses the MCP tools to make it happen. If you have not connected yet, start with Getting started.

The goal

We will build a bot that answers customer questions from a help site, and hands off to a human when it cannot help.

Ask your agent

With your client connected, a single prompt is enough to get started. For example:

Build me a customer support bot for my company. Use the help pages at https://help.example.com as its knowledge, and add a way for customers to reach a human if the bot can't answer.

Behind the scenes, your agent works through the recipe below. Understanding the shape helps you steer it and know what "good" looks like.

What a good build looks like

1. Create the bot

The agent calls create_bot to make the bot, then sets a clear support-focused prompt so it answers in your tone and stays on topic.

2. Add your knowledge

The agent uses discover_pages to preview which pages of your help site would be indexed, refines the list if needed, then calls add_data_source to add the pages as a WEB source. This is what grounds the bot's answers in your content rather than guesswork.

ℹ️

Tune retrieval for multi-page sites

For a support bot that reads many pages, ask the agent to turn on enhanced retrieval and raise the amount of context it pulls in (update_bot). Enhanced retrieval rephrases a follow-up into a standalone question before searching, which matters a lot for real conversations. If your content is many short rows (like an FAQ feed), a lower relevance threshold helps short entries surface.

3. Add an escape hatch

A support bot should never dead-end. The agent attaches an escalation power-up - "talk to a human" for hand-off, or an email/webhook action for "contact us" - using the discovery pattern: list the power-up types, fetch the schema, then create it.

4. Test before you ship

Ask the agent to test the bot with questions whose answers you know are in your content:

Ask the support bot what your refund window is and check it cites the right page.

The agent uses start_chat and send_message, then reads the response - including which sources it cited - so you can confirm it is answering from your knowledge and not making things up. For ongoing confidence, ask it to add test cases (create_test_case) and run them (start_test_run) so you catch regressions later.

5. Go live

Once you are happy, the agent can configure the web channel (update_web_channel) so the bot is ready to embed on your site. See Channels for putting the widget on your pages.

Keep going

From here you can ask your agent to iterate: refine the prompt, add more data sources, wire up webhooks for lead capture, or connect the bot to other channels. Anything you can do in the dashboard, you can now ask for in plain language.