Orchestrating Complex Tasks with Microsoft Agent Framework Workflows

Andreas Nigg
Andreas Nigg · Co-Founder, Pondhouse Data
Published Updated 14 min read
Orchestrating Complex Tasks with Microsoft Agent Framework Workflows
On this page

Microsoft Agent Framework Workflows are graph-based, developer-defined processes: a fixed set of steps (executors) connected by edges that run in a predictable order. Use them instead of a conversational ChatAgent when specific steps must always run, approvals must happen at the right points, and you need to trace afterwards what happened. In this guide we build a four-step IT ticket workflow in Python, run it from the console and in the DevUI, and then add conditional edges that route high-priority tickets to an alert.

In our previous article, we built a practical IT Helpdesk agent using the Microsoft Agent Framework. The ChatAgent interacted with users, used tools to check system statuses and managed a conversation's state. It understood user intent and took immediate, reactive steps.

Real-world business processes are rarely that simple, though. What happens when a process spans several days, like a manager's approval for a new software license? How do you handle a task that must pause, wait for a human decision, and then resume without losing context? What about a multi-step data pipeline where each step must succeed before the next one begins, and the whole sequence needs to be auditable?

This is where the conversational ChatAgent reaches its limits. A ChatAgent handles ad-hoc requests dynamically and decides what to do based on its input. A Workflow defines a fixed, graph-based sequence of steps. Workflows are designed for complex, long-running processes where reliability and auditability are requirements.

This post covers the orchestration engine itself: how to build, run and inspect workflows, with linear and conditional paths. Durability and the "human-in-the-loop" pattern, which make enterprise AI a bit more complex but trustworthy, are out of scope here.

Update (November 2026): Several APIs used below changed in 2026. Per Microsoft's Python upgrade guide, ChatAgent is now Agent and set_start_executor() was removed (both in python-1.0.0b260210), so the start node now goes into the constructor as WorkflowBuilder(start_executor=...). AzureOpenAIResponsesClient was removed in python-1.0.0rc6, and since 1.0.0 the core agent-framework packages install without --pre.

ChatAgent vs. Workflow: choosing the right tool

Before writing code, you need to make a basic architectural decision in the Microsoft Agent Framework: when to use a conversational ChatAgent and when to build a structured Workflow. The two are not interchangeable. Each solves a different class of problems.

ChatAgent: the conversationalist

As shown in our previous guide, the ChatAgent is good at open-ended, dynamic interaction. The Large Language Model at its core steers its behavior. You give it instructions, a set of tools and a user prompt, and the agent reasons about the best course of action. Its path isn't predetermined; it emerges from the dialogue.

A ChatAgent fits user-facing conversational interfaces (chatbots, copilots), ad-hoc tasks where the user's intent guides the process, and cases where flexibility and natural language understanding matter more than a rigid, repeatable process.

The driving logic is the LLM's turn-by-turn reasoning: it plans, executes a tool, observes the result and re-plans in a loop. The agent's state lives in the AgentThread, which holds the conversation history. That is ideal for the context of a single, continuous interaction, but it isn't designed for long-term persistence across system restarts without extra engineering. The main strength of a ChatAgent is flexibility: it adapts to unexpected requests and handles complex conversations without a script.

Workflow: the structured orchestrator

A Workflow, by contrast, is a deterministic, graph-based process defined by the developer. If an agent is a smart employee given a goal, a workflow is the documented business process that employee has to follow.

The control flow is explicit: a series of nodes (Executors) connected by edges. An LLM can be used within a node to perform an intelligent task, but it doesn't control the overall direction of the process. In our view, this explicit structure is what enables the framework's best enterprise features.

Workflows fit established business processes (expense approvals, user onboarding), long-running tasks that need to pause and resume (waiting for human input, running a multi-hour data job), and cases where auditability, reliability and a predictable execution path are non-negotiable.

The driving logic is a developer-defined execution graph. The flow moves from one Executor to the next based on predefined connections and conditional logic. Workflows are built for durability: they are designed to be checkpointed, so their state can be serialized and saved to persistent storage (like a database) at any point. That lets them survive restarts and wait indefinitely for external events. The main strength of a Workflow is reliability: the process is predictable, auditable and resilient to interruption.

Embedding agents in workflows

You don't have to choose one or the other. The most sophisticated solutions often combine both patterns: a Workflow orchestrates the high-level process, and one of its nodes is a ChatAgent that handles a specific, agent-like sub-task.

Consider a document processing pipeline:

  1. Workflow Node 1 (Executor): A simple function fetches a new PDF from a SharePoint folder. This step is deterministic and reliable.
  2. Workflow Node 2 (Agent): The PDF is passed to a ChatAgent with the instruction: "You are a legal analyst. Read this document, summarize the key clauses, and extract the names of all involved parties into a JSON object." This step uses the LLM's reasoning for a complex, unstructured task.
  3. Workflow Node 3 (Executor): The structured JSON output from the agent is saved into a database. This is another deterministic, reliable step.

Note: We see many projects where people simply use an agent for exactly this process. Why not slap a PDF reading tool and a database writing tool onto an agent and call it a day? Because LLMs are nondeterministic across hundreds and thousands of executions. The more decisions you leave to the LLM, the higher the risk of failure. And it will fail. A Workflow that orchestrates the overall process makes sure the critical steps (fetching the PDF, saving to the database) always run, while the ChatAgent still handles the complex task of document understanding.

Incoming customer orders are a common candidate for this kind of pipeline. At Meusburger, 96% of orders arriving by email, PDF or Excel go into the system without correction.

This hybrid approach combines the auditable orchestration of a Workflow with the flexible reasoning of an agent for specific, well-contained tasks. We describe more patterns like this in building high-quality AI agent systems.

Here is a simple rule of thumb for making the choice:

Use a ChatAgent when...Use a Workflow when...
The primary interface is a conversation with a user.You are automating a back-end, multi-step business process.
The sequence of steps is unpredictable and LLM-driven.The sequence of steps is known and should be predictable.
The task is relatively short-lived (seconds to minutes).The process could be long-running (hours or days).
You need maximum flexibility to handle diverse inputs.You need maximum reliability, auditability, and control.

Note: As always, treat such tables as guidelines, not hard rules.

Core workflow concepts: executors, edges and context

To build a workflow, you construct an executable directed acyclic graph (DAG). The Microsoft Agent Framework provides a clear set of components for defining the nodes, edges and data flow of this graph. You need to understand them to design modular, maintainable automated processes.

Executors: the nodes of the graph

An Executor is the basic unit of computation in a workflow: a single, self-contained node in the execution graph. Each executor should have a single responsibility: receive an input, perform a specific operation and produce an output. This keeps the workflow modular and testable.

The framework supports two implementation patterns for executors:

  1. Class-based Executors: For components with complex logic, internal state or significant configuration, define a class that inherits from agent_framework.Executor. This object-oriented approach suits non-trivial business logic.
  2. Function-based Executors: For stateless, single-purpose transformations, define an async function and apply the @executor decorator. This lightweight pattern suits simple data mapping, filtering or routing nodes.

Handlers (@handler): the execution entry point

Within a class-based Executor, the @handler decorator marks the async method that the workflow engine invokes. This method is the entry point for the node's logic.

For function-based executors, the function itself is implicitly the handler, so the @executor decorator is enough. @handler explicitly declares the execution logic within a class.

WorkflowBuilder and edges: defining the graph topology

A collection of executors isn't a workflow until its structure is defined. The WorkflowBuilder is the fluent API for defining the graph's topology: the directed edges that dictate the flow of control and data between executors.

The WorkflowBuilder API has declarative methods for constructing the graph:

  • set_start_executor(executor): Specifies the entry point node for the workflow.
  • add_edge(source_executor, destination_executor): Establishes a directed edge. When the source_executor emits a message, the workflow engine routes it as input to the destination_executor.
  • add_edge(source_executor, destination_executor, condition=...): Creates branches in the graph. The condition function receives the message and decides whether the edge is taken, so data is routed based on its content. You need this for business rules and conditional logic.

This approach separates the orchestration logic (the graph structure) from the business logic (the executor implementations), which keeps the system maintainable.

WorkflowContext: the interface to the workflow engine

Executors don't interact with each other directly. They are fully decoupled and communicate through the workflow engine via the WorkflowContext object (ctx), which is passed as an argument to every handler.

WorkflowContext provides two methods for controlling data flow:

  1. ctx.send_message(data): Emits output from the current executor. The engine intercepts this call and routes the data payload to all downstream nodes connected by outgoing edges. This is the standard way to pass data between nodes.
  2. ctx.yield_output(data): Used by terminal nodes to publish a final result for the entire workflow. Any data passed to yield_output is collected and returned to the external client that started the workflow run. A workflow can have multiple terminal nodes and can yield multiple outputs.

Hands-on part 1: building a multi-step IT request workflow

The best way to understand workflows is to build one. We'll create a multi-step workflow that automates the initial processing, enrichment and logging of an IT support request.

The workflow is a four-step pipeline:

  1. Categorize: An LLM analyzes a raw user request and extracts structured details like the problem area and priority.
  2. Enrich: The workflow takes the extracted category and "enriches" the ticket by looking up the responsible IT support team in a predefined knowledge base.
  3. Format: It combines all this information into a clean JSON object, ready for an API.
  4. Create Ticket: Finally, it simulates a call to an external ticketing system API and yields a final confirmation message.

We'll first build and run the workflow from the command line to see the end-to-end process. Then we'll use the framework's built-in Dev Web UI as a visual interface for debugging and interaction.

Prerequisites

Before you begin, make sure your environment has all the necessary components, including those for the web UI.

  1. Install the necessary packages:

    1pip install agent-framework --pre
  2. Configure Azure OpenAI Environment Variables: The workflow uses the AzureOpenAIResponsesClient. Make sure the following are set:

    • AZURE_OPENAI_ENDPOINT
    • AZURE_OPENAI_CHAT_DEPLOYMENT_NAME
    • AZURE_OPENAI_RESPONSES_DEPLOYMENT_NAME
    • AZURE_OPENAI_API_KEY

Step 1: Define the data models and executors

The workflow passes strongly typed data between nodes using Pydantic models. We define four executors, one for each step of the pipeline.

Create a file named executors.py.

1import asyncio
2import time
3from pydantic import BaseModel, Field
4from typing import cast
5from typing_extensions import Never
6
7from agent_framework import Executor, WorkflowContext, executor, handler
8from agent_framework.azure import AzureOpenAIResponsesClient
9
10import os
11
12os.environ["AZURE_OPENAI_ENDPOINT"] = "https://<your-name>.openai.azure.com"
13os.environ["AZURE_OPENAI_CHAT_DEPLOYMENT_NAME"] = "gpt-5"
14os.environ["AZURE_OPENAI_RESPONSES_DEPLOYMENT_NAME"] = "gpt-5"
15os.environ["AZURE_OPENAI_API_KEY"] = "<your-key>"
16
17
18# --- Data Models ---
19class CategorizedTicket(BaseModel):
20 category: str = Field(
21 description="The general category of the IT issue, e.g., 'Hardware', 'Software', 'Network', 'Access Request'."
22 )
23 priority: str = Field(
24 description="The estimated priority, e.g., 'Low', 'Medium', 'High'."
25 )
26 summary: str = Field(description="A one-sentence summary of the user's issue.")
27
28
29class EnrichedTicket(CategorizedTicket):
30 assigned_team: str = Field(description="The IT team responsible for this category.")
31
32
33# --- Executors ---
34
35
36# Executor 1: Categorize the raw request using an LLM.
37class CategorizeRequestExecutor(Executor):
38 def __init__(self, id: str):
39 super().__init__(id=id)
40 self.responses_client = AzureOpenAIResponsesClient()
41
42 @handler
43 async def categorize(
44 self, user_request: str, ctx: WorkflowContext[CategorizedTicket]
45 ):
46 """Takes raw text, extracts details, and sends a CategorizedTicket."""
47 print(f"--- Node Log (Categorize): Analyzing request... ---")
48 prompt = f'Analyze the IT support request and extract details.\nRequest: "{user_request}"'
49 response = await self.responses_client.get_response(
50 prompt, response_format=CategorizedTicket
51 )
52 if response.value:
53 categorized_ticket = cast(CategorizedTicket, response.value)
54 await ctx.send_message(categorized_ticket)
55 else:
56 raise ValueError("No structured response received from LLM")
57
58
59# Executor 2: Enrich the ticket with internal business logic.
60@executor(id="enrich_ticket_executor")
61async def enrich_ticket(
62 ticket: CategorizedTicket, ctx: WorkflowContext[EnrichedTicket]
63):
64 """Receives a ticket, assigns a team, and forwards an EnrichedTicket."""
65 print(
66 f"--- Node Log (Enrich): Assigning team for category '{ticket.category}'... ---"
67 )
68 team_assignments = {
69 "Hardware": "Desktop Support L2",
70 "Software": "Application Support",
71 "Network": "Network Operations",
72 "Access Request": "Identity & Access Management",
73 "Default": "General Helpdesk L1",
74 }
75 assigned_team = team_assignments.get(ticket.category, team_assignments["Default"])
76 enriched_ticket = EnrichedTicket(**ticket.model_dump(), assigned_team=assigned_team)
77 await ctx.send_message(enriched_ticket)
78
79
80# Executor 3: Format the enriched data into a JSON string for an API.
81@executor(id="format_ticket_executor")
82async def format_ticket_as_json(ticket: EnrichedTicket, ctx: WorkflowContext[str]):
83 """
84 Receives an EnrichedTicket and sends a JSON string to the next node.
85 Note: The context type is WorkflowContext[str] because it passes data on,
86 it is no longer a terminal node.
87 """
88 print(f"--- Node Log (Format): Formatting ticket into JSON... ---")
89 json_output = ticket.model_dump_json(indent=2)
90 await ctx.send_message(json_output)
91
92
93# Executor 4: Simulate creating the ticket in an external system.
94@executor(id="create_ticket_executor")
95async def create_ticket_in_system(ticket_json: str, ctx: WorkflowContext[Never, str]):
96 """
97 Receives the ticket JSON, simulates an API call, and yields the final result.
98 This is the new terminal node of our workflow.
99 """
100 print(f"--- Node Log (Create Ticket): Calling ticketing system API... ---")
101 # Simulate API call latency
102 await asyncio.sleep(1)
103 ticket_id = f"IT-{int(time.time())}"
104 print(f"--- Node Log (Create Ticket): Successfully created ticket {ticket_id} ---")
105
106 # Yield the final output for the entire workflow.
107 await ctx.yield_output(
108 f"Successfully created ticket {ticket_id} with details:\n{ticket_json}"
109 )

Step 2: Build and run the workflow from the console

With the four executors defined, we can wire them together and run the workflow directly to test the end-to-end logic.

Create a main.py file with the following content.

1# main.py
2import asyncio
3from agent_framework import WorkflowBuilder
4from executors import (
5 CategorizeRequestExecutor,
6 create_ticket_in_system,
7 enrich_ticket,
8 format_ticket_as_json,
9)
10
11async def run_workflow():
12 # 1. Instantiate the executors.
13 categorize_node = CategorizeRequestExecutor(id="categorize_request_node")
14 enrich_node = enrich_ticket
15 format_node = format_ticket_as_json
16 create_ticket_node = create_ticket_in_system
17
18 # 2. Build the four-step workflow graph.
19 workflow = (
20 WorkflowBuilder()
21 .add_edge(categorize_node, enrich_node)
22 .add_edge(enrich_node, format_node)
23 .add_edge(format_node, create_ticket_node)
24 .set_start_executor(categorize_node)
25 .build()
26 )
27
28 # 3. Define the initial input and run the workflow.
29 user_request = "My VPN client keeps disconnecting every 5 minutes, it's impossible to work."
30 print(f"Starting workflow with input: '{user_request}'\n")
31 events = await workflow.run(user_request)
32
33 # 4. Retrieve and print the final output.
34 final_outputs = events.get_outputs()
35 print("\nWorkflow completed. Final output:")
36 for output in final_outputs:
37 print(output)
38
39 print(f"\nFinal state: {events.get_final_state()}")
40
41if __name__ == "__main__":
42 asyncio.run(run_workflow())

Now run it from your terminal: python main.py. You will see the log output from each of the four nodes in sequence, confirming that the workflow executed correctly.

Expected Console Output:

1Starting workflow with input: 'My VPN client keeps disconnecting every 5 minutes, it's impossible to work.'
2
3--- Node Log (Categorize): Analyzing request... ---
4--- Node Log (Enrich): Assigning team for category 'Network'... ---
5--- Node Log (Format): Formatting ticket into JSON... ---
6--- Node Log (Create Ticket): Calling ticketing system API... ---
7--- Node Log (Create Ticket): Successfully created ticket IT-1732598400 ---
8
9Workflow completed. Final output:
10Successfully created ticket IT-1732598400 with details:
11{
12 "category": "Network",
13 "priority": "High",
14 "summary": "User's VPN client frequently disconnects, disrupting their work.",
15 "assigned_team": "Network Operations"
16}
17
18Final state: WorkflowRunState.IDLE

Step 3: Visualize the workflow with the DevUI

Running from the console is fine for validation, but the framework also ships a very nice tool for development and debugging: the Dev Web UI. It visualizes the execution graph, shows the data flowing between nodes and lets you run the workflow interactively.

Let's adapt main.py to launch this UI.

1. Create the Workflow Object: First, define a reusable workflow object outside of the main execution block.

2. Modify main.py to Serve the UI: Replace the run_workflow function and the main execution block with the code to serve the UI.

1# main.py
2from agent_framework import WorkflowBuilder
3from agent_framework.devui import serve # <-- Import the serve function
4from executors import (
5 CategorizeRequestExecutor,
6 create_ticket_in_system,
7 enrich_ticket,
8 format_ticket_as_json,
9)
10
11# 1. Instantiate executors and build the workflow object.
12# This part is the same as before, but defined at the top level.
13categorize_node = CategorizeRequestExecutor(id="categorize_request_node")
14enrich_node = enrich_ticket
15format_node = format_ticket_as_json
16create_ticket_node = create_ticket_in_system
17
18workflow = (
19 WorkflowBuilder(
20 name="IT Ticket Triage Workflow",
21 description="A four-step workflow to categorize, enrich, format, and create an IT support ticket."
22 )
23 .add_edge(categorize_node, enrich_node)
24 .add_edge(enrich_node, format_node)
25 .add_edge(format_node, create_ticket_node)
26 .set_start_executor(categorize_node)
27 .build()
28)
29
30# 2. Define a main function to launch the DevUI.
31def main():
32 """Launch the IT Ticket Triage workflow in the Dev Web UI."""
33 print("Starting IT Ticket Triage Workflow...")
34 print("Navigate to http://localhost:8091 in your browser.")
35
36 # The `serve` function starts a web server and hosts the UI for the provided entities.
37 serve(entities=[workflow], port=8091, auto_open=True)
38
39if __name__ == "__main__":
40 main()

Now run the updated script: python main.py. A browser window opens at http://localhost:8091.

First, you'll see your workflow in an interactive graph view.

DevUI graph of the four-step IT ticket triage workflow

Click the "Configure & Run" button to enter a sample user request and execute the workflow.

DevUI dialog for entering the workflow input and running it

During execution, you can watch the data flow through each node, inspect inputs and outputs, and verify that each step behaves as expected.

DevUI execution timeline with all four nodes completed and final output

Hands-on part 2: conditional edges for high-priority alerts

Linear workflows are a good starting point, but real business processes often need branching. A critical support request should not follow the same path as a routine one. The Microsoft Agent Framework handles this with conditional edges, which route data based on its content.

Next, we extend the IT triage workflow to handle high-priority tickets differently. If a ticket is classified as "High" priority, the workflow branches and sends it to a separate "Send Alert" notification node (which we simulate). Low and Medium priority tickets follow the standard ticket creation path.

This adds a decision point to the graph, so the automation responds to the urgency of each request.

Step 1: Add an alert executor and condition functions

We need a new executor for sending alerts and functions that define the routing logic. Both go into the existing executors.py file.

1. Add the New SendAlertExecutor

This is a new terminal node for the high-priority branch.

2. Create the Condition Function

A condition function is a simple boolean function that inspects the data flowing through an edge and decides whether that path should be taken.

Update your executors.py file with the following additions:

1# executors.py
2# (Keep all existing code from the previous chapter)
3...
4
5# --- New Executor for High-Priority Path ---
6
7# Executor 5: A terminal node for the high-priority branch to send an alert.
8@executor(id="send_alert_executor")
9async def send_alert(ticket: EnrichedTicket, ctx: WorkflowContext[Never, str]):
10 """
11 Simulates sending a high-priority alert to a monitoring channel (e.g., Slack, PagerDuty).
12 This node also yields a final output for its branch.
13 """
14 print(f"--- Node Log (ALERT): Sending HIGH PRIORITY alert for team '{ticket.assigned_team}'... ---")
15 alert_message = f"HIGH PRIORITY ALERT: Ticket with summary '{ticket.summary}' assigned to {ticket.assigned_team}."
16
17 # In a real app, this would call a Slack or PagerDuty API.
18 await asyncio.sleep(0.5) # Simulate API call
19
20 # Yield a specific output for the alert path.
21 await ctx.yield_output(alert_message)
22
23
24# --- New Condition Functions for Routing ---
25
26def is_high_priority(ticket: EnrichedTicket) -> bool:
27 """Condition function that returns True if the ticket priority is 'High'."""
28 print(f"--- Condition Check: Is priority '{ticket.priority}' high? {ticket.priority.lower() == 'high'} ---")
29 return ticket.priority.lower() == 'high'
30
31def is_normal_priority(ticket: EnrichedTicket) -> bool:
32 """Condition function that returns True if the ticket priority is not 'High'."""
33 print(f"--- Condition Check: Is priority '{ticket.priority}' normal? {ticket.priority.lower() != 'high'} ---")
34 return ticket.priority.lower() != 'high'

Step 2: Build the branched workflow

Now we update main.py to construct the new, non-linear graph. We use add_edge with the condition parameter to create two branches after the enrich_node:

  • The enrich_node becomes the decision point.
  • If is_high_priority returns True, the data flows to send_alert_executor.
  • If is_normal_priority returns True, the data flows to the original format_ticket_executor path.

Modify your main.py to reflect this new structure.

1# main.py
2from agent_framework import WorkflowBuilder
3from agent_framework.devui import serve
4from executors import (
5 CategorizeRequestExecutor,
6 create_ticket_in_system,
7 enrich_ticket,
8 format_ticket_as_json,
9 send_alert,
10 is_high_priority,
11 is_normal_priority,
12)
13
14# 1. Instantiate all executors, including the new one.
15categorize_node = CategorizeRequestExecutor(id="categorize_request_node")
16enrich_node = enrich_ticket
17format_node = format_ticket_as_json
18create_ticket_node = create_ticket_in_system
19alert_node = send_alert # New alert node
20
21# 2. Build the workflow with conditional branches.
22workflow = (
23 WorkflowBuilder(
24 name="IT Ticket Triage Workflow with Priority Routing",
25 description="A workflow that routes high-priority tickets to a special alert path."
26 )
27 .add_edge(categorize_node, enrich_node)
28
29 # --- Branching Logic from the enrich_node ---
30 # Path 1: Normal priority tickets go through the standard creation process.
31 .add_edge(enrich_node, format_node, condition=is_normal_priority)
32 .add_edge(format_node, create_ticket_node)
33
34 # Path 2: High priority tickets go directly to the alert node.
35 .add_edge(enrich_node, alert_node, condition=is_high_priority)
36
37 .set_start_executor(categorize_node)
38 .build()
39)
40
41# 3. Serve the workflow using the DevUI (this part remains the same).
42def main():
43 """Launch the branching IT Ticket Triage workflow in the Dev Web UI."""
44 print("Starting IT Ticket Triage Workflow with Priority Routing...")
45 print("Navigate to http://localhost:8091 in your browser.")
46 serve(entities=[workflow], port=8091, auto_open=True)
47
48if __name__ == "__main__":
49 main()

Step 3: Test both branches in the DevUI

Run the updated main.py script. The DevUI now displays the branched graph.

DevUI graph with separate format-and-create and send-alert branches

Test Case 1: Normal Priority

Enter I need to reset my password for the HR portal, I forgot the old one. and click "Run Workflow". The LLM should classify this as "Low" or "Medium" priority. In the DevUI graph, the workflow executes the upper branch, Enrich -> Format -> Create Ticket, and the final output is the standard ticket creation confirmation.

Test Case 2: High Priority

Enter The entire payment processing service is down! We cannot process any customer credit cards! and click "Run Workflow". The LLM will classify this as "High" priority, and the workflow executes the lower branch, Enrich -> Send Alert. The final output in the UI is the high-priority alert message.

With conditional edges, the workflow is no longer a simple pipeline: it changes its behavior based on the data it processes. You'll need this pattern for automations that deal with the variability of real-world requests.

Summary: from pipelines to processes

In this guide, we moved from the conversational ChatAgent to the structured orchestration of Workflows. We started with a linear pipeline that chains four executors to turn unstructured user input into enriched, structured data for a downstream system.

We then added conditional logic. Branching on the data's content (in our case, ticket priority) turned the pipeline into a business process that treats urgent and routine requests differently. Explicit, auditable and conditional execution paths like these are the basis of reliable enterprise automation.

The workflows built so far are still self-contained and run from start to finish in a single run. The most critical enterprise processes often don't work this way. They need to persist state across system restarts, pause for long periods to wait for external events, and, most importantly, incorporate human judgment for critical decisions.

The framework has building blocks for these production requirements too:

  • Durability and State Management: Workflows can use checkpointing to become durable. A workflow can then be paused, its state persisted to a database, and resumed hours or even days later, which protects it against system interruptions.
  • Human-in-the-Loop Integration: An approval step lets the workflow pause and wait for an external signal, such as a manager's decision, before proceeding. This is how you build trustworthy AI systems that combine the speed of automation with human oversight.

The official workflow documentation linked below covers both.

Official resources

  • Official Documentation on Workflows: The definitive source for workflow concepts, advanced patterns and API references.
  • GitHub Repository: Explore the source code, find more examples (including the ones used in this article), and contribute to the project.
  • Introductory Blog Post: Read the original announcement from Microsoft for more context on the vision and strategy behind the framework.

Interested in building high-quality AI agent systems?

We prepared a comprehensive guide based on cutting-edge research for how to build robust, reliable AI agent systems that actually work in production. This guide covers:

  • Understanding the 14 systematic failure modes in multi-agent systems
  • Evidence-based best practices for agent design
  • Structured communication protocols and verification mechanisms

Further reading

Andreas Nigg

About the author

Andreas Nigg

Co-Founder, Pondhouse Data

Andreas has spent more than eight years building data applications. At Pondhouse Data he designs and ships AI systems and integrates them into complex, real-world environments.