REALIADADTECH / BUILD & LEARN
← The flagship programme

MODULE 04 OF 12 · RELEASE 1 · OUTLINE

State, Memory & Durable Execution

Work that remembers where it got to, even if the power goes out mid-task.

This module is an outline. The plain-language explanation and the lab specification below are final. The full written lesson and its runnable lab repository are still being prepared, and enrolment is not open.

You are following a recipe with twelve steps. Halfway through, the phone rings and you leave the kitchen for an hour. When you come back, you look at the pan and the ticked-off steps and carry on. You do not start again from the shopping.

So what is this really about?

Long jobs in software need the same thing: a written note of what has already been done. If the program restarts — a crash, a deploy, a server moving — it should read the note and carry on, not start over. Starting over is not just slow; if step two sent an email, starting over sends it twice.

A run that records each completed stepEach step records its result before the next begins, so a restart resumes at the next unfinished step rather than repeating work.Step 1Step 2Step 3Step 4done and written downrestart resumes here
Each step records its result before the next begins, so a restart resumes at the next unfinished step rather than repeating work.

QUICK CHECK

A four-step job crashes after step two. Step two sent a confirmation email. What must resuming NOT do?

The words you will hear

State
The ticked-off steps. What has happened so far, written down where it survives a restart.
Durable
Survives the program stopping. In a database, not in memory.
Resume
Picking up at step seven instead of step one.
Memory (conversation)
What was said earlier in a chat. Useful context — but not the official record of what was done.

By the end you will be able to

How it is put together

A run record holds the task, its current step, and the result of every completed step. Each step is a pure function of that state plus its own side effect, recorded before the step advances. Resuming means reading the record and continuing, not replaying. Conversation memory is a separate, size-bounded store — it informs prompts and is never the source of truth for what has happened.

Where you start

A three-step agent flow held entirely in memory, which loses everything if the process restarts.

The lab

  1. Model the flow as a run record with an explicit step and a result per step.
  2. Record each side effect before advancing, so a crash cannot lose it.
  3. Add resume: given a run id, continue from the recorded step.
  4. Add a bounded conversation memory with an explicit eviction rule.
  5. Add a terminal failure state that stops the run rather than looping.

What goes wrong, on purpose

The scenario. The process is restarted between step two and step three.

What should happen. Resuming continues at step three. Steps one and two are not repeated, and their side effects occurred exactly once.

How you prove it works

What you walk away with

An agent flow you can kill at any point and restart without duplicate effects, and a memory store with a stated eviction policy.