An AI support agent that answers from your help articles, and knows when to hand off
After using this, you can let a chat on your site answer the questions your help articles already answer, with the source linked, and pass everything else to a person, without a per-resolution fee and without a model making up a refund policy. Open source (MIT), one Node process you host yourself, works with no AI key at all.
Below: paste your articles and ask a question, then paste questions with known answers and see how often it would be right, wrong or hand off, and which confidence bar to use. Everything on this page runs in your browser; nothing is uploaded.
1. Ask it something
2. Measure it on questions you know the answer to
One question,expect per line; expect is the slug of the right article (several joined by |) or handoff. The sample was written by the author of this tool, so treat it as a demo, not evidence; the benchmark below is the evidence.
Measured on real customer questions (BANKING77)
BANKING77 (PolyAI, CC BY 4.0) is 13,083 online-banking questions written by people, labelled with 77 intents. We wrote 22 help articles for a made-up money app from the intent names alone, covering 34 intents; 20 intents that need someone to look at the account (lost cards, double charges, refunds, unrecognised payments, failed transfers) are left uncovered and should go to a person. The confidence model and bar were fitted on training questions; the numbers are the held-out test split: 2,160 questions, 1,360 of them answerable from an article.
| Past questions per topic | Answered right | Answered wrong (share of answers) | Offered articles (one right) | Handed off rightly | Handed off, an article had it |
|---|---|---|---|---|---|
| none | 65 (3.0%) | 0 (0%) | 1,172 (851) | 565 | 358 |
| 10 | 786 (36.4%) | 39 (4.7%) | 431 (314) | 721 | 183 |
| 40 | 1,007 (46.6%) | 66 (6.2%) | 211 (156) | 742 | 134 |
The bar was chosen on the training questions to keep wrong answers at or under 5% of answers; on the test split it came out at 4.7% and 6.2%. Without past questions the built-in bar is cautious and the agent mostly offers articles rather than stating answers. The lesson: past tickets labelled with the article that answered them matter more than anything else you can add. node fixtures/banking77/benchmark.mjs reproduces the table.
Run it on your own site
git clone https://github.com/Duncan-Haywood/oss-monorepo && cd oss-monorepo/ventures/support-agent ADMIN_KEY=$(openssl rand -hex 16) node server.mjs # open http://localhost:8080/admin, paste your articles, then on your site: <script src="https://your-agent.example.com/widget.js" defer></script>
- Handoffs land in your inbox: set
HANDOFF_WEBHOOK_URLto a Support Desk mailbox's inbound URL (or any webhook takingfrom, subject, text); the customer's question and the chat so far go with it. - Articles from your help center: paste Markdown, a Help Keeper export, or set
KB_SOURCE_URLto a Help Keeper site to import it. - A friendlier wording, optional: your own Anthropic, OpenAI or Gemini key, or Ollama on your own machine. The reply is checked against the article before anyone sees it.
- The gap list: the admin page lists what customers asked that no article answered, most frequent first.
One-click deploy on Render from your fork, Docker Compose, or Fly.io: see the README.
Questions
How does it avoid making things up?
Without a model, every answer is sentences copied from one of your articles, so nothing can be invented. With a model on your own key, the model only rewrites an answer the agent already chose, and its text is thrown away unless every number, link, email address and promise in it appears in the cited article.
When does it hand off to a person?
Always when a customer asks for a person, asks for money to move (a refund, a double charge), mentions legal action, injury, a hacked account or a data deletion request, sounds upset, or pastes a card number. Otherwise when its confidence is under the bar you set; between the suggest bar and the answer bar it offers articles with the handoff one click away.
How well does it work?
On the BANKING77 test split (2,160 real online-banking questions, 1,360 of them covered by 22 articles), with 40 past questions per topic it answered 1,007 correctly with 66 wrong answers (6.2% of answers); with 10 per topic, 786 with 39 wrong. With no past questions its cautious built-in bar answered only 65, all right, and offered articles for most of the rest. Run your own questions on this page to see your numbers.
Do I need an AI key?
No. Deciding, answering and the handoff all work without one. A key from Anthropic, OpenAI or Gemini, or a model on your own machine through Ollama, LM Studio or llama.cpp, only makes the wording friendlier, and a checker guards it.