7 Things You Need to Know About Durable Workflows in the Microsoft Agent Framework
The Microsoft Agent Framework (MAF) is a powerful, open-source, multi-language system for designing, orchestrating, and deploying AI agents. With its recent workflow programming model, you can now build durable, multi-step pipelines that handle everything from simple sequential tasks to complex parallel operations with human oversight. This listicle walks you through the core concepts—from what MAF is to how you can quickly create your first durable workflow—using practical examples and best practices.
1. What Is the Microsoft Agent Framework?
The Microsoft Agent Framework is an open-source, multi-language toolset for constructing, coordinating, and deploying intelligent agents. Since its preview announcement, it has evolved to include a robust workflow programming model that enables developers to compose multiple agents and other units of work into cohesive, multi-step pipelines. The framework handles execution order, data flow between steps, and error propagation automatically. It supports a variety of workflow patterns—including sequential chains, parallel fan-out/fan-in, conditional branching, and human-in-the-loop approvals—making it ideal for enterprise-grade AI solutions. By providing a lightweight, in-process runner out of the box, MAF lets you start quickly in local development and scale up to cloud-hosted scenarios with ease.

2. The Workflow Programming Model: A Bird's-Eye View
At the heart of MAF's durability features lies its workflow programming model. Developers define individual steps called executors and wire them into a directed acyclic graph using a workflow builder. This builder orchestrates the flow, ensuring each step receives the correct input from its predecessor and passes output to the next. The framework also manages state persistence—critical for durable workflows—so that if a step fails or the system restarts, the workflow can resume from the last checkpoint. Common patterns such as retries, timeouts, and compensating actions are natively supported, allowing you to build resilient automation that can handle real-world disruptions.
3. Executors: The Fundamental Building Blocks
An Executor is the smallest unit of work in a MAF workflow. Each executor receives a typed input, processes it, and produces output. You create one by subclassing Executor<TInput, TOutput> and implementing the HandleAsync method. For instance, an OrderLookup executor takes an OrderCancelRequest and returns an Order. Another executor, OrderCancel, might consume that order and mark it as cancelled. A third, SendEmail, could take the cancelled order and send a notification. Because executors are strongly typed and independent, they can be reused, tested in isolation, and combined flexibly to form complex pipelines. This modular design is key to building maintainable and durable workflows.
4. Setting Up Your First Durable Workflow
To get started, create a new .NET console application and add two NuGet packages: Microsoft.Agents.AI and Microsoft.Agents.AI.Workflows. Then define your executors as shown above. Next, use the WorkflowBuilder to chain them together. For example, you might wire OrderLookup to OrderCancel and then to SendEmail. The builder automatically ensures data flows correctly—the output of OrderLookup becomes the input to OrderCancel. Once constructed, you run the workflow using the lightweight in-process runner. This runner executes everything in memory, making it perfect for rapid prototyping and debugging. Later, you can switch to a durable runner that persists state to a database or Azure Storage.
5. Exploring Workflow Patterns: Sequential, Parallel, and Beyond
MAF workflows support a variety of patterns to suit different use cases. For **sequential** steps, you simply link executors one after the other. **Parallel fan-out** lets you process multiple items simultaneously—for example, checking order inventory, customer credit, and fraud detection in parallel. The **fan-in** pattern then aggregates the results. **Conditional branching** allows decisions based on intermediate outputs (e.g., if an order is flagged, route to manual review). **Human-in-the-loop** is built-in, enabling approval steps where the workflow pauses until a human responds. Each pattern contributes to durability because the framework automatically records checkpoints and handles retries, ensuring long-running processes survive failures without losing progress.

6. The Lightweight In-Process Runner
The core workflow package includes a lightweight in-process runner that executes all steps entirely in memory. This runner is ideal for local development, unit testing, and simple scenarios where durability isn't critical. It offers zero overhead and instant feedback, so you can iterate quickly on your workflow logic. However, when you're ready to deploy to production, you can easily swap to a durable runner—such as the one integrated with Azure Functions or a custom backend—that persists workflow state to a durable store. This persistent storage enables features like automatic recovery from crashes, long-running workflows that survive process restarts, and even distributed execution across multiple machines.
7. Next Steps: Adding Durability, Parallel AI Agents, and Cloud Hosting
Once you have a basic workflow running in the in-process runner, the real power of MAF's durability comes into play. You can start by converting to a durable runner that saves state after each step. Then, introduce parallel AI agents—for instance, multiple executors that each interact with different language models or APIs—to speed up processing. Finally, host your durable workflows on Azure Functions using the MAF integration package. This provides serverless scalability, built-in monitoring, and automatic retries. The framework's open-source nature means you can also extend it with custom durability providers (e.g., Redis, SQL Server) or integrate with existing orchestration tools like Durable Functions. The possibilities are vast, and the journey from prototype to production is smooth.
Durable workflows in the Microsoft Agent Framework empower you to build robust, resilient AI agent pipelines that can handle real-world demands. Starting with a solid grasp of executors, the workflow builder, and the in-process runner, you can quickly iterate on your logic before scaling up with persistence and cloud hosting. Whether you're automating order cancellations, processing multi-step approvals, or orchestrating parallel AI tasks, MAF provides the tools you need to succeed. Dive in today and experience the flexibility of open-source, durable workflow orchestration for intelligent agents.