Skip to main content
AI Agents & Automation

⏱ About 15 min15 XP

Design a Workflow

You have spent the last several lessons studying the parts of multi-agent systems: specialist agents, supervisor agents, handoffs, messages, workflows, triggers, and safeguards. Now it is time to put all of those pieces together. This lesson is a design studio — your job is to think like an AI systems engineer and create a complete automated workflow from scratch.

What a Complete Workflow Design Includes

A professional workflow design is more than a list of steps. It answers seven questions: 1. What is the goal? What should the workflow produce, and for whom? 2. What triggers it? Is it event-based, schedule-based, or manually started? 3. What are the sub-tasks? What does the supervisor need to decompose the goal into? 4. Who are the agents? What specialist agents handle each sub-task, and what tools do they need? 5. How do handoffs work? What information does each agent pass to the next, and in what format? 6. What can go wrong? What failure modes exist, and what safeguards prevent or contain them? 7. Where does a human stay in the loop? Which steps, if any, need human review before action is taken? A workflow design that answers all seven questions is ready to be evaluated — and eventually built.

The Seven Design Questions

Every solid workflow design answers: Goal, Trigger, Sub-tasks, Agents, Handoffs, Failure Modes, and Human-in-the-Loop points. If you cannot answer one of these, the design has a gap that will cause problems later.

Design Patterns to Choose From

As you design your workflow, you will make choices about architecture — how the agents are arranged and how work flows between them. Three common patterns are worth knowing. A sequential pipeline is the simplest: Agent A finishes, then Agent B starts, then Agent C. Each agent depends on the previous one. Use this when order matters and each step needs the last one's output. A parallel fan-out runs several agents at the same time, then collects their results. Use this when multiple independent tasks can be done simultaneously and merged at the end. A supervisor loop has the supervisor send work to agents, collect results, evaluate them, and — if the results are not good enough — send the work back for revision. Use this when quality matters more than speed and the first pass may not be acceptable.

Three Architecture Patterns

Sequential pipeline: agents run one after another. Parallel fan-out: independent agents run at the same time and results are merged. Supervisor loop: the supervisor evaluates outputs and sends work back for revision if needed.

Design Your Own Workflow — Full Studio

  1. Choose ONE of the three scenarios below. Then complete all six design steps for your chosen scenario.
  2. SCENARIO A — School News Digest: Every Friday afternoon, automatically produce a two-page school news digest covering sports results, academic achievements, and upcoming events — and email it to all students and parents.
  3. SCENARIO B — Student Study Planner: When a student uploads their exam schedule, automatically generate a personalized two-week study plan that breaks each subject into daily sessions, estimates the time needed, and sends calendar reminders.
  4. SCENARIO C — Community Garden Monitor: When soil moisture sensors drop below a threshold, automatically diagnose whether plants need watering, generate a care report, and notify the student garden team with specific instructions.
  5. STEP 1 — STATE THE GOAL: Write one clear sentence describing exactly what your workflow produces and who receives it.
  6. STEP 2 — SPECIFY THE TRIGGER: Is it event-based, schedule-based, or both? Write the trigger specification in plain language (e.g., 'Every Friday at 3 p.m.' or 'When a file is uploaded to the system').
  7. STEP 3 — DECOMPOSE INTO SUB-TASKS: List every sub-task the supervisor agent must delegate. Aim for at least five specific, non-overlapping sub-tasks.
  8. STEP 4 — DESIGN THE AGENT TEAM: For each sub-task, name the specialist agent, describe its role in one sentence, and list one tool it needs.
  9. STEP 5 — MAP THE HANDOFFS: Draw or describe the flow of information. Which agents pass their output to which other agents? What does each handoff message include?
  10. STEP 6 — SAFEGUARDS AND HUMAN-IN-THE-LOOP: Identify two things that could go wrong in your workflow. For each, describe one safeguard. Also identify at least one step where a human should review the agent's output before the workflow continues.
  11. BONUS: Identify one step that could run in parallel with another to speed up the workflow. Explain why those two steps are independent.

Evaluating Your Design

Once you have completed your design, evaluate it against the seven questions from the start of this lesson. A strong design answers all seven clearly. A design that struggles with one of the questions — perhaps the handoffs are vague, or you have not thought about failure modes — reveals where more thinking is needed before the system would be ready to build. Good system designers expect to revise their designs multiple times before being satisfied. The first version is rarely the best version. Look for gaps, overlaps, missing safeguards, and steps where a vague instruction would cause an agent to produce unpredictable output.

Design is Iterative

Professional systems engineers revise their designs many times before building. Expect to find gaps on your first pass — that is the point of the design phase. Catching a flaw in a diagram costs nothing; catching it after the system is built can cost everything.

A student designs a workflow but cannot describe what information each agent passes to the next. Which of the seven design questions has not been answered?

You are designing a workflow that must research five different topics and combine them into one report. Which architecture pattern should the research phase use?