May we use cookies so Meta, Google, LinkedIn and ChatGPT see your visit and we learn which ads work? PrivacyMay we use cookies to see which pages help, and let Meta, Google, LinkedIn and ChatGPT see your visit, so we know which of our ads work? That way we spend less on ads that do not work. We do not sell your data, and the site works the same if you decline. You can change your answer at any time under Cookie settings at the foot of the page. Privacy policy
Loading...
2 system design questions lean on this idea. Each walks through the full answer.
AI Engineering · Agents In Production
Free preview: the first part of this 15-part lesson.
Already bought the course? Sign in to read the whole lesson.
this lesson is part of
Generative AI and Agentic AI Engineering
Unlock this lesson and the 208 other paid lessons
$35 once, by card or PayPal
See the Generative AI and Agentic AI courseread the rest of this lesson in
Generative AI and Agentic AI Engineering
Unlock this lesson and the 208 other paid lessons
$35 once, by card or PayPal
See the Generative AI and Agentic AI coursein Agents In Production
This lesson is part of the AI Engineering course. Unlock the full course, a separate one-time payment, for lifetime access.
One-time payment by card or PayPal
Get Lifetime AccessOne-time payment: UPI, card or netbanking
Get Lifetime AccessFoundation lessons of this course are free, no payment needed. Try them now
Picture a run that is 40 steps deep. It has read three files, called an internal API twice, drafted an email and sent it, and kicked off a refund. On step 41 the process dies. A deploy rolls the pod, or the node is reclaimed, or the code hits an unhandled exception. The run is gone from memory.
Now what. If you restart the run from the top, you re-read the files (harmless), re-call the API (maybe harmless), send the email again (not harmless), and issue the refund a second time (expensive, and now a support ticket). If you drop the run entirely, the user's task is half done with no record of where it stopped. Neither option is acceptable, and the reason is that an agent run is not a request. It is a long-lived process that changes the outside world as it goes.
The thing to notice before we go further is how ordinary the causes of that crash are. None of them require a bug in your agent. A run that lasts minutes or hours will sit through a routine deploy, a spot-instance reclaim, and a transient tool blip as a matter of course, and any one of them ends the process. Sort those causes and you can see what a recovery mechanism actually has to survive.

The first four rows are why crashes have to be survivable. The fifth is why a long task has to be affordable to leave running. This is the problem durable execution solves. It is the fourth lever from the first lesson in this chapter, recoverable steps, made concrete. The other three shorten the chain, raise per-step reliability, and add verification so failures are rarer. This one makes the failures that still happen survivable.