Pre-agent chatbot
Auto-reply to chats while a human waits to pick them up — handle the easy ones; escalate the rest.
When a visitor starts a chat outside business hours, or when the team is busy, the chat sits in Waiting state until someone replies. The pre-agent chatbot fills the gap — it can answer simple questions from your KB without anyone on the team being online, and it knows to escalate when it can't.
What it does and doesn't do
Does:
- Answers questions whose answer is already in your published KB.
- Confirms it's a bot ("I'm Acme's AI assistant…"). No pretending.
- Says "I'll get a human" when it can't help, and leaves the conversation in waiting state for an agent.
- Stops responding once a human agent joins.
Doesn't:
- Make commitments on behalf of your business ("yes, I'll process that refund").
- Quote pricing not in your KB.
- Try to "hold" the conversation if it can't help — escalation is the default.
How it's surfaced
In the chat thread, bot messages render with a ✨ AI assistant pill and a violet bubble — clearly distinct from human agent replies. The visitor knows they're talking to a bot. Your team knows too — bot messages in the inbox are styled the same way.
How it works
- A visitor sends the first message in a Waiting conversation.
- We pull the latest visitor message + the conversation history so far.
- We run an FTS search against your published, public KB articles for that visitor's message.
- We send Claude: the conversation, the top 3 KB articles, and a prompt with two possible outputs:
{"action": "reply", "message": "..."}— answer the question.{"action": "escalate", "reason": "..."}— admit it can't help; the human takes over.
- If
reply, we post the bot's message as if it were an agent (sender_type=agent, is_bot=true, no user_id). - The conversation stays in Waiting state regardless — Pre-agent doesn't pretend to be the "first response".
How it stops
Once any human agent posts to the conversation, the bot stops responding. The conversation transitions to Active state on the agent's first reply, and the bot reads that as "human is here" — no more bot turns.
Cost
Each bot turn is ~2500 input + 100 output tokens. Roughly $0.003 per visitor message. If you're getting 100 chats / day overnight, that's ~$0.30 / day for round-the-clock AI coverage.
When to enable
- After-hours coverage when no agent is online.
- Workspaces with strong KB content — the bot is only as good as your articles.
- Teams that want to deflect simple "how do I X" questions before agents see them.
When NOT to enable
- New workspaces where the KB is empty. The bot will mostly escalate. Visitor experience worse than just showing "we'll get back to you".
- High-trust products where customers expect a human voice from the first reply. Use the offline message form instead.
Off-switch
Settings → AI → uncheck Pre-agent chatbot. The conversation stays in Waiting until an agent replies — same as before the feature existed.