Also available for Download Agents in Production with Claude - Caleb Thorne EPUB version.
Description & Overview
Every week, another team announces they have built an AI agent that can automate a complex business workflow from start to finish. The demo runs beautifully on a laptop with a single clean input. Then comes the hard part, putting that agent in front of real users at real scale. The demo breaks in ways nobody anticipated. The agent runs out of context mid-task. It calls the same tool in an infinite loop, burning thousands in API credits before anyone notices. It follows an instruction hidden in a customer email and deletes production data. These are not hypothetical failure modes. They are the documented aftermath of teams who moved fast without understanding what production demands from an agent system. The most fundamental mistake is treating an agent like a stateless function when it is inherently a stateful process. Each turn adds input, output, tool calls, and tool results to the context, and the accumulation never reverses without intervention. Cost grows faster than linearly as the window fills. The model itself changes under your feet without warning. The knowledge required to run these systems at scale is scattered across issues and postmortems, and this book compresses it into a single structured resource. Inside, you'll discover: • Deployment shapes that fit long-running, stateful agent processes • Cost engineering across the model tier, caching, and token budgets • Context management, compaction, and handoff patterns that hold • Observability, tracing, and stuck agent detection from the first day • Rate limits, retries, and circuit breakers that stop the storms • Prompt injection defense and credential isolation that survive attacks • Evaluation pipelines, drift detection, and the production maturity model The teams that succeed treat agent infrastructure with the same rigor as any production system. Grounded in the APIs and operational realities of today, this book is the difference between agents that burn money and trust and agents that work.