Chatbots
So far, we've discussed how to build powerful AI agents with custom knowledge and capabilities. But what if you want to share your agent so anyone can use it, even without a MindPal account? That's where chatbots come in.
What are Chatbots?
Chatbots are the publishable version of your AI agents. They provide a user-friendly chat interface that allows anyone to interact with your agent's capabilities. Think of it as turning your agent into a public-facing service that can be:
- Embedded on your website
- Shared via a public link
- Accessed through a chat bubble
- Hosted on your custom domain
How Chatbots Work
When you publish an agent as a chatbot:
- Interface Layer: Your agent gets wrapped in a customizable chat interface
- Public Access: Users can interact without needing a MindPal account
- Secure Processing: All interactions are still powered by your configured agent
- Data Collection: Optional user information can be gathered
- Usage Tracking: All conversations can be monitored and analyzed
- Webhook Integration: Automatically send user info and conversation logs to external systems
One agent can be published as multiple chatbots, each with its own unique interface and settings.
Configuring Chatbots
Set Up the Chatbot Interface
Navigate to the chatbot builder to configure these sections:
1. Choose the Brain
- Agent: Select the AI agent that will power this chatbot (required)
- This is the "brain" behind your chatbot - it determines what the chatbot knows and can do
2. Set Up the Identity
Configure how your chatbot appears to users:
- Name: Give your chatbot a clear, identifiable name (required)
- Categories: Organize your chatbot with tags for easy discovery
- Avatar: Add a profile picture (supports image URLs or file uploads)
- Description: Explain what your chatbot can help with
3. Design the Chat Experience
Control the initial user experience:
- Welcome Message: Set the first message users see when chatting (required)
- Conversation Starters: Add clickable message suggestions to help users get started
4. Customize the Chat Interface
Personalize the visual appearance:
- Brand Color: Choose a custom accent color for the interface
- MindPal Branding: Toggle the "Powered by MindPal" badge visibility (requires upgrade)
- Affiliate Code: Connect your affiliate code to earn commissions when users subscribe via the badge link
- UX Copywriting: Customize button texts, placeholders, and other interface copy:
- Chat send button text
- Chat input placeholder
- User info form send button text
5. Capture User Info
Collect information from users with flexible options:
- Collection Mode: Choose one of three options:
- Don't collect: Users can chat immediately without providing info
- Optional: Users can skip providing info and go straight to chatting
- Required before chat: Users must complete the form before accessing the chat
- Form Title: Set a custom title for your info collection form
- Custom Fields: Add multiple form fields with different types:
- Text: Single-line text input
- Long Text: Multi-line text area
- Email: Email address input with validation
- URL: Website URL input with validation
- Number: Numeric input with validation
- Webhook Integration: Automatically send collected user info to your external systems (see Advanced section below)
6. Control Access
Manage who can access and how:
- Custom URL/Slug: Get a unique chatbot URL (chatbot.mindpal.space/your-slug)
- Custom Domain: Use your own domain for the chatbot (e.g., chatbot.yourdomain.com)
- Embedding Restrictions: Limit which domains can embed your chatbot as an iframe (requires upgrade)
- Add specific domains (one per line) that are allowed to embed your chatbot
- Example:
example.com,subdomain.example.com
7. Advanced Settings
Configure advanced features:
- User Info Webhook: Automatically send collected user data to an external webhook URL when users submit the info form
- Conversation Complete Webhook: Automatically send conversation logs to an external webhook URL when a conversation ends
- Email Notifications: Receive email alerts when new conversations are created
- Rate Limiting: Enforce maximum conversation limits within specified time intervals (requires upgrade)
- Set maximum conversations allowed
- Choose time interval: per minute, per hour, or per day
Using Webhooks
When you enable webhook features, MindPal automatically sends data to your external systems.
User Info Webhook
When enabled, triggers when a user submits the info collection form:
Payload Structure:
{
"chatbotId": "<YOUR_CHATBOT_ID>",
"chatbotConversationId": "<CURRENT_CONVERSATION_ID>",
"chatbotConversationViewUrl": "<VIEW_URL>",
"userInfo": {
"firstName": "John",
"email": "john@example.com",
"company": "Acme Inc"
}
}Setup: Provide a webhook URL from services like Make.com, Zapier.com, or any automation platform
Conversation Complete Webhook
When enabled, triggers when a chatbot conversation ends:
Payload Structure:
{
"conversationId": "<CONVERSATION_ID>",
"chatbotId": "<YOUR_CHATBOT_ID>",
"chatbotName": "<CHATBOT_NAME>",
"chatbotSlug": "<CHATBOT_SLUG>",
"conversationData": {
"messages": [
{
"id": "<MESSAGE_ID>",
"role": "user",
"content": "User message text here",
"createdAt": "2024-01-01T00:00:00.000Z"
},
{
"id": "<MESSAGE_ID>",
"role": "assistant",
"content": "Assistant response here",
"createdAt": "2024-01-01T00:00:01.000Z"
}
],
"startedAt": "2024-01-01T00:00:00.000Z",
"completedAt": "2024-01-01T00:05:00.000Z",
"messageCount": 10
},
"timestamp": "2024-01-01T00:05:00.000Z"
}Fields:
conversationId: Unique identifier for the conversationchatbotId: Unique identifier for the chatbotchatbotName: Display name of the chatbotchatbotSlug: URL-friendly identifier for the chatbotconversationData.messages: Array of all messages in the conversationid: Unique message identifierrole: Message sender role ("user" or "assistant")content: Message text contentcreatedAt: ISO timestamp of when the message was created
startedAt: ISO timestamp when the conversation startedcompletedAt: ISO timestamp when the conversation endedmessageCount: Total number of messages in the conversationtimestamp: ISO timestamp when the webhook payload was generated
Deploy & Share
After configuring, you can publish and share your chatbot with:
- Shareable Link: Copy your public chatbot URL for easy sharing
- Embed Code: Get iframe code to embed your chatbot in any website
- Chat Bubble Widget: Add an interactive chat bubble to your site with customizable behavior:
- Show initial message bubble when minimized
- Start minimized or expanded by default
- Available in HTML and Next.js formats
View Conversation Logs
Monitor your chatbot's performance through the logs section:
- View complete chat histories
- Access collected user information