Category · Agents and orchestration
What is a workflow?
A workflow is a sequence of steps written in advance in the code. The model fills in each step, but it does not choose the next one. That is what makes it testable and predictable.
By Laurent Poupet, Claude trainer and artificial intelligence architect · Updated
How it works
- The classic patterns are chaining, where each step feeds the next, routing to a branch depending on the request, and parallelising independent tasks.
- A workflow can contain calls to the model, but also pure code steps, such as a format check or a calculation, which are more reliable and cheaper.
- To last, a workflow must save its state between steps, so it can resume after a failure or wait for human approval without losing everything.
The trap to avoid
The trap is turning a workflow into an agent to look more modern; you lose predictability and gain nothing if the path is known in advance.
Related terms
- LangGraphAgents and orchestration
- TransformerModels and how they work
- Human approval (human in the loop)Security and compliance
Where this is taught
This idea comes up throughout the lessons; we work on it with your own examples during a lesson.
Lesson content (step-by-step instructions, exercises with solutions, quizzes) is for students only, with an access code received after the first lesson.