Live work · Telegram Support Agent
Telegram Support Agent.
Production conversational agent that knows when to hand off.
Knowledge-base grounded support bot. Answers from the business's own docs, and escalates to the owner the moment its own answer signals uncertainty instead of guessing.
Demo · Try it
See it in action.
Support Assistant
online · Llama 3.3 via Groq
Hey! I'm the support assistant. Tap a question below and I'll answer from the business's knowledge base. If I'm not sure, I hand off to a human.
Tap a question to send it
Scripted demo of production behavior · escalates when unsure
I · About
The escalation layer reads the bot's own reply for uncertainty signals before the customer ever sees a guess. If the answer admits doubt, a human takes over. Each deployment loads a per-client knowledge base (FAQs, pricing, policies, product details). When a user asks a question, the bot answers grounded in that knowledge base. Every question rolls up into a daily 9pm digest for the business owner.
II · How it works
The pipeline.
- 01Per-client knowledge base loaded from JSON file (FAQs, pricing, policies)
- 02User sends a message via Telegram
- 03Llama 3.3 70B (via Groq) generates a response with the knowledge base as context, keeping the last 3 exchanges for continuity
- 04An escalation layer scans the reply for uncertainty patterns, with false-positive filters so polite hedging doesn't trigger a handoff
- 05On a real uncertainty hit, the owner is notified and the customer is told a human will follow up shortly
- 06Every question is captured for the daily digest
- 07Daily digest at 9pm summarizing escalations and unanswered questions
III · Sample
The real escalation check, from src/escalation.js.
export function needsEscalation(responseText, config) {
const lower = responseText.toLowerCase();
// Check if any false positive patterns are present — if so, don't escalate
if (FALSE_POSITIVE_PATTERNS.some(fp => lower.includes(fp))) {
return false;
}
// Check for real escalation patterns
return ESCALATION_PATTERNS.some(kw => lower.includes(kw));
}
// The LLM call it guards (condensed from src/ai.js)
const res = await fetchRetry(GROQ_API, {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.GROQ_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
model: 'llama-3.3-70b-versatile',
messages, // system prompt + last 3 exchanges + new message
temperature: 0.4,
max_tokens: 500,
}),
});