Coders In Hoods
  • Courses
  • Roles
  • Blog
  • Setup

Coders In Hoods AI Academy

Every course is free. Sign in to start, and your progress, quiz scores and bookmarks follow you.

AI Academy

  • Courses
  • Paths
  • Setup guides
  • How we teach

Role roadmaps

  • AI Engineer
  • Forward Deployed Engineer
  • Machine Learning Engineer
  • All roles

Coders In Hoods

  • The agency
  • Coaching for teams
  • Blog
  • LinkedIn
  • X (Twitter)

Contact

codersinhoods@gmail.com

© Coders In Hoods · since 2019

Course overview

Infrastructure for Agents

Free · sign in to start and track progress

1 · Compute and execution

  • 1Where agents run
  • 2Sandboxes for agent code
  • 3Durable execution engines

    Exercise answers

    • Answer: Build a toy durable execution engine
    • Answer: A completion workflow on Temporal with signals and a deadline
  • 4Queues, schedules and background jobs

2 · State, access and delivery

  • 5State, sessions and checkpoints
  • 6Secrets, identity and tenant isolation
  • 7AI gateways
  • 8Environments and delivery for agents
CapstoneA production platform slice for one agentReference implementation

Module 1 · Compute and execution · Lesson 3

Durable execution engines

How Temporal, Inngest, Restate, Trigger.dev and Vercel Workflow keep multi-step agent work alive across crashes, deploys and week-long waits, through one shared model of steps, journals, replay and retries.

80 min 1 video 3 exercises 7-question quiz Answers
Setup for the exercises:Install Claude CodePython with uvRun Temporal locally

By the end of this lesson you can

  • Explain the durable execution model of workflows, steps, an event journal and deterministic replay
  • Predict what re-runs after a crash, and identify code that breaks replay
  • Compute retry schedules from a backoff policy and choose retry settings for model and API calls
  • Compare Temporal, Inngest, Restate, Trigger.dev and Vercel Workflow on execution model, language support and operations
  • Write a long-running payment workflow in Python that waits for an external event with a deadline

On this page

  • Intuition: the matter file with a checklist
  • The model, formally
  • Why model calls are steps
  • Worked example: what a crash costs
  • The engines
  • Code: the completion workflow in Python
  • The replay bug to look for
  • Versioning: changing code under running workflows
  • Misconceptions and limits
  • Connections
  • Summary
  • Sources & further reading
  • Quiz

In this lesson

  1. 01Intuition: the matter file with a checklist
  2. 02The model, formally
  3. 03Worked example: what a crash costs
  4. 04The engines
  5. 05Code: the completion workflow in Python
  6. 06Versioning: changing code under running workflows
  7. 07Misconceptions and limits
  8. 08Connections
  9. 09Summary

Sources & further reading

Serverless Workflows with Durable Functions and Netherite
Paper · Burckhardt, Gillum, Justo, Kallas, McMahon, Meiklejohn · 2021
The clearest research treatment of the model every engine in this lesson shares: workflows written as ordinary code, made reliable by persisting progress and replaying. Read the introduction and the section on the programming model.
  • Temporal Workflow DefinitionDocs · TemporalThe canonical statement of the determinism constraint, why replay compares new commands with the event history, and why LLM calls and database queries belong in activities.
  • Temporal retry policiesDocs · TemporalDefault activity retry policy (1 s initial interval, coefficient 2.0, maximum interval 100× initial, unlimited attempts) and the formula used in this lesson's worked example.
  • Vercel WorkflowsDocs · VercelWorkflows and steps, sleep and hooks, the event log, runs pinned to the deployment that started them, and the Python SDK. The pricing page explains the per-event billing used here.
  • How Inngest functions are executedDocs · InngestThe HTTP-invoked variant of the model: each step runs in a separate request to your app, and the handler replays with memoized step results.
  • Restate journaling resultsDocs · Restatectx.run in Python, the execution log that replays operations after failures, and deterministic helpers for time, random numbers and UUIDs.
  • Free · sign in to start

    Sign in to keep reading.

    Free, no card. We use your account to save progress, quiz scores, bookmarks and occasionally send updates from our team.

    • 9 more sections
    • 3 hands-on exercises
    • A 7-question quiz
    • Progress, quiz scores and bookmarks