Skip to content

AI 104 · Module 3

Sequential, Parallel & Routing

Should all work run in a fixed order?

Start Section 1
0 / 5 completed
Sync my progressJoin a session to keep progress across devices and share it with your instructor

Info

After you join, your completed lesson numbers are sent to your instructor together with your learner code, so they can see your progress. Use the codes your instructor gave you, and do not enter your name, company secrets or other personal data. Progress is kept with the rest of that session's data.

Learning objectives

  • Describe the shape and best use of the three Workflow Patterns: Sequential, Parallel and Routing
  • Use the Dependencies between steps to decide whether to run in order, at the same time, or by condition
  • Recognize a Loop as a repeated execute, check, revise structure that needs a clear stop condition (a bridge only, not taught in depth)
  • Choose a suitable Workflow Pattern for a scenario and explain why, then add the chosen Pattern to the Agentic AI Workflow Canvas

Fixed order

8 min

Pattern A: Sequential

You have broken the work into steps and marked the Dependencies. The question now is how to arrange those steps. Should all work run in a fixed order? The answer depends on the dependencies. A Workflow Pattern is one of a few common shapes for arranging steps.

Sequential: A → B → C → D
  1. A: collect data
  2. B: analyze
  3. C: write a draft
  4. D: review

Text equivalent: four steps in a line; each step waits for the previous one to finish and uses its output.

Sequential fits when

  • Later steps need the outputs of earlier steps
  • The order itself matters (for example, review must happen before sending)
  • The flow is simple and needs to be easy to trace and check

Watch out for

  • An error in any step affects all later steps, so every step needs a check
  • Independent work forced into a line wastes time
  • The order should come from a Dependency, not from habit
Example (simulated)

Weekly feedback report: collect feedback → classify → write the draft report → a person reviews. Each step needs the result of the one before, so it is Sequential.

Check yourself

Which situation fits Sequential best?

Which situation fits Sequential best?

Key takeaway: Order should come from a Dependency: if a later step needs an earlier output, use Sequential.

Other Workflow Patterns

7 min

Pattern B: Parallel

Some steps do not need each other's results. Lining them up one after another only makes the whole flow slower. They can run at the same time and be combined at the end.

Parallel: run separately, then Combine
  1. A: prepare the shared input (for example, the same brief)
  2. B, C and D at the same time: financial analysis, policy analysis, market analysis
  3. Combine: merge the results into one
  4. Review: a person reviews the combined result

Text equivalent: A prepares the shared input; then three independent analyses B, C and D run at the same time and do not need each other's results; once all three finish, a Combine step merges them into one report, and a person reviews it.

When to use Parallel, and what to watch
ItemDescriptionExample (simulated)
Condition 1The tasks are independent and do not need each other's outputFinancial, policy and market analysis each use different data
Condition 2The results can be combined laterMerged into one overall report
A Combine step is neededOne step must integrate the results and handle contradictionsWhen two analyses conflict, flag it and hand it to a person
Watch outDecide what happens when one branch failsIf one analysis lacks data, flag the gap instead of silently skipping it
Check yourself

A report needs three independent analyses, followed by one synthesis step. What is the best design?

A report needs three independent analyses, followed by one synthesis step. What is the best design?

Key takeaway: Independent work whose results can be merged suits Parallel, and it always needs a Combine step.

8 min

Pattern C: Routing, and a preview of Loop

Sometimes different inputs need different handling. Routing classifies the input first and then sends it down a path according to its category.

Routing: Input → Classify → Route A / B / C
  1. Input: an input arrives
  2. Classify: decide which category it belongs to
  3. Route A, Route B or Route C: follow the flow for that category
  4. Fallback: when the category is unclear or confidence is low, hand it to a person

Text equivalent: the input first passes a classification step, then splits into three paths of which only one is taken; if it cannot be classified, it takes the Fallback path to a person.

Common bases for Routing (simulated examples)
BasisExample paths
Customer issue categoryBilling → billing flow; technical → technical flow; general → general reply
Document typeContract → legal review; invoice → finance check; application form → administrative handling
Risk levelLow risk → handled automatically; high risk → a person approves
Approval pathSmall amount → unit head; large amount → escalate one level up
Optional: Loop (a bridge only; deeper coverage belongs to later courses)
  1. Execute: run once
  2. Check: check the result
  3. Good enough? Yes → Finish
  4. No → Revise, then return to Check

Info

A Loop is a repeated execute, check, revise-if-not-good-enough structure. It needs clear checking criteria and a stop condition, otherwise it can repeat forever. Module 4 introduces the basic Agent Loop; deeper Planning belongs to later courses.
Check yourself

Purchase requests are split by amount: below a threshold they are handled automatically, above it they go to a manager for approval. Which Pattern is this?

Purchase requests are split by amount: below a threshold they are handled automatically, above it they go to a manager for approval. Which Pattern is this?

Key takeaway: Routing chooses a path by condition and keeps a Fallback. A Loop repeats execute, check, revise and needs a stop condition.

Practice and apply

7 min

Practice: Choose the Workflow Pattern

Below are 8 simulated scenarios. Choose Sequential, Parallel, Routing or Loop for each and explain why in one sentence. Some cases can reasonably combine two Patterns; what matters is that you can explain your reasoning. Please do not enter real company secrets, client personal data or any unauthorized sensitive information in this exercise.

8 scenarios (decide for yourself)
CaseScenarioThink about
1Collect data → analyze → write the report → reviewDo later steps need earlier outputs?
2Financial, policy and market analyses are independent and merged into one report at the endDo they need each other's results?
3Support messages are sent to different handling flows by category (billing, technical, general)By what condition is the path chosen?
4A draft is checked against a checklist; if it fails, revise and check again, at most 3 times, then hand it to a person if it still failsWhen should it stop?
5A document is first identified as a contract, invoice or application form, then follows its own review flowClassify first, or execute first?
6Query three different data sources at the same time, then organize the results into one summary tableDo the queries depend on each other?
7Student report: check format → grade → write comments → teacher confirmsDoes the order matter?
8Requests by risk level: low risk is handled automatically, high risk goes to human approval; once approved, create the record and then notify the applicant, in orderWhich Patterns does this scenario use?
  • Sequential: later steps depend on earlier outputs; order matters
  • Parallel: independent work whose results can be merged later
  • Routing: choose a path by condition (category, risk, type)
  • Loop: execute, check, revise until the standard is met or a stop condition is reached
Check yourself

Case 4 uses a Loop to revise a draft repeatedly. Which design is the safest?

Case 4 uses a Loop to revise a draft repeatedly. Which design is the safest?

Key takeaway: Look at Dependencies to choose Sequential or Parallel, at conditions for Routing, and at "needs repeated revision" for Loop; real flows often combine several.

5 min

Apply: put the Workflow Pattern on the Canvas

Done

Look at the steps you broke out in Module 2 and ask: which must run in order, which can run at the same time, where should the flow branch by condition, and where does it need repeated revision?
What to add to the Canvas: Execution Order
QuestionWrite your answer asExample (simulated)
What is the main order?The Sequential steps and their orderS1 → S2 → S3 → S4 → S5
Which steps can run at the same time?The Parallel steps, and where the Combine happensS2 classify and S3 find follow-ups can run separately, combined in S4
Where does it branch by condition?The Routing condition, each path, and the FallbackDifferent follow-up flows by feedback category; unclear category goes to a person
Where does it need repeated revision?The Loop checking criteria and maximum repeats (if any)Revise the draft against a checklist, at most 2 times, then hand to a person if it still fails

Module 2: Task decomposition

  • Break out steps, Inputs and Outputs
  • Mark the Dependencies

Module 3: Workflow Patterns

  • Choose Sequential or Parallel from the Dependencies
  • Add Routing and Loop where needed

Human-AI-Human: a person chooses the shape of the flow and the branch conditions, the AI executes along the flow, and a person reviews and stays responsible for the result. The next module asks: which steps can be fixed in advance, and which need the agent to judge?

Key takeaway: Write the chosen Workflow Pattern and your reason for it into the Execution Order of the Canvas.

What next?