Skip to main content
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

You’ll need an active Chatbase account to follow this guide. Sign up here if you haven’t already.

Overview

Here’s what we’ll accomplish in this guide:
1

Create & Train Your 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 using the Compare feature
3

Deploy to your Website

Add your AI Agent to your website with a simple embed code
Estimated time: 5 minutes from start to finish

Step 1: Create & Train Your AI Agent

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

Choose Your Training Data

Your AI Agent needs information to learn from. You can train it using various data sources:
  • Files
  • Raw Text
  • Website
  • Q&A
  • Notion
Upload your documentsTrain your agent on your documents.Best for: Business documents, manuals, FAQs, product information, etc.
Sources tab with Files option selected and a file being uploaded

Review & Start Training

Click “Create Agent” to begin the training process.
Sources tab with Create Agent button highlighted
Training typically takes 2-5 minutes depending on the amount of data. You can proceed to the next step while training completes.
Character Limits: Different plans have different character limits for training data. Check your plan if you hit any limits.

Step 2: Test & Optimize Your AI Agent

Access the Playground

Once training begins, you’ll automatically be taken to the Playground - your testing environment where you can chat with your AI Agent and fine-tune it before making it live.
Playground interface showing chat testing area

Evaluate Response Quality

As you test, look for:
Accuracy - Are responses factually correct?
Relevance - Does it answer what was asked?
Completeness - Are responses comprehensive but concise?
Tone - Does it match your brand voice?

Fine-tune Settings

  • AI Model
  • Instructions
  • Temperature

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
Playground interface showing select models button
2

Make Your Decision

Based on the comparison, select the model that best fits your specific use case and brand voice.
For detailed model comparisons and advanced testing strategies, check out our comprehensive model comparison guide.

Step 3: Deploy to Your Website

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 click on “Update” button to change the visibility to public.
Deploy tab with Make Public button highlighted
Private vs Public: Private agents are only accessible to workspace members. Public agents can be embedded on websites and accessed by anyone with the link.

Choose Your Deployment Method

Chatbase offers multiple deployment methods including chat widget, help page, and integrations with WhatsApp, WordPress, and other platforms.
Deploy tab showing many different deployment methods
In this guide, we’ll use the Chat widget option as it’s most common. Click on Manage on chat widget then select Embed.
chat widget embed tab

Get Your Embed Code

In this guide we’ll use the Chat widget option. Copy the provided JavaScript code snippet:
JavaScript embed code ready to copy

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

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
Success! Your AI Agent is now live and ready to help your website visitors.
Need more control over your widget? Check out our Developer Guides for more information on JavaScript embed, widget control options, and advanced features like client-side custom actions and event listeners.

Customize Appearance (Optional)

Want to match your brand? Check out our settings guide for style and content.
Chat interface customization options
  • Upload custom chat bubble icon
  • Change bubble colors to match your brand
  • Customize welcome messages
  • Set initial questions users can click
  • Auto-open chat after delay
  • Collect user feedback
  • Regenerate messages

🎉 Congratulations!

You’ve successfully created, trained, tested, and deployed your first AI Agent! Here’s what you’ve accomplished:
✅ Created an intelligent AI Agent trained on your data
✅ Tested and validated response quality
✅ Deployed it live on your website
✅ Made it accessible to your visitors 24/7

What’s Next?

Need help? Our support workspace is here to assist you. Visit our Help Center or check out the FAQ section for common questions.
I