Mirage Academy · Agent orchestration course

Agent orchestration course: build workflows that survive crashes

Your agent works in the demo. Then a step fails halfway, or someone must approve a payment, and the whole run starts over. This course shows how to build a multi-step agent workflow with state, approvals and recovery from failure. Watch the course in a minute, then crash an example run yourself.

Open the courseCrash a run

The course in a minute

Watch how the course ends: a workflow that survives

Agent Orchestration & Workflow Engineering builds a multi-step agent workflow, from the first graph to the capstone. The course and video are in English; the transcript is below the video.

Still from the intro video for the course Agent Orchestration & Workflow Engineering
Intro video, 1 min 6 s. Transcript below.
Read the transcript

Your agent works in a demo. Then a step fails halfway, or someone must approve a payment, and the whole run starts over. This course is for engineers who need agent work to finish reliably. The course starts with a distinction. A plain agent loop keeps state in memory and loses it on a crash. A durable workflow stores state, pauses for a person, and retries a step without repeating its side effects. Then you build it. Each step runs, then writes a checkpoint. At an approval, the workflow waits for a human. If the process crashes, it resumes from the last checkpoint. Nine chapters take you from graphs and state to retries, approvals, parallel steps and observability. The capstone is an approval workflow that survives crashes. Enroll and build it with us.

  • Advanced level

    Advanced is the level the catalogue gives it.

  • 9 chapters, 45 lessons

    Nine chapters of five lessons each, ending with the capstone on crash-safe approval.

  • Who it is for

    If you build AI features as an engineer or technical product person, this is aimed at you.

The course's intro video with a play button, and three facts in a row: the level, the size and who the course is for.

Chapter 1

Four words that get mixed up

An agent loop, a workflow, a state machine and durable execution are not the same thing. The first chapter separates them and ends with four checks for choosing and combining.

  • Agent loop
    1. Fetch
    2. Draft
    3. Approve
    4. PayCrash
    5. Report

    Starts again

  • Durable workflow
    1. Fetch
    2. Draft
    3. Approve
    4. PayCrash
    5. Report

    Resumes here

  • Agent loop

    The agent loop, its cost and its controls.

  • Workflow

    Compared with the other three words in the first lesson.

  • State machine

    State machines and transition tables.

  • Durable execution

    Durable execution and replay.

Two lanes with five steps each. In the agent loop lane a crash at step four sends the run back to step one. In the durable workflow lane a checkpoint follows each step, so the run resumes at step four.

How agents work: the AI agents course →

Chapter 2

Design the workflow as a graph and as state

Before anything runs, the workflow is a graph. Chapter 2 covers nodes, edges and cycles, the critical path, state and reducers, conditional edges and the checks to run before the first run.

Example graphGraph check: No cycle: every step ends somewhere.

Critical pathFetch invoiceCheck amountRe-checkDecideApprovePay

  • Nodes, edges and cycles

    The parts of a workflow graph.

  • Critical path

    Finding the critical path in the graph.

  • State and reducers

    How state is kept and combined with reducers.

  • Conditional edges

    Edges that depend on the state.

  • Graph checks before running

    Checks you run on the graph first.

A graph of seven example steps. The longest branch from the first step to the last is lit, and a cycle check reports that no step can reach itself.

Try it: crash and resume

Crash a run and count what ran twice

Chapters 3 and 4 cover checkpoints, persistence, retries, timeouts and idempotency. This example approval workflow lets you break a run and see why each one matters.

One crash, two settings

Example, not a real engine

The crash hits while this step runs
  1. 1 Fetch invoice
  2. 2 Draft decision
  3. 3 Ask for approval
  4. 4 Pay supplier
  5. 5 Write report
  • First run
    1. 1done
    2. 2done
    3. 3done
    4. 4crashed
    5. 5not reached
  • After the crash
    1. 1done
    2. 2done
    3. 3done
    4. 4done
    5. 5done

Resumes at: 1. Fetch invoiceSteps run in total: 9 (the workflow has 5). Times the person was asked: 2. Payments made: 2.The supplier is paid twice.The person has to approve again.

The rule, in words

  1. 1. The crash hits while a step runs, after its work happened and before its checkpoint was saved.
  2. 2. With checkpoints, the run resumes at the crashed step. Without them, it starts again at the first step.
  3. 3. Every run of the approval step asks the person. Every run of the pay step makes a payment.
  4. 4. An idempotency key makes a second payment call return the first result, so the supplier is paid once.
  • Checkpoints

    Save the state after each step so a run can resume.

  • Retries and timeouts

    Decide which errors to retry and how long to wait.

  • Idempotency keys

    Make a repeated call safe, so a retry does not repeat its side effect.

Two rows of five steps: the first run up to the crash and the second run after it resumes. Three controls change the outcome: where the crash hits, checkpoints and an idempotency key.

Chapters 5 and 6

Wait for a person, and run work over time

Chapter 5 treats an approval as a state of the workflow, with reminders, escalation and expiry. Chapter 6 covers cron expressions, missed runs, timers and overlap policies.

WaitingRemindedEscalatedApprovedRejectedExpiredDecision record
  1. Approval as a state

    The run pauses and holds its state until a person decides.

  2. Reminders, escalation, expiry

    Reminders, escalation and expiry for a waiting run.

  3. Approving the right thing

    Approving the right thing.

  4. Thresholds and four eyes

    Thresholds and four eyes.

  5. The decision record

    The decision record.

A state diagram: a run waits for approval, may be reminded and escalated, and ends as approved, rejected or expired. Each end state has a decision record.

Chapters 7 to 9

Fan out, watch the runs, then build the capstone

Chapter 7 covers parallel steps, limits and partial failure. Chapter 8 treats runs as traces, with metrics, stuck runs, logs and alerts. The capstone is an approval workflow that survives crashes.

Example trace
  1. 1. Specify the workflow

    The first capstone lesson: specify the workflow.

  2. 2. State and step log

    The second capstone lesson.

  3. 3. Crash and resume

    The third capstone lesson.

  4. 4. Idempotent payment

    The fourth capstone lesson.

  5. 5. Run report

    The last capstone lesson.

× Crash and resume

A run trace with one row per capstone lesson: specify the workflow, state and step log, crash and resume, idempotent payment and run report. The bars are an example, not measurements.

Next in the agents family: Agent Memory & Long-Term Knowledge Systems →Several agents at once: Multi-Agent Systems Engineering →

Questions about the agent orchestration course

  • What is agent orchestration?

    In this course it means building a multi-step agent workflow with state, approvals and recovery from failure.

  • Who is the agent orchestration course for?

    It is for the people who build AI features: software engineers and technical product people.

  • What is the capstone about?

    The capstone is an approval workflow that survives crashes. Its lessons are Specify the workflow, State and step log, Crash and resume, Idempotent payment and Run report.

  • What is the difference between an agent loop and a durable workflow?

    The first chapter, Agent loop, workflow, state machine, durable execution: the differences, separates them and ends with a lesson on choosing, combining and four checks.

  • Is the crash example a real workflow engine?

    No. It is a small example written for this page, with five invented steps. It shows what checkpoints and an idempotency key change when a run crashes.

  • Do I get a certificate?

    Yes. Each Academy certificate carries a verification code, and for this course it is Mirage's own statement. No state authority recognizes it as a degree.

  • Is there an AI coach?

    Yes. The Academy has an AI coach that asks you to explain what you learned.

  • Does the agent orchestration course exist in German?

    No, the course is in English, and so is this page. The rest of the Academy site works in German and English.