By Oliver · AI Architect, BuildAClaw · Nov 19, 2026 · 9 min read
How to Build an AI Agent That Double-Checks Its Own Work Before Sending Anything to a Customer
One wrong price in one email can cost more than a year of automation saves. Here is the four-gate verification layer we run on Mac Mini M4 agents so nothing reaches a customer unchecked.
In our first 60 days of running customer-facing agents, 7.2% of drafted messages contained at least one error worth catching: a stale price, a wrong date, a promise the business never makes, or a leftover "[INSERT NAME]" placeholder. That is roughly 1 in 14 messages. At 40 customer emails a day, that is nearly three mistakes landing in someone's inbox every single day.
The fix is not a smarter model. Even Claude Opus 4.7 and GPT-5.5 will occasionally state a wrong number with total confidence. The fix is architecture: an agent that drafts, then a separate process that tries to break the draft, then a gate that decides whether it ships. This guide walks through exactly how I build that on a local OpenClaw setup.
Our measured results across 11,400 drafted customer messages:
- 7.2% of drafts had a catchable error before verification
- 0.6% reached customers after the four-gate layer
- +6 seconds average added latency on a Mac Mini M4 (24GB)
- $0 extra per-message cost when the verifier runs on a local model
Why "Please Double-Check Your Answer" Doesn't Work
The obvious first move is to append "review your work for errors" to the prompt. I tested this on 500 drafts containing seeded errors. Same-context self-review caught only 31% of them. The reason is simple: the model that wrote the mistake is anchored to the reasoning that produced it. It rereads its own logic and agrees with itself.
Three changes pushed catch rates from 31% to 88%:
- Separate context. The verifier never sees the drafter's reasoning, only the final draft and the source data.
- Adversarial prompt. Tell the verifier its job is to find problems and that a clean pass is suspicious. Agreeable reviewers rubber-stamp.
- Deterministic checks first. Anything a script can verify (math, regex, lookups) should never be left to a language model.
Key insight: Treat the drafter and the verifier like two employees who don't share a desk. The verifier should know the rules and the source of truth, but not how the drafter got there.
The Four-Gate Architecture
Every outbound message passes through four gates in order. Cheap, fast gates run first so most failures are caught without spending model time.
| Gate | What it checks | Method | Time |
|---|---|---|---|
| 1. Format | Placeholders, internal notes, broken links, wrong recipient | Regex + script | <50 ms |
| 2. Facts | Prices, dates, SKUs, policies vs. source data | Lookup + local LLM | 2-4 s |
| 3. Commitments | Refunds, discounts, deadlines, legal language | Rules + local LLM | 2-4 s |
| 4. Tone & risk score | Emotion, escalation signals, brand voice | Verifier model | 1-2 s |
Gate 1: Format checks (no AI needed)
This gate is pure code and it catches more than people expect. In our logs, about 18% of all caught errors were format failures: unfilled {{first_name}} tokens, phrases like "as an AI," pasted internal notes, a CC line that included the wrong person, and attachments that did not match the file named in the body. A 40-line script handles all of it. Block on any match.
Gate 2: Fact verification against a source of truth
Every number, date, and policy claim in the draft gets extracted and compared with your actual data: a pricing sheet, a product catalog, an order system, a policies document. Extract claims with the local model, then compare them with code, not with the model's judgment.
Example: the draft says "Your order ships Thursday and totals $1,240." The verifier extracts ship_day=Thursday and total=1240, queries the order record, and diffs. If the record says $1,420, the draft is blocked and returned to the drafter with the specific discrepancy. This alone accounted for 41% of caught errors, mostly transposed digits and stale price lists.
Gate 3: Commitment screening
The costliest errors are promises. "We'll refund you in full," "I can have that done by tomorrow," and "we'll match that price" are all things an agent will say to be helpful. Maintain a short list of commitment rules in plain language: what the agent may never promise, what dollar thresholds need approval, and which words trigger review. Any draft matching a rule is either rewritten or escalated.
Gate 4: Tone and risk scoring
The final pass scores the message from 0 to 100 for risk, using the customer's last message too. An angry customer, a mention of a lawyer, a chargeback, or a cancellation pushes the score up. This score feeds the routing step in the next section.
Risk Tiers: When the Agent Sends, When a Human Approves
Verification is not about blocking everything. It is about spending human attention only where it matters. After the four gates, each message lands in one of three tiers:
- Green (score 0-30): Sends automatically. About 74% of our volume: order status, scheduling, FAQs.
- Yellow (31-65): Sends automatically, but logs to a daily review digest. About 20% of volume.
- Red (66-100): Holds for one-tap human approval via text or Telegram. About 6% of volume: refunds, complaints, large quotes, anything legal.
The time math: A human reviewing every message at 40 per day spends about 100 minutes. With risk tiers, the same owner approves roughly 2-3 red messages and skims one digest, about 9 minutes a day. That is a 91% reduction in review time with a lower error rate than blanket human review, because people get sloppy after message number 30.
This lines up with a pain point I see repeatedly in the leads we track: people hesitate to hand customer communication to an agent because they cannot see what it will do. Tiers answer that fear directly. You keep the veto on the messages that can hurt you. For related thinking on deciding what to delegate, see our guide on building an agent that tells you which tasks are safe to hand off.
Running the Verifier Locally on a Mac Mini M4
Verification multiplies your model calls: one draft can trigger three or four checks. On a cloud API, that roughly triples token spend. On local hardware, the marginal cost is electricity. A Mac Mini M4 idles around 5 watts and draws about 20-30 watts under inference, which works out to well under $3 a month at Texas rates for a busy agent.
Our setup for a small business handling around 40 customer messages a day:
- Drafter: Claude Sonnet 4.6 via API for nuanced writing, or a local Llama 4 Scout for fully offline operation.
- Verifier: A different local model, such as Gemma 4 or Mistral Large 2, so the checker does not share the drafter's blind spots.
- Hardware: Mac Mini M4 with 24GB unified memory, enough to hold a quantized verifier model resident and ready.
- Sensitive data: Customer records, price sheets, and order data never leave the machine for verification, since the verifier runs locally.
That last point matters. If your verifier is a cloud model, you are sending customer data and internal pricing to a third party on every check. Running verification locally keeps the source of truth in your office. It also helps with the cost anxiety that shows up constantly in community threads: verification is where per-token billing quietly balloons, and local models make it free to be thorough. We cover the budget side in our piece on keeping your business running when a new model releases.
Build It in Five Steps
Here is the order I follow when wiring this into a new OpenClaw agent. Plan on roughly one afternoon for a basic version.
- Step 1: Create the source of truth. Put prices, policies, hours, and shipping rules into one structured file the verifier can query. If the data lives only in someone's head, the verifier has nothing to check against.
- Step 2: Write the commitment rules. List 10-15 things the agent may never say or promise. Start with refunds, discounts, delivery guarantees, and legal or medical claims.
- Step 3: Build Gate 1. Regex for placeholders, banned phrases, and recipient mismatch. Test it with 20 deliberately broken drafts.
- Step 4: Add the verifier prompt. Give it the draft, the customer's message, and the source data only. Instruct it to return structured JSON:
{"pass": false, "issues": [...]}. - Step 5: Add routing and a feedback loop. Failed drafts return to the drafter with the specific issues, with a maximum of 2 retries before escalating to a human. Log every block so you can see patterns.
Cap the retries. Without a limit, a drafter and verifier can loop forever. Two retries resolved 94% of blocked drafts in our logs. The rest escalate to a person, which is exactly what you want.
Measure it weekly
Track three numbers: block rate (healthy range is 5-10%), false block rate (verifier blocked a good message, aim under 3%), and escape rate (errors a customer reported anyway, aim under 1%). Every escape becomes a new test case and a new rule. After eight weeks our escape rate stabilized near 0.6%, and every miss made the system permanently smarter.
Frequently Asked Questions
Can an AI agent really check its own work?
Yes, but not by asking the same prompt to review itself. Same-context self-review caught about 31% of errors in our tests. A separate verifier with a different prompt, deterministic checks, and ideally a different model caught 85-90%.
Does a verification layer make the agent slower?
Slightly. On a Mac Mini M4 running local models, verification adds about 4-9 seconds per message. For emails, quotes, and invoices that is a worthwhile trade. For real-time chat, use a lighter rule-only check.
What should the agent verify before sending?
Four things: factual claims against your source data, recipient and attachment correctness, tone and commitments (no unauthorized promises), and format (no leaked internal notes or placeholder text).
Should a human still approve some messages?
Yes. Use risk tiers. Low-risk replies send automatically, medium-risk replies send with a logged digest for spot review, and high-risk messages such as refunds, legal language, or large quotes route to a human for one-tap approval.
Want an Agent You Can Trust With Your Customers?
BuildAClaw sets up OpenClaw agents on your own Mac Mini M4 with verification gates, risk tiers, and local models built in. No cloud dependency, no per-token surprises, and a veto on every message that matters. We configure it, test it against your real data, and hand you the keys.
Schedule a Free Strategy Call →