> ## 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

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

## Overview

In just a few minutes, you'll have a working AI agent answering questions about your business and engaging with your website visitors. Here's what we'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:** 5 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

Your AI agent needs information to learn from. You can train it using various data sources:

**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)

**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)

**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)

**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)

**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)

### Review & start training

Click **Create Agent** to begin the training process.

> [!TIP]
>
> Training typically takes 2-5 minutes depending on the amount of data. You can proceed to the next step while training completes.

> [!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

**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.

**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).

**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

## 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)

**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

**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).

> **Branding Options**
>
> * Upload custom chat bubble icon
> * Change bubble colors to match your brand
> * Customize welcome messages
> * Set initial questions users can click

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

## Next steps

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

> **[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.

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

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

> **[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.