> ## Documentation Index
> Fetch the complete documentation index at: https://chatbase.co/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Build your first AI agent in minutes

> Create, train, and deploy your first AI agent in a few minutes, and get it live on your website

This guide walks you through building your first Chatbase AI agent: you create it, train it on your website or documents, test its answers in the Playground, and add it to your website as a Chat Bubble. It's written for anyone setting up Chatbase for the first time, and the only technical step is pasting an embed code into your site (or using the WordPress plugin or the Shopify integration). When you finish, your AI agent answers your visitors' questions from your own content.

Here's what you'll do:

**1. Create & Train Your AI Agent**

Set up a new AI agent and train it using your website or documents

**2. Test & Optimize**

Use the Playground to test responses and fine-tune performance

**3. Deploy to your Website**

Add your AI agent to your website with a simple embed code

> [!TIP]
>
> **Estimated time:** a few minutes from start to finish

## Before you start

> [!NOTE]
>
> You'll need an active Chatbase account to follow this guide. [Sign up here](https://www.chatbase.co/auth/signup) if you haven't already.

## Step 1: Create & train your AI agent

### Navigate to your dashboard

After signing into your Chatbase account, go to your main dashboard. Click the **New AI Agent** button to get started.

![The New AI Agent button on the Chatbase dashboard](https://mintcdn.com/chatbase/xPpOvQF2MdeELnmI/user-guides/workspace/images/manage/team-manage-create-chatbot.png?fit=max\&auto=format\&n=xPpOvQF2MdeELnmI\&q=85\&s=fbece8ababbaada3030abbe2fceaea40)

### Choose your training data

The first screen asks **How would you like to train your AI Agent?** Enter your website under **Your website (recommended)**, and Chatbase extracts information from all pages on that domain. To add files, text, Q\&A, or Notion pages, click **Add another source** under **Other sources**. You must add at least one source before you can click **Continue**.

![The How would you like to train your AI Agent? screen, with a website field, Other sources, and Add another source](https://mintcdn.com/chatbase/BMkApe-2lPP5NZQg/user-guides/quick-start/images/first-agent/onboarding-sources.png?fit=max\&auto=format\&n=BMkApe-2lPP5NZQg\&q=85\&s=28a85f9f1e4069913d070e4f917805f0)

Your AI agent can learn from these source types:

> [tab] Files
>
> **Upload your documents**
>
> Train your AI agent on your documents.
>
> **Best for:** Business documents, manuals, FAQs, product information, etc.
>
> ![Data Sources page with the Add Files dialog open](https://mintcdn.com/chatbase/xPpOvQF2MdeELnmI/user-guides/quick-start/images/first-agent/your-first-agent-files.png?fit=max\&auto=format\&n=xPpOvQF2MdeELnmI\&q=85\&s=a426e9199fd9618a142556c5dbaa7c6a)

> [tab] Text snippets
>
> **Direct text input**
>
> Paste your content directly into the platform. Useful for specific information or custom training content.
>
> **Best for:** Specific information or custom training content
>
> ![Data Sources page with the Add Text dialog open](https://mintcdn.com/chatbase/xPpOvQF2MdeELnmI/user-guides/quick-start/images/first-agent/your-first-agent-text.png?fit=max\&auto=format\&n=xPpOvQF2MdeELnmI\&q=85\&s=a6e0040919bf64230016a0c4b9001c74)

> [tab] Website
>
> **Crawl your website**
>
> Our crawlers will discover and learn from all your pages.
>
> **Best for:** Your entire website or sitemap
>
> > [!NOTE]
> >
> > Our intelligent crawlers will explore your website and all linked pages for training. After crawling completes, you'll see all discovered pages and the total character count available for training.
>
> ![Data Sources page with the Add website dialog open](https://mintcdn.com/chatbase/xPpOvQF2MdeELnmI/user-guides/quick-start/images/first-agent/your-first-agent-website.png?fit=max\&auto=format\&n=xPpOvQF2MdeELnmI\&q=85\&s=69054d4a36068fdcd7a8298b89ccc109)

> [tab] Q\&A
>
> **Add your own Q\&A**
>
> Add your own Q\&A to your AI agent. This is useful for specific questions and answers that you want your AI agent to know.
>
> **Best for:** Specific questions and answers
>
> ![Data Sources page with the Add Q\&A's dialog open](https://mintcdn.com/chatbase/xPpOvQF2MdeELnmI/user-guides/quick-start/images/first-agent/your-first-agent-q\&a.png?fit=max\&auto=format\&n=xPpOvQF2MdeELnmI\&q=85\&s=c2b9b25d51c19b3085ee246256980a92)

> [tab] Notion
>
> **Connect your Notion workspace**
>
> Connect your Notion workspace to your AI agent. This is useful for your entire knowledge base.
>
> **Best for:** Teams using Notion
>
> > [!TIP]
> >
> > To connect your Notion workspace, you'll need to click **Import** to authorize the connection and select the specific pages you want to include.
>
> ![Data Sources page with the Add Notion Pages dialog open](https://mintcdn.com/chatbase/xPpOvQF2MdeELnmI/user-guides/quick-start/images/first-agent/your-first-agent-notion.png?fit=max\&auto=format\&n=xPpOvQF2MdeELnmI\&q=85\&s=c162a1ac2acdef1ea4759ee92dd5a48e)

> [!TIP]
>
> **What to add first:** the content that answers your most common customer questions, such as your FAQ, help center, pricing, shipping, and returns pages. Files need selectable text: scanned PDFs with no text layer can't be trained on. On Shopify, add your sitemap at `/sitemap.xml` instead of crawling the whole store. See [Data Sources](https://chatbase.co/docs/user-guides/chatbot/data-sources.md) for every source type and its limits.

### Customize your agent's personality

The next screen, **Customize your agent's personality**, asks **What will your agent do?** Your answer becomes your AI agent's instructions: describe its job and how it should behave, for example: *"Answer customer questions clearly and concisely. Stay polite and professional. Escalate billing or account issues to a human agent when unsure."* To start from a template, pick one from the dropdown under the text box: **Customer support**, **Sales agent**, or **Shopping assistant**. The template fills in instructions you can edit. This step is optional: click **Continue** to skip it. You can change these instructions later in [Build](https://chatbase.co/docs/user-guides/chatbot/build.md).

![The Customize your agent's personality screen, with the What will your agent do? text box and a Customer support dropdown](https://mintcdn.com/chatbase/BMkApe-2lPP5NZQg/user-guides/quick-start/images/first-agent/onboarding-personality.png?fit=max\&auto=format\&n=BMkApe-2lPP5NZQg\&q=85\&s=2605118f28fa85c0ce36c9f800b7f681)

### Select your tools and where you'll deploy

Chatbase then asks two more questions. Both are optional: select what applies, or click **Continue** to skip.

1. **Select the tools in your tech stack:** pick the tools you use, under **Actions** (such as Stripe, Shopify, Cal, Calendly, Slack, and Twilio) and **Helpdesk tools** (such as Chatbase, Zendesk, Salesforce, Intercom, HubSpot, and Freshdesk). Chatbase notes your choices and walks you through integrating them later. You can also connect them at any time from [Integrations](https://chatbase.co/docs/user-guides/integrations/integrations-overview.md).
2. **Where will you be deploying your AI agents?:** pick your channels, such as the Chat Bubble, Agent page (the [Help Page](https://chatbase.co/docs/user-guides/chatbot/channels.md#help-page)), Center Stage, WhatsApp, Messenger, Instagram, Shopify, Email, Slack, Zendesk, Salesforce, or Phone. You can add more [channels](https://chatbase.co/docs/user-guides/chatbot/channels.md) at any time.

![The Select the tools in your tech stack screen, with Actions and Helpdesk tools to choose from](https://mintcdn.com/chatbase/BMkApe-2lPP5NZQg/user-guides/quick-start/images/first-agent/onboarding-tech-stack.png?fit=max\&auto=format\&n=BMkApe-2lPP5NZQg\&q=85\&s=f4c76b9f2f6ec2bdf008fe0e1bf32bed)

![The Where will you be deploying your AI agents? screen, with channels such as Chat Bubble, WhatsApp, and Phone](https://mintcdn.com/chatbase/BMkApe-2lPP5NZQg/user-guides/quick-start/images/first-agent/onboarding-deploy.png?fit=max\&auto=format\&n=BMkApe-2lPP5NZQg\&q=85\&s=67f1563dd17a2c1a96954c2ddd76f24c)

> [!TIP]
>
> Training usually takes a few minutes, depending on the amount of data. You can proceed to the next step while training completes. On **Build > Data Sources**, each source shows **Syncing** while it's processed and **Synced** once your AI agent can use it. A source that shows **Failed** lists the reason, so you can fix it and add it again.

> [!NOTE]
>
> **Storage limit:** Different plans have different storage limits for training data. Check your plan if you hit any limits, or add more with the [Extra storage add-on](https://chatbase.co/docs/user-guides/workspace/settings.md#extra-storage).

## Step 2: Test & optimize your AI agent

### Access your instructions

After training your AI agent, go to **Build > Instructions** to refine its behavior. Use the **Compare** button to test your changes side by side against the current version before saving them.

![Playground interface showing chat testing area](https://mintcdn.com/chatbase/xPpOvQF2MdeELnmI/user-guides/quick-start/images/first-agent/getting-started-9.png?fit=max\&auto=format\&n=xPpOvQF2MdeELnmI\&q=85\&s=483a29f3e175db838a921f5f698eb6ad)

### Fine-tune settings

> [tab] AI Model
>
> **Test responses with different models**
>
> **1. Test with different models**
>
> Ask the same questions to different models and compare:
>
> * **Response quality and accuracy**
> * **Response time and speed**
> * **Tone and personality**
> * **Handling of edge cases**
>
> **2. Make your decision**
>
> Based on the comparison, select the model that best fits your specific use case and brand voice.
>
> > [!TIP]
> >
> > For detailed model comparisons and advanced testing strategies, see the [Compare area](https://chatbase.co/docs/user-guides/chatbot/build.md#compare-area) and the [models comparison](https://chatbase.co/docs/user-guides/chatbot/models-comparison.md) page.

> [tab] Instructions
>
> Define how your AI agent should behave and respond to users. These instructions shape your AI agent's personality, tone, and approach to conversations.
>
> **How to write effective instructions:**
>
> * Define the AI agent tone (professional, friendly, casual, etc.)
>
> * Define the AI agent role (lead collection, support, sales, etc.)
>
> * Set clear boundaries about what topics to discuss or avoid
>
> * Define your brand voice and personality
>
> * Add specific words to be used by the AI agent
>
> * Define the languages the AI agent will use to respond with (usually the same language as the user)
>
> * Add any other instruction you would like your AI agent to know
>
> > [!TIP]
> >
> > For a full worked example you can copy and customize, see [Best Practices](https://chatbase.co/docs/user-guides/quick-start/best-practices.md#refine-the-ai-agents-instructions).

> [tab] Temperature
>
> Controls response creativity:
>
> * **Low (0.1-0.3)**: Consistent, factual responses
> * **Medium (0.4-0.7)**: Balanced creativity
> * **High (0.8-1.0)**: More creative, varied responses

### Try it in the Playground

Open the [Playground](https://chatbase.co/docs/user-guides/chatbot/playground.md) and ask your AI agent the questions your customers ask most. Include at least one question your content doesn't cover, so you can see how your AI agent handles a gap. A good first test looks like this:

```text theme={null}
Visitor: Do you ship to Canada?
AI agent: Yes, we ship to Canada. Orders usually arrive within 5 to 7 business days.

Visitor: Can I pay with cryptocurrency?
AI agent: I'm sorry, but I don't have enough information to answer that. You can reach our team at support@example.com.
```

The first answer comes from your Data Sources. The second shows the AI agent admitting a gap instead of guessing, which is what you want for anything it wasn't trained on. If it guesses, tighten your instructions. If it says it doesn't know something your content does cover, check that the source is **Synced** and that the page contains readable text.

> [!NOTE]
>
> Saving puts your changes in a draft. Your customers see them once you click **Publish** in the top-right corner. A few settings go live as soon as you save. See [Drafts and versions](https://chatbase.co/docs/user-guides/chatbot/versions.md#settings-that-go-live-right-away).

The Playground always uses your draft, so you can try changes there before you publish. Data Sources are the exception: new and edited sources go live as soon as they finish syncing. See [Drafts and versions](https://chatbase.co/docs/user-guides/chatbot/versions.md).

## Step 3: Deploy to your website

### Navigate to the Channels section

Once you're satisfied with your AI agent's responses, it's time to make it live. Navigate to the **Channels** tab in the sidebar, and click **Setup** on the **Chat Bubble** card to access your AI agent's script.

> [!NOTE]
>
> **Disabled vs Enabled:** Disabled AI agents are only accessible to workspace members. Enabled AI agents can be embedded on websites and accessed by anyone with the link.

### Choose your deployment method

Chatbase offers multiple deployment methods including Chat Bubble, Help Page, and integrations with Email, Phone, WhatsApp, Facebook Messenger, Instagram, Shopify, and other platforms.

In this guide we'll use the **Chat Bubble** option, as it's the most common. Click **Manage** under the Chat Bubble, then select **Deploy** to access your embed script.

![chat widget embed tab](https://mintcdn.com/chatbase/xPpOvQF2MdeELnmI/user-guides/quick-start/images/first-agent/your-first-agent-deploy.png?fit=max\&auto=format\&n=xPpOvQF2MdeELnmI\&q=85\&s=e9cef186392627ee90bd0d35cce113f6)

![JavaScript embed code ready to copy](https://mintcdn.com/chatbase/xPpOvQF2MdeELnmI/user-guides/quick-start/images/first-agent/your-first-agent-script.png?fit=max\&auto=format\&n=xPpOvQF2MdeELnmI\&q=85\&s=fd16a076dcbe0e3ca30960d2058f1283)

> [tab] Website widget (Recommended)
>
> **Perfect for most websites**
>
> Adds a floating chat icon that users can click to start conversations. Non-intrusive and mobile-friendly.
>
> **Pros:**
>
> * Can use advanced features like [identity verification](https://chatbase.co/docs/developer-guides/website-integration/identity-verification.md)
> * Doesn't interfere with your site's design
> * Users can minimize and maximize as needed
> * Works well on mobile devices
> * Familiar UX pattern
>
> **Best for:** Business websites, blogs, e-commerce stores

> [tab] Website iframe
>
> **For dedicated chat sections**
>
> Embeds the full chat interface directly into your page layout. Always visible and ready for interaction.
>
> **Pros:**
>
> * Always visible to users
> * More prominent than the Chat Bubble
> * Good for dedicated support pages
> * Customizable dimensions
>
> **Best for:** Support pages, help centers, dedicated chat sections

### Add code to your website

**1. Locate your site's HTML**

Find where you can add JavaScript code to your website. This is usually in the `<head>` section or before the closing `</body>` tag.

> [!TIP]
>
> **For fast loading:** Place the script just before the closing `</body>` tag so your page content loads first, then the chat widget appears.
>
> **For immediate availability:** Place the script in the `<head>` section to load the chat widget as early as possible, though this may slightly delay your page's initial render.

**2. Paste the code**

Copy and paste the embed script into your website's HTML. If you're using a CMS like WordPress, there's usually a "Custom HTML" or "Scripts" section.

**3. Save and publish**

Save your changes and publish your website updates.

> [!TIP]
>
> Using a site builder? There's a step-by-step guide for [WordPress](https://chatbase.co/docs/user-guides/integrations/wordpress.md), [Webflow](https://chatbase.co/docs/user-guides/integrations/webflow.md), [Wix](https://chatbase.co/docs/user-guides/integrations/wix.md), [Weebly](https://chatbase.co/docs/user-guides/integrations/weebly.md), [Framer](https://chatbase.co/docs/user-guides/integrations/framer.md), [Bubble](https://chatbase.co/docs/user-guides/integrations/bubble.md), and [Vercel](https://chatbase.co/docs/user-guides/integrations/vercel.md).

### Verify installation

Visit your website and look for the Chat Bubble. Click it to test the integration.

![Live AI Agent Chat Bubble on a website](https://mintcdn.com/chatbase/Zkg12EbnhYTJTGwv/user-guides/quick-start/images/first-agent/getting-started-15.png?fit=max\&auto=format\&n=Zkg12EbnhYTJTGwv\&q=85\&s=8bf5143597fd867a31589184368c8063)

> [!TIP]
>
> **Success!** Your AI agent is now live and ready to help your website visitors.

> [!TIP]
>
> Need more control over your widget? See the [Developer Guides](https://chatbase.co/docs/developer-guides/overview.md) for the JavaScript embed, [widget control options](https://chatbase.co/docs/developer-guides/website-integration/chat-interface-control.md), and advanced features like [client-side Custom Actions](https://chatbase.co/docs/developer-guides/website-integration/client-side-custom-actions.md) and [event listeners](https://chatbase.co/docs/developer-guides/website-integration/chatbot-event-listeners.md).

### Customize appearance (optional)

Want to match your brand? See the guide to [Chat Bubble display settings](https://chatbase.co/docs/user-guides/chatbot/channels.md#chat-bubble-display).

> [accordion] Branding Options
>
> * Upload custom Chat Bubble icon
> * Change bubble colors to match your brand
> * Customize welcome messages
> * Set initial questions users can click

> [accordion] Behavior Settings
>
> * Auto-open chat after delay
> * Collect user feedback

## What a good first AI agent looks like

Your first AI agent doesn't need every feature. Before you share it with customers, check that:

* Every source on **Build > Data Sources** shows **Synced**, and none show **Failed**.
* Your Data Sources answer the questions customers ask you most.
* Your instructions say who the AI agent works for, what it helps with, and what to say when it doesn't know the answer. See [Instructions](https://chatbase.co/docs/user-guides/chatbot/build.md#instructions).
* You've asked it real customer questions in the [Playground](https://chatbase.co/docs/user-guides/chatbot/playground.md), including one it shouldn't be able to answer.
* There's a way to reach a person, such as the [Escalations](https://chatbase.co/docs/user-guides/chatbot/actions/escalate-to-human.md) Action or a support email in its instructions.
* You've clicked **Publish**, so your instructions and settings are live.
* The Chat Bubble appears on your live website and answers a test message.
* Someone on your team will read the first conversations in [Activity](https://chatbase.co/docs/user-guides/chatbot/activity.md) and correct wrong answers.

## Common first-day mistakes

| Mistake | What happens | Fix |
| - | - | - |
| Saving changes without publishing | The Playground shows your new instructions, but your website still uses the old ones | Click **Publish** in the top-right corner. See [Drafts and versions](https://chatbase.co/docs/user-guides/chatbot/versions.md). |
| Training on scanned PDFs or image-heavy pages | The AI agent can't answer from them, because Chatbase reads text only | Upload files with selectable text, or paste the content as a text snippet |
| Turning off the Chat Bubble's **Visibility** | The Chat Bubble is hidden and messages don't reach your AI agent | Turn **Visibility** back on in the Chat Bubble's **Overview** tab. See [Channels](https://chatbase.co/docs/user-guides/chatbot/channels.md#overview-tab). |
| Restricting embedding to specific domains, but leaving out your site | Browsers refuse to show the AI agent on your website | Add your site under **Only allow embedding the agent on specific domains**. See [Deploy button](https://chatbase.co/docs/user-guides/chatbot/channels.md#deploy-button). |
| No instruction for unknown questions | The AI agent may answer outside your content | Tell it to answer only from its training data and give it a fallback reply. See [Best Practices](https://chatbase.co/docs/user-guides/quick-start/best-practices.md#refine-the-ai-agents-instructions). |

## Frequently asked questions

> [accordion] Why does my AI agent say it doesn't know the answer?
>
> Your AI agent answers from its [Data Sources](https://chatbase.co/docs/user-guides/chatbot/data-sources.md), so it says it doesn't know when the answer isn't in that content, or when it can't read the content. Check that:
>
> * The source shows **Synced** on **Build > Data Sources**, not **Syncing** or **Failed**.
> * The page or file contains readable text. Chatbase can't read images, videos, or scanned PDFs, and some websites block crawlers.
> * The page wasn't skipped. For a website, open the source and check the **Not found** and **Excluded** tabs.
>
> To fill a gap quickly, add a text snippet or a Q\&A with the answer. You can also open the conversation in [Activity](https://chatbase.co/docs/user-guides/chatbot/activity.md) and use **Revise answer**, which saves your corrected answer as a Q\&A.

> [accordion] How long does training take?
>
> Training usually takes a few minutes, depending on the amount of data. Each source trains on its own: it shows **Syncing** while it's processed and **Synced** once your AI agent can use it. There's no retrain button, so you can keep working while it finishes.

> [accordion] Do I need to retrain my AI agent when I update my website?
>
> Edits you make in Chatbase, such as changing a text snippet or Q\&A, apply on their own. For changes made outside Chatbase, click **Resync now** on the website or Notion source. **Basic**, **Business**, **Enterprise**, and legacy **Pro** plans can turn on [Auto-resync](https://chatbase.co/docs/user-guides/chatbot/data-sources.md#auto-resync), which re-reads your websites, Notion pages, and tickets every week.

> [accordion] Why don't my changes show up on my website?
>
> Changes to instructions, the model, Actions, and channel settings are saved to a draft. The Playground shows the draft, but your website keeps using the live AI agent until you click **Publish**. See [Drafts and versions](https://chatbase.co/docs/user-guides/chatbot/versions.md).

> [accordion] Why isn't the Chat Bubble showing on my website?
>
> Check that you pasted the complete script, that the Chat Bubble's **Visibility** toggle is on, and that your site's domain is allowed if you restricted embedding to specific domains. Caching plugins and ad blockers can also hide it, so try a private browser window. See the [FAQ](https://chatbase.co/docs/faq/faq.md) for more checks.

## Next steps

You've created, trained, tested, and deployed your first AI agent. From here:

> [card] [Best Practices](https://chatbase.co/docs/user-guides/quick-start/best-practices.md)
>
> Proven ways to improve your AI agent's answers: instructions, data sources, and the right model.

> [card] [Actions](https://chatbase.co/docs/user-guides/chatbot/actions/actions-overview.md)
>
> Add escalations, lead capture, appointment booking, and more.

> [card] [Integrations](https://chatbase.co/docs/user-guides/integrations/integrations-overview.md)
>
> Connect your AI agent to messaging channels and business tools.

> [card] [Analytics](https://chatbase.co/docs/user-guides/chatbot/analytics.md)
>
> Track conversations and optimize your AI agent's performance.

> [!NOTE]
>
> **Need help?** Visit our [Help Center](https://www.chatbase.co/help) or check the [FAQ](https://chatbase.co/docs/faq/faq.md) for common questions.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.