# Build Your First AI Agent

Create a support agent from your website, review its knowledge, and publish it to your site.

## Before you start

Sign in to the workspace that will own the agent. Have your public website URL ready, along with the support questions you want the agent to answer.

Your workspace plan determines how many agents and how much training data you can use. Review the available capacity if Create new chatbot opens the plans page.

## Create and train your agent

1. From the workspace, choose Create new chatbot.
2. Enter your business website in Scan Website and select the objective for your agent.
3. Continue to Data Sources and review the discovered pages. Keep pages that explain your product, service, policies, and support processes.
4. Create the agent and open Build → Data sources to follow training progress.
5. Open the website source to review individual URLs. Resolve failed pages and confirm the pages you need are Trained.

> **Training progress**: Website discovery and training are separate steps. An agent can open in Playground while its pages are still processing. Check published page counts before assessing its answers.

## Review instructions and test

Open Playground and review the business instructions generated during setup. Adapt the role and examples to your actual business, then save your changes.

1. Ask a common question that your source pages answer.
2. Check the answer against the original page, including any links or steps.
3. Ask an unclear question and a question your sources cannot answer.
4. Verify that the agent asks for clarification or acknowledges missing information.
5. Configure and test an action or human handoff if your support process needs one.

For a software support agent, useful questions include how to embed the widget, how to add a knowledge source, and how a teammate can take over a conversation.

## Add the agent to your website

1. Open Channels or the Playground Deploy menu and select the chat bubble.
2. Review the widget appearance, AI Chat, Visibility, and allowed-domain settings.
3. Copy your agent's embed code into a page you control.
4. Open that page as a visitor, open the widget, and send a message.
5. Confirm the reply and check that the conversation appears in the correct workspace.

Client-side actions must also be tested from the embedded page, where your registered website functions are available.

## Continue setup

- [Manage training sources](/docs/user-guides/agent-management/data-sources)
- [Configure instructions](/docs/user-guides/agent-management/instructions)
- [Deploy the website widget](/docs/user-guides/agent-management/deploy)
