Inspiration
Support teams answer the same questions all day, while bots either invent answers or trap users in a loop. We wanted a bot that knows its limits: it answers only from what the project owner wrote, and when it cannot help, it hands the chat to a real person.
What it does
- Answers only from your script. The admin writes the project rules or uploads .txt, .md, .docx or .pdf files. If the answer is not there, the bot does not guess and calls a human instead.
- Guides users step by step through tasks, with a progress bar ("step 2 of 3").
- Messenger for helpers. Every question is its own chat. The chat title is the topic the AI sets when it calls a helper. Helpers see no user name, id or email, and phone numbers and emails in messages are masked.
- Smart routing. Helpers set availability, working hours and topic tags. Unanswered chats move to another helper after a time limit. A helper can hand a chat back to the bot.
- Learning loop. Questions the bot could not answer appear in the admin panel together with the helper's reply. One click turns it into a script entry.
- Ratings and analytics. Users rate chats from 1 to 5 stars. Admins see the share of questions solved by the bot alone, the reasons for hand-over and average ratings.
- Email only with consent. Notifications go only to confirmed addresses after the user opts in, and never contain message text.
- Security. PII masking before text reaches the model, hashed passwords, CSRF protection, login rate limit, password reset, admin audit log.
How we built it
A small Flask + SQLite backend and a single-file web app. Live updates use Server-Sent Events. The bot talks to the Google Gemini API with two function declarations: request_human_helper(topic) and update_task_progress(...). Large scripts are narrowed to the parts that match the question. Without an API key the bot runs in an offline demo mode (keyword matching), which we used for testing and for the screenshots.
Challenges
- Making hand-over reliable: every failure of the model (error, empty answer, safety block) also becomes a hand-over to a human, never a silent failure.
- Giving helpers enough context to help without exposing user data.
- Avoiding duplicated messages and stale chat lists with live updates.
What we learned
Trust in a support bot comes from what it refuses to do. A clear escape route to a human and honest analytics matter more than clever answers.
What's next
Test against more real scripts, add OCR for scanned PDFs, embeddings-based search for very large scripts, and multi-process live updates.