From Idea to Production: Building Your First AI Agent
A step-by-step guide to creating and deploying an intelligent agent for your business.

Ready to deploy your first AI agent? This step-by-step guide will take you from zero to a production-ready customer support agent in under 30 minutes.
What You'll Build
By the end of this tutorial, you'll have:
- โ An AI agent trained on your content
- โ A chat widget embedded on your website
- โ Automatic ticket creation for complex issues
- โ Analytics to track performance
Prerequisites
- A Chatsy account (sign up free)
- Some content to train your agent (documentation, FAQs, etc.)
- A website where you'll embed the widget
Step 1: Create Your Agent
- Log into your Chatsy dashboard
- Click "New Chatbot"
- Give it a name (e.g., "Support Agent")
- Choose your primary color to match your brand
๐ก Tip: Choose a name customers will see. "Support Agent"
feels more professional than "Bot 1".
Step 2: Add Your Knowledge
Your agent is only as good as its knowledge. Let's give it something to work with.
Option A: Crawl Your Website
- Go to Sources tab
- Click "Add Source" โ "Website"
- Enter your website URL
- Click "Crawl"
The crawler will automatically find and index all pages. This typically takes 2-10 minutes depending on site size.
Option B: Upload Documents
- Go to Sources tab
- Click "Add Source" โ "Upload"
- Drag and drop your files (PDF, DOCX, TXT, CSV)
Supported formats:
- PDF (including scanned with OCR)
- Word documents (.docx)
- Text files (.txt, .md)
- Spreadsheets (.csv, .xlsx)
Option C: Use the Knowledge Base CMS
- Enable the Knowledge Base module (Growth+ plans)
- Go to Knowledge Base in the sidebar
- Create articles directly in our editor
This is ideal for maintaining living documentation that you update regularly.
Step 3: Customize Your Agent
System Prompt
The system prompt defines your agent's personality and boundaries. Go to Settings โ Behavior.
Example prompt:
You are a helpful customer support agent for [Your Company].
Key behaviors:
- Be friendly and professional
- Only answer questions based on the provided knowledge base
- If you don't know something, say so honestly
- Offer to create a support ticket for complex issues
Never:
- Make up information
- Discuss competitors
- Share internal processes not in the knowledge base
Choose Your AI Model
Different models have different capabilities:
| Model | Best For | Speed | Cost |
|---|---|---|---|
| GPT-4o Mini | Simple Q&A | โกโกโก | $ |
| GPT-4o | Complex reasoning | โกโก | $$ |
| Claude 3.5 Sonnet | Long conversations | โกโก | $$ |
| GPT-4 Turbo | Maximum capability | โก | $$$ |
Start with GPT-4o Mini and upgrade if needed.
Step 4: Test Your Agent
Before going live, test extensively:
- Click "Preview" in the top right
- Ask questions your customers would ask
- Try edge cases and unusual phrasings
- Verify answers are accurate
Common test scenarios:
- โ "What are your business hours?"
- โ "How do I cancel my subscription?"
- โ "I have a problem with..." (should offer ticket creation)
- โ "Tell me about [competitor]" (should decline politely)
Step 5: Deploy to Your Website
Get the Embed Code
- Go to Settings โ Widget
- Make sure your agent is marked as "Public"
- Copy the embed code
html<script src="https://chatsy.app/api/embed-script/YOUR_CHATBOT_ID" async defer ></script>
Add to Your Website
Paste the script before the closing </body> tag:
html<!DOCTYPE html> <html> <head>...</head> <body> <!-- Your website content --> <!-- Chatsy Widget --> <script src="https://chatsy.app/api/embed-script/abc123" async defer ></script> </body> </html>
The widget will appear in the bottom-right corner automatically.
Platform-Specific Instructions
WordPress: Add to your theme's footer.php or use a plugin like "Insert Headers and Footers"
Shopify: Go to Online Store โ Themes โ Edit code โ theme.liquid, add before </body>
Webflow: Project Settings โ Custom Code โ Footer Code
React/Next.js:
tsximport Script from 'next/script' export default function Layout({ children }) { return ( <> {children} <Script src="https://chatsy.app/api/embed-script/abc123" strategy="lazyOnload" /> </> ) }
Step 6: Set Up Escalation
When your agent can't help, it should create a ticket.
- Enable the Mailbox module (Growth+ plans)
- Go to Mailbox โ New Mailbox
- Add your support email
- Verify your email address
Now when the agent escalates, you'll receive tickets with full conversation context.
Step 7: Monitor & Improve
Analytics Dashboard
Check your analytics regularly:
- Conversations: Total chats over time
- Resolution Rate: % resolved without escalation
- Common Topics: What customers ask most
- Satisfaction: How customers rate interactions
Continuous Improvement Loop
Review Analytics
โ
Identify Gaps (common questions with low satisfaction)
โ
Add/Update Knowledge
โ
Test Changes
โ
Deploy
โ
Repeat
Next Steps
Now that your agent is live:
- Add custom actions: Connect to your CRM, check order status, etc.
- Enable live chat: Let humans take over when needed
- Set up the knowledge base: Create a public help center
- Invite your team: Collaborate on responses
Common Issues
Agent says "I don't know" too often
- Add more content to your knowledge base
- Check that your content covers the questions being asked
- Lower the confidence threshold in settings
Widget doesn't appear
- Check browser console for errors
- Verify the chatbot is marked as "Public"
- Clear your browser cache
Answers are inaccurate
- Review and update your source content
- Add clarifying information for ambiguous topics
- Consider using a more capable model
Need Help?
Our AI agent is trained on this very documentation. Ask it anything! And yes, a human can take over if needed.
Related Articles
RAG vs Fine-Tuning: Which is Right for Your AI Chatbot?
Should you use Retrieval-Augmented Generation or fine-tune a model for your chatbot? We break down the pros, cons, and best use cases for each approach.
The Complete Guide to Building AI Chatbots in 2026
Everything you need to know about building, training, and deploying AI chatbots for customer support. From choosing the right AI model to measuring success.
Customer Support Automation: The Complete 2026 Strategy Guide
Learn how to automate customer support without sacrificing quality. From AI chatbots to workflow automation, reduce costs while improving customer satisfaction.
Ready to try Chatsy?
Build your own AI customer support agent in minutes.
Start Free Trial