The boring stack that makes agents reliable
People ask what model I use, and I tell them, and it’s the least interesting part of the setup. The part that determines whether my agents finish work or quietly die at step nine of twelve is a stack of boring infrastructure that predates LLMs by decades. Here it is, because nobody writes posts about it and everybody needs it.
Logs you can actually read
Every agent run writes a structured log: one JSON line per tool call, with the run ID, the inputs, the result, and the wall-clock time. Not the model’s chain of thought, which I can’t use, but the mechanical record of what happened, which I use constantly. When a run produces a weird result, the log is the difference between “the agent is unreliable” and “the agent retried a failed API call four times and used the fourth response, which was stale.” Only one of those is a thing I can fix.
A queue, not a pile of cron jobs
Work arrives as items in a queue with a state: pending, running, done, failed. The agent takes one item, works it, marks it. If the box reboots, running items fall back to pending and get picked up again. This only works because of the next piece.
Idempotency, enforced by paranoia
Any step that can be run twice must be safe to run twice. Writing a file twice is fine. Creating a resource twice is a mess. So every external action gets a key derived from the work item, and the runner checks whether that key already completed before it acts. This is the least fun code I own and it has saved me more grief than everything else on this page combined.
Retries with a budget
Failed calls retry with backoff, three times, then the item is marked failed and I hear about it. Infinite retries are how a rate-limited API turns into an all-night error generator that also, eventually, gets your key flagged. A retry budget is a decision about how much failure you’re willing to automate, and the answer should be a small number.
The point
None of this is research. It’s the same discipline as any other unattended system, applied to a worker that happens to be a language model. The model gets the credit in conversation because the model is the novel part. The reliability comes from the parts nobody brags about, which is probably why so many agent demos feel magical and so many agent deployments feel cursed. Build the boring stack first. The magic survives contact with it better.