Module
Module 2 of 7Lesson 2 of 2~17 min

Choose the right workflow pattern

Lesson 2 of the module "Agent, workflow or a single call?" in the course "Design reliable agents and tool calling".

Lesson objective

By the end of this lesson, you will be able to recognise the five workflow patterns (chaining, routing, parallelization, orchestrator-workers, evaluator-optimizer), match each one to a product need and estimate its cost.

Where it fits

Agent, workflow or a single call?

Does my use case justify an agent, and if not, which simpler pattern should I choose?

Lessons in this module

  1. Decide when an agent is worth its cost
  2. Choose the right workflow pattern (this lesson)

What you will learn in the course

This lesson is part of the course Design reliable agents and tool calling

  • Decide, with explicit criteria, whether a use case calls for a single call, a workflow or an agent, and choose the right pattern.
  • Write tool cards the model uses well (name, description, parameters, return, errors, idempotency, risk level).
  • Specify an agent's loop (goal, context, stop conditions, budgets, error handling) and judge whether an orchestrator and subagents are warranted.
  • Place human approval points and an agent's permissions according to the blast radius of each action.
  • Identify prompt-injection paths through tool outputs and specify structural mitigations that do not rely on the prompt alone.
  • Specify the trace of a run and the evaluation of an agent (task success, trajectory, cost, latency, consistency over several trials).