Our first support agent was a single loop: give the model every tool, a long system prompt and let it call tools until it said it was done. It demoed well. In production it was slow on simple questions, unpredictable on hard ones, and twice it issued a refund nobody had approved. Every fix we tried was another paragraph in the prompt. What finally worked was not a smarter model but less freedom. We split the loop into a handful of well-known patterns, each with a narrow job, explicit state and a...