Microsoft Agent Framework Concept ( Chapter-2) Created: 20 Apr 2026 Updated: 20 Apr 2026

What Are Workflows? From Idea to Goal in Agentic Systems

A workflow is the sequence of steps required to take an idea and turn it into a goal. As objectives grow in complexity, they have to be broken down into manageable steps — that breakdown is the workflow. Workflows pre-date AI by decades; what is new is that the steps inside them can now be performed by AI agents with reasoning, tools, and context, which turns a rigid pipeline into an agentic workflow.

This article walks through the diagram on the slide: simple vs. complex initiatives, the four observations that make real workflows messy, and how agents fit on top. The .NET demo at the bottom simulates a restaurant launching a new menu item — it runs entirely deterministically so the structural concepts are visible without any LLM call.

Workflows Define the Sequence from Idea to Goal

The shortest definition: workflows define the sequence of steps required to achieve an objective. Inputs flow in on one side, work happens, and an output comes out the other. What a workflow gives you that an ad-hoc set of tasks does not is order, ownership, and a finishing condition. The graph structure makes it possible to parallelise where you can, retry where you must, and hand off where different specialists are needed.

Simple vs. Complex Initiatives

Not every objective deserves a five-phase pipeline. The diagram makes this contrast explicit:

  1. Simple update (hours). Idea goes straight to production. Example: today’s daily soup, a CSS tweak, a typo fix. Two or three steps, one owner, no formal phases.
  2. Complex initiative (days–months). Example: a new product launch. The idea has to be decomposed into:
  3. Requirement gathering
  4. Design and architecture
  5. Implementation
  6. Testing
  7. Deployment
  8. Multiple owners, multiple skill sets, and rework loops between phases.

The five-phase shape is not specific to software — it is the same shape behind product launches, kitchen menus, regulatory submissions, and clinical trials. That is why the lesson is general.

Four Observations About Real Workflows

The diagram highlights four properties of real-world workflows that an over-simplified box-and-arrow picture misses.

1. Subtasks

Each phase is itself a small workflow. “Design” is not one action; it is sketching, reviewing, picking suppliers, and writing it up. Treat phases as containers of subtasks, not as atomic steps. This matters when an agent later has to plan inside a phase.

2. Specialization

Different specialists own different phases. A product manager owns requirements; an architect owns design; a QA lead owns testing. The workflow has to route the work to the right owner with the right context. In a multi-agent system this maps directly to specialised agents — one per phase.

3. Non-linear progress

Progress is not always forward. A bug in testing sends you back to implementation. A failed compliance check sends a regulatory submission back to design. The workflow needs back-edges, not just forward arrows. Built-in orchestration patterns (sequential, handoff, group chat) all account for this in different ways.

4. Coordination

The hardest part is rarely doing any single phase — it is orchestrating them: who is waiting on whom, what state is shared, how the next owner is briefed. In an agentic workflow, an orchestrator (a manager agent, a workflow runtime, or both) takes on this role.

Agents + Workflows = Agentic Workflows

Agents do not require workflows — a single agent can accomplish a small objective on its own. But for large objectives, agents supercharge workflows: each phase that used to require a human can now be handled by an agent that reasons about what subtask to do next, uses tools to act on the world, and remembers context from earlier phases.

The result is a workflow whose individual steps are adaptive. A rigid “Design” phase that always produced the same template becomes a Design phase that consults market data, drafts three variants, and picks one based on the brief. The shape of the workflow stays the same; the contents become smarter.

Multi-Agent Systems

When more than one phase is owned by an agent, the workflow becomes a multi-agent system. Microsoft Agent Framework offers five built-in orchestration patterns to coordinate them:

PatternWhen to Use
SequentialEach agent builds on the previous one’s output
ConcurrentIndependent subtasks run in parallel; results aggregated
HandoffControl transfers to a specialist based on context
Group ChatAgents collaborate in a shared conversation
MagenticA manager agent dynamically picks who works next

The Demo: A Restaurant Launching a New Menu Item

The demo simulates three workflows in the same domain so that the contrast is direct. None of them call an LLM — the goal is to make the workflow structure visible, not the AI.

  1. Simple workflow. A daily soup goes from idea to the dining room in three linear steps.
  2. Complex workflow. A signature dish moves through five phases (Requirements → Design → Implementation → Testing → Deployment), each with its own owner and subtasks. The first QA pass fails — the salt is too high — which forces a non-linear loop back to Implementation before QA passes on the second attempt.
  3. Agentic workflow. The same shape, but the Design phase is handed to a tiny ChefAgent that picks the protein, sauce, and plating based on the brief. The agent is rule-based here so the workflow concept stays in focus, but the structural slot it occupies is exactly the same one a real Microsoft Agent Framework agent would fill.

Full Example

The complete source of WhatAreWorkflowsDemo.cs:

namespace MicrosoftAgentFrameworkLesson.ConsoleApp;

// Domain: a restaurant launching a new menu item.
// Purpose: illustrate what a workflow is — a sequence of steps that take an idea
// to a goal — and the four observations from the diagram:
// 1. Subtasks — each step contains smaller steps
// 2. Specialization — different specialists own different phases
// 3. Non-linear — testing can send you back to implementation
// 4. Coordination — planning and communication tie it together
// The demo also contrasts a SIMPLE workflow (daily soup) against a COMPLEX one
// (new signature dish), and finally hints at how an AI agent would supercharge
// a single phase — turning the workflow into an agentic workflow.
public static class WhatAreWorkflowsDemo
{
public static Task RunAsync()
{
Console.WriteLine("╔══════════════════════════════════════════════════════════╗");
Console.WriteLine("║ What Are Workflows? — Restaurant Menu Launch Simulation ║");
Console.WriteLine("╚══════════════════════════════════════════════════════════╝\n");

// ── 1. SIMPLE workflow: idea → production in a few steps ──
Console.WriteLine(">> SIMPLE workflow: today's daily soup\n");
SimpleWorkflow daily = new("Tomato-basil bisque");
daily.Run();

Console.WriteLine(new string('═', 60) + "\n");

// ── 2. COMPLEX workflow: a five-phase initiative with specialists,
// subtasks, and a non-linear loop when QA fails. ──
Console.WriteLine(">> COMPLEX workflow: launching a new signature dish\n");
ComplexWorkflow launch = new("Smoked-paprika lamb tagine");
launch.Run();

Console.WriteLine(new string('═', 60) + "\n");

// ── 3. AGENTIC workflow: same complex pipeline, but one phase is
// handed to an "agent" that reasons about which subtask to do. ──
Console.WriteLine(">> AGENTIC workflow: an agent drives the Design phase\n");
AgenticWorkflow agentic = new("Charred-citrus sea bass");
agentic.Run();

Console.WriteLine("\nWorkflows turn an idea into a goal. Agents inside them turn rigid steps into adaptive ones.");
return Task.CompletedTask;
}
}

// ── SIMPLE: minimal sequence, no branching, no specialists. ──
internal sealed class SimpleWorkflow
{
private readonly string _idea;
public SimpleWorkflow(string idea) => _idea = idea;

public void Run()
{
Console.WriteLine($" Idea : {_idea}");
Console.WriteLine(" Step 1 : Pull ingredients from pantry");
Console.WriteLine(" Step 2 : Cook on stove for 25 minutes");
Console.WriteLine(" Step 3 : Serve to dining room");
Console.WriteLine($" Goal : {_idea} on the menu (≈ 30 minutes)");
}
}

// ── COMPLEX: five phases, each with subtasks, owned by different specialists,
// with a non-linear retry when QA finds a defect. ──
internal sealed class ComplexWorkflow
{
private readonly string _dishName;
private int _qaAttempts;

public ComplexWorkflow(string dishName) => _dishName = dishName;

public void Run()
{
Console.WriteLine($" Idea: {_dishName}\n");

RunPhase("1. Requirements", "Product Manager", new[]
{
"Survey regulars about flavour preferences",
"Pick a $24–$32 price band",
"Confirm dietary tags (gluten-free, halal)"
});

RunPhase("2. Design & Architecture", "Head Chef", new[]
{
"Sketch the plating",
"Pick proteins, spices, and side starches",
"Source two backup suppliers per ingredient"
});

RunPhase("3. Implementation", "Sous Chef", new[]
{
"Cook three test batches",
"Time each batch to ≤ 12 minutes service-window",
"Document the final recipe card"
});

// PHASE 4 demonstrates Non-Linear Progress:
// QA fails the first time, which forces a loop back to Implementation.
bool qaPassed = false;
while (!qaPassed)
{
_qaAttempts++;
Console.WriteLine($" ─── 4. Testing (QA, attempt #{_qaAttempts}) ────────────────");
Console.WriteLine(" Owner: QA Lead");
Console.WriteLine(" • Blind taste panel of 6 regulars");
Console.WriteLine(" • Cross-check allergen labels");
Console.WriteLine(" • Verify food-safety temperatures");

if (_qaAttempts == 1)
{
Console.WriteLine(" ✗ DEFECT: panel reports the sauce is too salty.");
Console.WriteLine(" ↩ Loop back to phase 3 (Implementation)\n");

// Non-linear loop: re-run a slimmer Implementation pass.
RunPhase("3'. Implementation (rework)", "Sous Chef", new[]
{
"Reduce salt by 20% in the reduction",
"Re-run one test batch"
});
}
else
{
Console.WriteLine(" ✓ All checks pass.\n");
qaPassed = true;
}
}

RunPhase("5. Deployment", "Floor Manager", new[]
{
"Print menu inserts and update POS",
"Brief servers on allergens and pairings",
"Schedule launch-night service"
});

Console.WriteLine($" Goal: \"{_dishName}\" launched after {_qaAttempts} QA cycle(s) " +
"across 5 specialists — coordination held it together.");
}

// Each phase prints owner + subtasks, satisfying the "Subtasks",
// "Specialization", and "Coordination" observations from the diagram.
private static void RunPhase(string phaseName, string owner, string[] subtasks)
{
Console.WriteLine($" ─── {phaseName} ──────────────────────────────");
Console.WriteLine($" Owner: {owner}");
foreach (string t in subtasks)
{
Console.WriteLine($" • {t}");
}
Console.WriteLine(" ✓ Phase complete.\n");
}
}

// ── AGENTIC: same shape as a workflow phase, but one step is handed to a
// tiny "agent" that picks a subtask based on the input. The agent has no LLM
// here — it is rule-based — so the structural idea is what matters: a phase
// becomes adaptive when a reasoning component decides what to do inside it. ──
internal sealed class AgenticWorkflow
{
private readonly string _dishName;
public AgenticWorkflow(string dishName) => _dishName = dishName;

public void Run()
{
Console.WriteLine($" Idea: {_dishName}\n");

Console.WriteLine(" ─── 1. Requirements (human) ──────────────────");
Console.WriteLine(" • Brief: 'a light, citrus-forward summer entrée'\n");

// The Design phase is the agentic part.
DesignBrief brief = new(
DishName: _dishName,
Style: "light",
Season: "summer",
FlavourCue: "citrus");

Console.WriteLine(" ─── 2. Design (agent-driven) ─────────────────");
Console.WriteLine(" Owner: ChefAgent (reasoning + tools + context)\n");

ChefAgent agent = new();
agent.DesignDish(brief);

Console.WriteLine("\n ─── 3..5 (handled by the rest of the workflow) ─");
Console.WriteLine(" Implementation, Testing, Deployment proceed as before.\n");

Console.WriteLine($" Goal: \"{_dishName}\" designed by an agent, then executed by humans.");
}
}

// A trivial stand-in for an LLM-powered agent: it inspects the brief and picks
// a plating, a protein, and a sauce. In a real Microsoft Agent Framework demo
// this would be an AIAgent built from a ChatClient with tools; here it is a
// switch expression so the lesson stays focused on the workflow concept.
internal sealed class ChefAgent
{
public void DesignDish(DesignBrief brief)
{
Console.WriteLine($" [Reason] Brief is {brief.Style}/{brief.Season}/{brief.FlavourCue}");

string protein = PickProtein(brief);
string sauce = PickSauce(brief);
string plating = PickPlating(brief);

Console.WriteLine($" [Tool: ProteinPicker] → {protein}");
Console.WriteLine($" [Tool: SaucePicker] → {sauce}");
Console.WriteLine($" [Tool: PlatingPicker] → {plating}");
Console.WriteLine($" [Decision] Final design for \"{brief.DishName}\":");
Console.WriteLine($" {protein} with {sauce}, plated {plating}.");
}

private static string PickProtein(DesignBrief b) => b.Style switch
{
"light" => "wild sea bass fillet",
"rich" => "braised short rib",
_ => "roast chicken thigh"
};

private static string PickSauce(DesignBrief b) => b.FlavourCue switch
{
"citrus" => "charred-lemon beurre blanc",
"smoke" => "smoked-paprika jus",
_ => "herb butter"
};

private static string PickPlating(DesignBrief b) => b.Season switch
{
"summer" => "on a chilled stone slab with shaved fennel",
"winter" => "on a warmed bowl with root-vegetable purée",
_ => "on a flat white plate with seasonal greens"
};
}

internal sealed record DesignBrief(
string DishName,
string Style,
string Season,
string FlavourCue);

Reference

Microsoft Learn — Agents: What are workflows? and Agent Framework Workflows overview .


Share this lesson: