Templates / Customer Support Agent

Customer Support Agent

An AI customer support agent that answers tickets using only your help docs, cites the sections it used, scores its confidence and routes refunds, legal questions, cancellations and low-confidence answers to a human. It drafts replies and never sends them, and it runs as a Python script, a small HTTP endpoint for your helpdesk, or an n8n workflow.

Who it's for

Small SaaS and e-commerce teams answering the same questions every day without a support hire.

What goes in

  • Your FAQ or help docs as Markdown
  • Tickets (JSON, webhook or helpdesk automation)
  • An LLM API key

What comes out

  • A reply draft per ticket
  • Cited help-doc sections
  • A confidence score and escalation reasons
  • ready_for_review or needs_human status

Setup in 4 steps

  1. Run the offline demo, then drop your docs into kb/.
  2. Set your company name, tone and escalation keywords in policy.json.
  3. Add your LLM key and run it on a batch of real tickets.
  4. Connect the HTTP endpoint or n8n webhook to your helpdesk.

Tool stack

n8n, Make, Zapier

Cost per run

Estimate, not yet measured: about $0.0005 per ticket on a small model (one call, ~2,000 tokens in). The script prints real token usage after each run.

What's included

  • n8n workflow JSON (webhook in, draft out)
  • Python code version (stdlib only, BM25 doc search, HTTP endpoint) + AGENTS.md
  • README setup guide
  • Offline sample data + tests
  • Honest cost notes
  • Changelog

FAQ

Will it make up answers?

It is told to use only your docs, citations it invents are thrown out, and a reply that cites no doc section is sent to a human instead.

Does it send replies automatically?

No. It returns drafts with a status. You review them in your helpdesk; auto-send is deliberately not included.

Which helpdesks does it work with?

Anything that can call a webhook: Zendesk, Help Scout, Freshdesk, Intercom, Gmail via Zapier, Make or n8n. It posts back JSON you can save as a draft or internal note.

How big can my knowledge base be?

The Python version searches your docs, so hundreds of articles are fine. The n8n version pastes docs into the prompt, so keep it under about 30,000 characters there.