Reads every enquiry, checks the facts, drafts the reply. A human clicks send.
A Claude agent for a small service business. It triages emails and web-form enquiries, looks up the customer, prices, service area and free slots through a custom MCP server, drafts a grounded reply and waits for approval in Slack before it sends, books or writes anything.
Hi Sarah, thanks for getting in touch again! Our annual gas boiler service is a fixed £95, including a full safety check and a written service record. BS6 is in our core area, so there’s no travel charge. I can offer Tuesday at 10:00 or Wednesday at 14:00. Just reply with whichever suits you.
price matches price list no other customer’s data
awaiting your approval
EditRejectApprove & send Sent
14.1 s $0.033 4 tool calls logged to audit trail
5/5
prompt-injection attempts blockedacross both test sets
0
drafts with an invented priceevery £ figure checked against the price list
~$0.03
AI cost per enquiryclassify + draft
~14 s
from enquiry to ready-to-send draftaverage, main test set
The problem
Small service businesses lose hours a week reading enquiries, looking up customers and prices, and writing the same replies. Urgent jobs get buried in the inbox, and handing the job to a chatbot that might invent a price is not an option.
How it works
One pipeline, one approval gate.
Enquiry arrivesGmail · web form
ClassifyHaiku · urgency, injection
Look up factsMCP · 4 read-only tools
Draft & checkSonnet · price check
You approveSlack · approve / edit / reject
Send & recordEmail · CRM · calendar
Claude only reads and drafts. The tools are read-only, so every send, record change or booking waits for a person.
What I built
The parts that make it work.
01
Triage in seconds
An n8n pipeline reads Gmail and a web form, skips duplicates, and has Claude Haiku classify each enquiry: category, urgency, emergency, prompt-injection attempt. Gas leaks and vulnerable customers without heating are always emergencies, by rule.
02
A custom MCP server
Four read-only tools written in TypeScript: find the customer (verified by email or phone, masked otherwise), the price list and policies, the service area, and free appointment slots from Google Calendar.
03
Grounded drafts
Claude Sonnet drafts the reply in the business’s tone using only what the tools returned. Every price in the draft is checked against the real price list, and anything that doesn’t match goes to a person.
04
One-click approval
A Slack card shows the summary, the draft and its checks, with Approve, Edit and Reject. Approving replies in the email thread, creates the customer and job records and holds the offered slots in the calendar.
05
A self-serve live demo
Anyone can send an enquiry, confirm it by email, watch every step with its timing and AI cost, then approve, edit or reject the draft themselves. Demo data is deleted after 7 days.
06
Measured before launch
40 labelled enquiries plus 15 held-out ones never used for tuning, each draft graded fact by fact by a separate Claude model that was itself tested. The first-run numbers are published, misses included.
Measured results
Tested on cases it had never seen.
Run through the real pipeline in test mode. The held-out set was written separately and never used for tuning, so its first run is the realistic estimate.
Measure
Result
Prompt-injection attempts flagged, no harmful draft
5 / 5
Drafts containing a forbidden fact (invented price, another customer’s details)
0
Drafts with every required fact (main set, after fixes)
97%
Drafts with every required fact (held-out, first run)
85%
Category accuracy (main set after fixes / held-out first run)
100% / 80%
Emergencies caught (held-out first run: 1 of 2, fixed and documented)
7 / 7
Average AI cost per enquiry
$0.033
The held-out set caught a missed emergency on its first run. The fix and the reasoning are in the published evaluation report.Read the full report
Safety & reliability
Built to production standards.
Human in the loop
The MCP tools are read-only. Nothing is sent, booked or written until a person approves.
Injection-resistant
Enquiry text is treated as data. Attempts are flagged and shown to the approver; the agent has no tool that sends or deletes.
Least privilege
Separate database roles for the pipeline, the MCP server and the demo, each proven by script to reach only what it needs.
Hardened edge
Caddy with automatic HTTPS and an HAProxy gate: a path allow-list, per-IP rate limits, signature-checked Slack webhooks.
Full audit trail
Every step, tool call, decision, approver and token cost is logged, so any reply can be traced back to its sources.
Failure alerts
Errors post to an alerts channel instead of failing silently; API calls retry with backoff, duplicates are never processed twice.
Stack
AI
Claude Haiku 5.5 (classify)Claude Sonnet 5.5 (draft)Claude Opus 5.5 (grader)Model Context Protocol (TypeScript SDK)