Skip to content
← All articles

Building agents that survive production

Retries, timeouts, tool failures and the boring parts that decide whether an agent ships.

Most agent demos work once. Production is the other ten thousand runs — when a tool times out, a model returns malformed JSON, or a retry quietly duplicates a side effect.

I have been building agents for healthcare, meetings and developer tooling. The pattern is always the same: the model is the easy part; the system around it is the product.

Start with failure, not the happy path. List every way a run can fail before you wire the model, then make each failure explicit in the graph instead of hoping the prompt handles it.

Persist every step. If the process dies, the run should resume from the last known-good state, not restart and double-charge someone.

Instrument token cost and latency per step from day one, and write the evaluation set before the second feature. Both are cheap early and painful later.