Last year a friend's company shipped an internal "smart customer service Agent." Two weeks to a demo. The boss asked it questions, it answered every one. Applause. Ship it.
Day three in production, it fell apart — rate-limit meltdowns, a leaked expense record, a prompt injection that dumped the system prompt, ¥47,000 in tokens burned in a month, and a fabricated approval chain that seized up finance.
The code looked exactly like the tutorials. RAG? Checked. Function Calling? Checked. The problem: it was only ever a demo.
Most agent tutorials cover the three least important layers — the model, the tools, the basic loop. Production-grade agents live in the layers nobody teaches: error handling under load, cost blowup, data permissions, prompt injection, observability, and evaluation.
My take: learning frameworks is already late. Learning the engineering system — how to wrap an unstable probabilistic model into something safe to ship — is right on time. That half-life is measured in years, not months. That's what this series is about.
Full article — the 7-layer production skeleton + the full post-mortem → https://leo76868.substack.com/p/you-think-youre-building-ai-agents
Production-Grade AI Agents — by Leo Wang · Follow on X · Subscribe
Top comments (0)