Bots Overview
Bots are the intelligent conversational agents that power automated interactions in Linktor. They combine AI language models with your business knowledge to provide natural, helpful responses to your customers.
What are Bots?
A bot in Linktor is an AI-powered conversational agent that can:
- Understand natural language: Process customer messages and understand intent
- Generate contextual responses: Provide relevant, helpful answers based on conversation history
- Access knowledge bases: Reference your documentation, FAQs, and business data
- Execute actions: Trigger workflows, update records, or integrate with external systems
- Escalate when needed: Hand off to human agents for complex issues
How Bots Work
Architecture
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Customer │ │ Linktor │ │ AI Provider │
│ Message │────►│ Bot Engine │────►│ (OpenAI, etc) │
└─────────────────┘ └────────┬────────┘ └────────┬────────┘
│ │
┌────────▼────────┐ │
│ Knowledge Base │◄─────────────┘
│ (RAG Context) │
└─────────────────┘
Processing Flow
- Message Received: Customer sends a message through any connected channel
- Context Gathering: Bot retrieves conversation history and relevant knowledge base content
- Prompt Construction: System prompt, context, and customer message are combined
- AI Processing: The configured AI provider generates a response
- Response Delivery: The response is sent back through the original channel
AI Provider Integrations
Linktor supports multiple AI providers, allowing you to choose the best model for your needs:
OpenAI
{
provider: 'openai',
model: 'gpt-4-turbo',
apiKey: process.env.OPENAI_API_KEY
}
Supported models:
gpt-4-turbo- Best for complex reasoning and nuanced responsesgpt-4- High-quality responses with strong capabilitiesgpt-3.5-turbo- Fast and cost-effective for simpler tasks
Anthropic
{
provider: 'anthropic',
model: 'claude-3-opus',
apiKey: process.env.ANTHROPIC_API_KEY
}
Supported models:
claude-3-opus- Highest capability for complex tasksclaude-3-sonnet- Balanced performance and speedclaude-3-haiku- Fastest response times
Azure OpenAI
{
provider: 'azure',
deploymentId: 'your-deployment',
apiKey: process.env.AZURE_OPENAI_KEY,
endpoint: 'https://your-resource.openai.azure.com'
}
Self-Hosted Models
Linktor also supports self-hosted models via OpenAI-compatible APIs:
{
provider: 'custom',
baseUrl: 'http://localhost:11434/v1',
model: 'llama3',
apiKey: 'optional'
}
Compatible with:
- Ollama
- vLLM
- LocalAI
- LM Studio
Creating a Bot
Via Dashboard
- Navigate to Bots in the sidebar
- Click Create Bot
- Enter a name and description
- Select an AI provider and model
- Write your system prompt
- Configure behavior settings
- Assign channels or flows
Via API
import { Linktor } from '@linktor/sdk'
const client = new Linktor({ apiKey: 'YOUR_API_KEY' })
const bot = await client.bots.create({
name: 'Support Assistant',
description: 'Handles customer support inquiries',
provider: {
type: 'openai',
model: 'gpt-4-turbo',
apiKey: process.env.OPENAI_API_KEY
},
systemPrompt: `You are a helpful customer support assistant for Acme Corp.
Your goal is to help customers with their questions about our products and services.
Be friendly, professional, and concise in your responses.`,
settings: {
temperature: 0.7,
maxTokens: 1024
}
})
// Assign to a channel
await client.channels.update('ch_abc123', {
botId: bot.id
})
Bot Types
Conversational Bots
General-purpose bots that handle open-ended conversations:
- Customer support
- Sales inquiries
- General Q&A
Task-Oriented Bots
Bots designed to complete specific tasks:
- Order status lookups
- Appointment scheduling
- Lead qualification
Hybrid Bots
Combine flow-based automation with AI intelligence:
- Start with structured flows
- Fall back to AI for unstructured queries
- Escalate to humans when needed
Knowledge Integration
Bots become more powerful when connected to your knowledge base:
await client.bots.update(bot.id, {
knowledgeBaseIds: ['kb_docs123', 'kb_faq456']
})
The bot will automatically:
- Search knowledge bases for relevant content when processing messages
- Include relevant context in the AI prompt
- Cite sources in responses (if configured)
Monitoring and Analytics
Track bot performance in the dashboard:
| Metric | Description |
|---|---|
| Response Rate | Percentage of messages the bot responded to |
| Resolution Rate | Conversations resolved without human intervention |
| Avg. Response Time | Time to generate and send responses |
| Escalation Rate | Percentage of conversations escalated to humans |
| Satisfaction Score | Customer ratings and feedback |
Best Practices
-
Write clear system prompts: Be specific about the bot's personality, knowledge boundaries, and response style
-
Set appropriate temperature: Lower values (0.1-0.3) for factual responses, higher values (0.7-0.9) for creative conversations
-
Configure fallback behavior: Define what happens when the bot cannot answer
-
Test thoroughly: Use the built-in testing tools before deploying
-
Monitor and iterate: Review conversation logs and continuously improve
Next Steps
- Bot Configuration - Detailed configuration options
- Escalation Rules - Set up human handoff
- Testing Bots - Test before deployment
- Knowledge Base - Enhance bot responses with your data