Demos are easy. An agent that reads an inbound email, classifies it, and drafts a reply takes an afternoon to build and looks incredible on a screen share. The hard part starts when nobody is watching it.
The guardrail stack
Every agent I ship gets the same wrapper, in this order:
- Idempotency keys. The agent can be retried without double-acting. If it already replied to a message ID, the second attempt is a no-op.
- Retries with backoff, then a dead-letter queue. Transient failures retry three times. Anything still failing lands in a queue a human reviews, with full context attached.
- Confidence thresholds. The model scores its own output. High confidence acts autonomously; low confidence routes to a review queue. The threshold starts strict and loosens as approval rates climb.
- A kill switch that isn't a deploy. One flag in the workflow tool pauses the agent. When something goes weird at 2 a.m., you want a toggle, not a rollback.
Knowing when it should just stop
The most underrated skill in agent design is refusing to act. Ambiguous input, missing fields, an account in a weird state: the right move is almost always to stop and ask, not to guess. Guessing is how one bad row becomes two hundred bad emails.
Draft post. The full n8n error-handling pattern and the review-queue design are coming as a walkthrough video.