Building AI agents that survive contact with production
Demo agents work because nothing is at stake. Here is what changes when real users, real money and real edge cases show up.
Most agent demos are honest about what they do and quiet about what they assume. They assume the tool call succeeds. They assume the user asks the question the way the prompt expects. They assume nobody is watching the bill.
Production removes all three assumptions at once.
Start with the failure modes, not the happy path
Before writing the first prompt, I write down what the agent is allowed to get wrong and what it is never allowed to get wrong. A support agent may misjudge tone. It may not issue a refund. That single distinction shapes the entire tool surface: anything in the second list gets a human confirmation step, permanently.
Evals are the actual product
A prompt without an eval suite is a guess you cannot repeat. I keep a fixed set of real cases — the boring ones, the ambiguous ones, the ones that broke last month — and every prompt change runs against them before it ships.
- Regression cases pulled from real transcripts
- Adversarial cases written deliberately to break the agent
- Cost and latency budgets checked alongside correctness
Log everything the agent decided, not just what it said
When something goes wrong, the output is the least useful artifact. What you need is the tool calls, the arguments, the retrieved context and the branch it took. Store those, and debugging an agent stops feeling like archaeology.
Give it a smaller job than you want to
Every agent I have shipped that worked started narrower than the client originally asked for. Scope it to one workflow, prove the reliability numbers, then widen. Agents that try to do everything on day one end up trusted for nothing.
Lighthouse scores decay the moment the launch is over. A budget only works when it fails the build, not the vibes check.
How I scope fixed-price work without losing moneyFixed price is only dangerous when the scope is vague. The discovery call is where that gets solved — or doesn't.