> ## 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. Follow this step-by-step guide to get your intelligent assistant live on your website.

In just a few minutes, you'll have a fully functional AI Agent answering questions about your business and engaging with your website visitors. Let's get started!

## Prerequisites

<Info>
  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.
</Info>

## Overview

Here's what we'll accomplish in this guide:

<Steps>
  <Step title="Create & Train Your Agent">
    Set up a new AI Agent and train it using your website or documents
  </Step>

  <Step title="Test & Optimize">
    Use the Playground to test responses and fine-tune performance using the Compare feature
  </Step>

  <Step title="Deploy to your Website">
    Add your AI Agent to your website with a simple embed code
  </Step>
</Steps>

<Tip>
  **Estimated time:** 5 minutes from start to finish
</Tip>

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

<Frame>
  <img src="https://mintcdn.com/chatbase/JnjROJ-aB2q57UGe/user-guides/quick-start/images/first-agent/create-agent.png?fit=max&auto=format&n=JnjROJ-aB2q57UGe&q=85&s=fe9865985afc3b2669546769e3e754c5" alt="Chatbase dashboard with New AI Agent button highlighted" width="2940" height="1596" data-path="user-guides/quick-start/images/first-agent/create-agent.png" />
</Frame>

### Choose Your Training Data

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

<Tabs>
  <Tab title="Files">
    **Upload your documents**

    Train your agent on your documents.

    **Best for:** Business documents, manuals, FAQs, product information, etc.

    <Frame>
      <img src="https://mintcdn.com/chatbase/4kdBs__Z0wOL088A/user-guides/quick-start/images/first-agent/uploading-files.png?fit=max&auto=format&n=4kdBs__Z0wOL088A&q=85&s=2bdad44cff663b638ecf3545dbcd5733" alt="Data sources tab with Files option selected and a file being uploaded" width="2930" height="1591" data-path="user-guides/quick-start/images/first-agent/uploading-files.png" />
    </Frame>
  </Tab>

  <Tab title="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

    <Frame>
      <img src="https://mintcdn.com/chatbase/4kdBs__Z0wOL088A/user-guides/quick-start/images/first-agent/sources-text.png?fit=max&auto=format&n=4kdBs__Z0wOL088A&q=85&s=fd23136582d493b9062328bc3222e410" alt="Data sources tab with Text snippets option selected and a text being added" width="2940" height="1598" data-path="user-guides/quick-start/images/first-agent/sources-text.png" />
    </Frame>
  </Tab>

  <Tab title="Website">
    **Crawl your website**

    Our crawlers will discover and learn from all your pages.

    **Best for:** Your entire website or sitemap

    <Info>
      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.
    </Info>

    <Frame>
      <img src="https://mintcdn.com/chatbase/4kdBs__Z0wOL088A/user-guides/quick-start/images/first-agent/sources-websites.png?fit=max&auto=format&n=4kdBs__Z0wOL088A&q=85&s=049c281fe643ea7c18bd9437f9252746" alt="Data sources tab with Text snippets option selected and a text being added" width="2932" height="1555" data-path="user-guides/quick-start/images/first-agent/sources-websites.png" />
    </Frame>
  </Tab>

  <Tab title="Q&A">
    **Add your own Q\&A**

    Add your own Q\&A to your agent. This is useful for specific questions and answers that you want your agent to know.

    **Best for:** Specific questions and answers

    <Frame>
      <img src="https://mintcdn.com/chatbase/4kdBs__Z0wOL088A/user-guides/quick-start/images/first-agent/sources-qna.png?fit=max&auto=format&n=4kdBs__Z0wOL088A&q=85&s=3725d06f1d49dd183cd13c769d9c409b" alt="Data sources tab with Q&A option selected and a Q&A being added" width="2940" height="1596" data-path="user-guides/quick-start/images/first-agent/sources-qna.png" />
    </Frame>
  </Tab>

  <Tab title="Notion">
    **Connect your Notion workspace**

    Connect your Notion workspace to your 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 on **Import** to authorize the connection and select the specific pages you want to include.
    </Tip>

    <Frame>
      <img src="https://mintcdn.com/chatbase/4kdBs__Z0wOL088A/user-guides/quick-start/images/first-agent/sources-notion.png?fit=max&auto=format&n=4kdBs__Z0wOL088A&q=85&s=fe25e25b3dc552352a56119e2f75d0bf" alt="Data sources tab with Notion option selected and a Notion workspace being connected" width="2940" height="1596" data-path="user-guides/quick-start/images/first-agent/sources-notion.png" />
    </Frame>
  </Tab>
</Tabs>

### Review & Start Training

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

<Frame>
  <img src="https://mintcdn.com/chatbase/4kdBs__Z0wOL088A/user-guides/quick-start/images/first-agent/sources-create-agent.png?fit=max&auto=format&n=4kdBs__Z0wOL088A&q=85&s=c388710fe9cf241b7a4acd5e4361d1bc" alt="Data sources tab with Create Agent button highlighted" width="2940" height="1598" data-path="user-guides/quick-start/images/first-agent/sources-create-agent.png" />
</Frame>

<Check>
  Training typically takes 2-5 minutes depending on the amount of data. You can proceed to the next step while training completes.
</Check>

<Info>
  **Storage limit:** Different plans have different storage limits for training data. Check your plan if you hit any limits.
</Info>

## Step 2: Test & Optimize Your AI Agent

### Access the Playground

After training your agent, Go to the [**Playground**](/user-guides/chatbot/playground) - your testing environment where you can chat with your AI Agent and fine-tune it before making it live.

<Frame>
  <img src="https://mintcdn.com/chatbase/Zkg12EbnhYTJTGwv/user-guides/quick-start/images/first-agent/getting-started-9.png?fit=max&auto=format&n=Zkg12EbnhYTJTGwv&q=85&s=6e340c8bee3a4ace24577f963314bfd1" alt="Playground interface showing chat testing area" width="3408" height="2044" data-path="user-guides/quick-start/images/first-agent/getting-started-9.png" />
</Frame>

### Fine-tune Settings

<Tabs>
  <Tab title="AI Model">
    ### Test responses with different models

    <Steps>
      <Step title="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**

        <Frame>
          <img src="https://mintcdn.com/chatbase/4kdBs__Z0wOL088A/user-guides/quick-start/images/first-agent/playground-select-models.png?fit=max&auto=format&n=4kdBs__Z0wOL088A&q=85&s=0c8b4e298d8b6e45b771d9da8e72bd4a" alt="Playground interface showing select models button" width="2940" height="1600" data-path="user-guides/quick-start/images/first-agent/playground-select-models.png" />
        </Frame>
      </Step>

      <Step title="Make Your Decision">
        Based on the comparison, select the model that best fits your specific use case and brand voice.
      </Step>
    </Steps>

    <Tip>
      For detailed model comparisons and advanced testing strategies, check out our [comprehensive model comparison guide](https://www.chatbase.co/docs/user-guides/chatbot/playground#compare-area).
    </Tip>
  </Tab>

  <Tab title="Instructions">
    Define how your AI Agent should behave and respond to users. These instructions shape your agent's personality, tone, and approach to conversations.

    <Tip>
      **Get inspired:** Use the dropdown examples below to see instruction templates for different business types and scenarios. You can copy and customize them for your specific needs.

      <Frame>
        <img src="https://mintcdn.com/chatbase/4kdBs__Z0wOL088A/user-guides/quick-start/images/first-agent/instructions-dropdown.png?fit=max&auto=format&n=4kdBs__Z0wOL088A&q=85&s=80180ce72a879c5fb5d9b325303a827d" alt="Instructions dropdown showing different examples" width="2940" height="1598" data-path="user-guides/quick-start/images/first-agent/instructions-dropdown.png" />
      </Frame>
    </Tip>

    **How to write effective instructions:**

    * Define the agent tone (professional, friendly, casual, etc.)
    * Define the 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 agent
    * Define the languages the agent will use to respond with (Usually the same language of the user)
    * Add any other instruction you would like your agent to know
  </Tab>

  <Tab title="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
  </Tab>
</Tabs>

## Step 3: Deploy to Your Website

### Navigate to the Deploy Section

Once you're satisfied with your AI Agent's responses, it's time to make it live! Navigate to the **"Deploy"** tab in the sidebar, and toggle the switch on the **"Chat widget"** card to enable the agent.

<Frame>
  <img src="https://mintcdn.com/chatbase/XzxaI-qZymLMidSq/user-guides/quick-start/images/first-agent/enable-chat-widget.png?fit=max&auto=format&n=XzxaI-qZymLMidSq&q=85&s=c83eff41ef1c9cf8f8b7b0010e9f8bae" alt="All channels view showing Chat widget card with toggle switch to enable the agent" width="2830" height="970" data-path="user-guides/quick-start/images/first-agent/enable-chat-widget.png" />
</Frame>

<Info>
  **Disabled vs Enabled:** Disabled agents are only accessible to workspace members. Enabled agents can be embedded on websites and accessed by anyone with the link.
</Info>

### Choose Your Deployment Method

Chatbase offers multiple deployment methods including chat widget, help page, and integrations with Email, Phone, WhatsApp, Facebook Messenger, Instagram, Shopify, and other platforms.

<Frame>
  <img src="https://mintcdn.com/chatbase/JnjROJ-aB2q57UGe/user-guides/quick-start/images/first-agent/deploy-chat-widget.png?fit=max&auto=format&n=JnjROJ-aB2q57UGe&q=85&s=9517a543b79209710ea0156fcfa28313" alt="Deploy tab showing many different deployment methods" width="2940" height="1596" data-path="user-guides/quick-start/images/first-agent/deploy-chat-widget.png" />
</Frame>

In this guide, we'll use the **Chat widget** option as it's most common. Click on Manage on chat widget then select Embed.

<Frame>
  <img src="https://mintcdn.com/chatbase/JnjROJ-aB2q57UGe/user-guides/quick-start/images/first-agent/embed-tab.png?fit=max&auto=format&n=JnjROJ-aB2q57UGe&q=85&s=12f98d8c63c32ba0b72f70a4e0ae4319" alt="chat widget embed tab" width="2940" height="1596" data-path="user-guides/quick-start/images/first-agent/embed-tab.png" />
</Frame>

<Tabs>
  <Tab title="Chat 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 utilize advanced features like [identity verification](../../developer-guides/identity-verification).
    * Doesn't interfere with your site's design
    * Users can minimize/maximize as needed
    * Works great on mobile devices
    * Familiar UX pattern

    **Best for:** Business websites, blogs, e-commerce stores
  </Tab>

  <Tab title="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 chat bubble
    * Good for dedicated support pages
    * Customizable dimensions

    **Best for:** Support pages, help centers, dedicated chat sections
  </Tab>
</Tabs>

### Get Your Embed Code

In this guide we'll use the **Chat widget** option.

Copy the provided JavaScript code snippet:

<Frame>
  <img src="https://mintcdn.com/chatbase/JnjROJ-aB2q57UGe/user-guides/quick-start/images/first-agent/copy-embed-code.png?fit=max&auto=format&n=JnjROJ-aB2q57UGe&q=85&s=018544c14b7be56ba7088d08a468e577" alt="JavaScript embed code ready to copy" width="2940" height="1594" data-path="user-guides/quick-start/images/first-agent/copy-embed-code.png" />
</Frame>

### Add Code to Your Website

<Steps>
  <Step title="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 to ensure 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.
    </Tip>
  </Step>

  <Step title="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.
  </Step>

  <Step title="Save and Publish">
    Save your changes and publish your website updates.
  </Step>
</Steps>

### Verify Installation

Visit your website and look for the chat bubble. Click it to test the integration!

<Frame>
  <img src="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" alt="Live AI Agent chat bubble on a website" width="3040" height="1888" data-path="user-guides/quick-start/images/first-agent/getting-started-15.png" />
</Frame>

<Check>
  **Success!** Your AI Agent is now live and ready to help your website visitors.
</Check>

<Tip>
  Need more control over your widget? Check out our [Developer Guides](/developer-guides/overview) for more information on JavaScript embed, [widget control options](/developer-guides/control-widget), and advanced features like [client-side custom actions](/developer-guides/client-side-custom-actions) and [event listeners](/developer-guides/chatbot-event-listeners).
</Tip>

### Customize Appearance (Optional)

Want to match your brand? Check out our settings guide for [style](/user-guides/chatbot/deploy#style-settings) and [content](/user-guides/chatbot/deploy#content-settings).

<Frame>
  <img src="https://mintcdn.com/chatbase/4kdBs__Z0wOL088A/user-guides/quick-start/images/first-agent/style-tab.png?fit=max&auto=format&n=4kdBs__Z0wOL088A&q=85&s=33163a39684467575057e75c950c5e3c" alt="Chat interface customization options" width="2940" height="1598" data-path="user-guides/quick-start/images/first-agent/style-tab.png" />
</Frame>

<AccordionGroup>
  <Accordion title="Branding Options">
    * Upload custom chat bubble icon
    * Change bubble colors to match your brand
    * Customize welcome messages
    * Set initial questions users can click
  </Accordion>

  <Accordion title="Behavior Settings">
    * Auto-open chat after delay
    * Collect user feedback
  </Accordion>
</AccordionGroup>

## 🎉 Congratulations!

You've successfully created, trained, tested, and deployed your first AI Agent! Here's what you've accomplished:

### What's Next?

<CardGroup cols={2}>
  <Card title="Monitor Performance" icon="chart-line" href="/user-guides/chatbot/analytics">
    Track conversations and optimize your AI Agent's performance
  </Card>

  <Card title="Advanced Features" icon="wand-magic-sparkles" href="/user-guides/chatbot/actions/actions-overview">
    Add actions like Escalations, lead capture, appointment booking, and more
  </Card>

  <Card title="Best Practices" icon="lightbulb" href="/user-guides/quick-start/best-practices">
    Learn proven strategies to maximize your AI Agent's effectiveness
  </Card>

  <Card title="API Integration" icon="code" href="/developer-guides/api/create-a-chatbot">
    Build custom integrations with our powerful API
  </Card>
</CardGroup>

<Info>
  **Need help?** Our support workspace is here to assist you. Visit our [Help Center](https://www.chatbase.co/help) or check out the [FAQ section](/faq/faq) for common questions.
</Info>
