Live demoDemo for a fictional company Public code

AI Enquiry Agent

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.

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.

  1. Enquiry arrivesGmail · web form
  2. ClassifyHaiku · urgency, injection
  3. Look up factsMCP · 4 read-only tools
  4. Draft & checkSonnet · price check
  5. You approveSlack · approve / edit / reject
  6. 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.

MeasureResult
Prompt-injection attempts flagged, no harmful draft5 / 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)

Automation

n8n (self-hosted)Slack APIGmail APIGoogle Calendar APIWebhooks

Data

Supabase PostgresLeast-privilege rolesAudit log

Infrastructure

DockerCaddyHAProxyUbuntu VPSCloudflare DNS
For your business

Adapts to the tools you already use.

  • Gmail or Outlook
  • Your CRM or job system
  • Google or Outlook calendar
  • Slack, Teams or email approval
  • Your prices, policies and tone of voice
Talk about your version
Taking on new projects

Got a process that eats your team’s hours? Let’s automate it.

Tell me what it is. I’ll come back with whether AI is the right fix, what it would take, and what it would cost to run.

Replies within 24 hours · Free 30-minute discovery call

To get started, send me

  1. 1The task you’d like off your plate
  2. 2The tools it touches (inbox, CRM, website…)
  3. 3Roughly how often it happens

That’s enough for me to come back with an approach, a rough timeline and the questions that matter.