The problem#

Customer email looks like a text problem. It's a workflow problem. Something has to decide what the message is about, find the one policy that applies, check what the customer actually bought, draft an answer in the company's voice, and know when to stop and hand it to a person.

Wire an LLM straight to the inbox and you get confident replies with no idea what's true: a refund policy invented, a customer's plan guessed, an escalation that never happened. The model isn't the hard part. The hard part is everything around it.

So this is the deliberately boring version: a production-style workflow with approvals, monitoring, retries, testing and cost visibility — the things that make an AI system something a business can actually run.

How does it work?#

email arrives → classify → retrieve knowledge → CRM lookup → external API → draft response → human approves or escalates → send (or simulated send) → audit log

One pass, one direction, and a human in the middle of it — not at the end as a rubber stamp.

intake
Customer email arrives, gets an ID, and starts a run.
classifier
Works out what the message is about, and how urgent it looks.
retrieval
Pulls the knowledge that applies — with a source reference attached to every claim in the draft.
crm_lookup
Checks who this customer is and what they own, instead of asking them again.
external_api
Where the answer lives outside the CRM, the run goes and gets it.
drafter
Writes the reply from the retrieved sources, not from memory.
approval_gate
A person approves, edits or escalates. Low confidence means escalation, never a guess.
audit_log
Input, category, sources, tools called, draft, decision, outcome — written down.

That last pair is the point of the whole design: the system is allowed to be slow and careful, and it is never allowed to be quietly wrong.

What did I build?#

  1. Phase 1 — the core workflow. Synthetic customer emails, classification, knowledge retrieval, CRM lookup, an external API call, response drafting, human approval, send or simulated send, and the audit log.
  2. Phase 2 — reliability. Retries, timeout handling, a fallback path, malformed-input handling, a simulated failed API, and queue or retry state where it's warranted.
  3. Phase 3 — trust. Human approval, permissions, clear source references, an action log, and a safe fallback whenever confidence is low.
  4. Phase 4 — evals. A small fixed test set with the expected category, expected escalation and expected data source for each case, plus the outputs that are simply not acceptable. It runs automatically and reports pass or fail.
  5. Phase 5 — monitoring. One dashboard: runs, successes and failures, latency, token and model cost where it's measurable, escalations, retry counts.
  6. Phase 6 — demo assets. A hero GIF, a 30-second video, an architecture diagram, a monitoring screenshot, an eval screenshot, and one failure-and-recovery example.

Synthetic data is fine. Fake performance claims are not.

The rule this page is written under.

Before and after#

StepDoing it manuallyDesigned system
Read the messageWhoever gets to the inbox firstClassified on arrival, with the category recorded
Find the answerSomeone remembers, or searches the driveRelevant knowledge retrieved and cited
Check the customerTab across to the CRM, then to another toolCRM and external API checked inside the run
Write the replyDrafted from scratch, in varying voicesDrafted from the retrieved sources, in one voice
Decide to sendNo formal checkpointHuman approves or escalates — always
Know what happenedNothing is recorded anywhereEvery action written to an audit log

None of these steps is exotic. Together they're the difference between a demo and something you'd let near real customers.

Technical depth#

  • workflow orchestration
  • structured outputs
  • retries + timeouts
  • eval harness
  • monitoring dashboard
  • audit log

The architecture is deliberately ordinary: a workflow layer that owns the state, models that only do the language steps, and deterministic code for everything else — retries, permission checks, logging and the send gate.

Model choice is a configuration detail rather than an architecture decision, because the eval set is what decides whether a change ships.

Production readiness#

This is the case study that only exists because of its safeguards. Without them there's nothing here worth showing.

  1. Nothing sends without a person. Approval or escalation is a required step in the run, not a setting someone can turn off.
  2. Sources travel with the draft. Every claim in a suggested reply points back to the knowledge or record it came from.
  3. Low confidence escalates. The safe fallback is a human, and it's the default rather than the exception.
  4. Failures are expected, not discovered. Retries, timeouts, malformed input and a failing external API are all in the test plan.
  5. Everything is logged. Input, decision, tools, draft and outcome — so any reply can be explained afterwards.

The result#

The honest answer: a specified operating design and a phased build plan. No production traffic, no customers, no numbers. What exists is the part most AI projects skip — the failure paths, the approval gate, the eval set and the dashboard.

Runscounted, with success and failure kept separate
Latencytracked per step, so the slow tool is visible
Costtoken and model spend, where it's measurable

Those three are what the monitoring phase will report — written as what will be measured, because nothing has run in production yet.

When the demo assets land they'll show the architecture, the monitoring view, the eval run and a failure being caught and recovered — the four things a page like this normally can't prove.

30-second walkthrough#

Drop video 30-second before/during/after. Before (0–5s): a busy inbox and manual CRM updates. During (5–22s): classification, knowledge retrieval, CRM lookup, the draft, the approval. After (22–30s): the completed log and the monitoring dashboard.
Drop architecture diagram email → classify → retrieve → CRM → API → draft → human gate → send → audit log.
Drop monitoring + eval screenshots runs, failures, latency, cost, escalations, retries — plus one eval run with pass/fail per case.
Drop failure + recovery example a failing external API: timeout, retry, fallback, escalation, logged.

Why this matters to an employer#

APIs and orchestration

Multiple systems, one run, with state that survives a step failing.

Reliability

Retries, timeouts, fallbacks and queue state specified before the first customer email, not after the first incident.

Human-in-the-loop design

The approval step is designed as part of the workflow, not added on as a policy later.

Observability and evaluation

A fixed eval set and a dashboard, because “it looked right in the demo” isn't evidence.

Cost awareness

Token and model spend sits on the dashboard, so the system is priced like infrastructure.

Production thinking

Source references, permissions, audit logs and safe fallbacks — the unglamorous half of shipping AI to real users.

FAQ#

Is this shipped?
No — and the badge says so. It's the operating design and a phased build plan: workflow, reliability, trust, evals, monitoring, demo assets.
Why design it before building it?
Because the hard parts here aren't the model calls. Failure paths, permissions, the approval gate and the eval set are design decisions, and they're cheaper to get right on paper first.
Does it need real customer data?
No. Synthetic emails are fine for the build and the evals — the workflow doesn't care where the message came from. No performance claims are made until it runs.
How do you know the drafts are good?
The eval set: a fixed test set with the expected category, escalation and data source for each case, plus the outputs that are unacceptable. It runs automatically and reports pass or fail.
What happens when the AI isn't confident?
It escalates to a person. Low confidence means a human decides — that's a designed path, not an error state.
Why show an unshipped design at all?
Because most AI failures aren't model failures — they're missing approvals, missing logs and missing failure paths. That thinking is the thing worth showing.