The workflow samples demonstrate the fundamental concepts and functionality of workflows in Agent Framework.
Please begin with the Start Here samples in order. These three samples introduce the core concepts of executors, edges, agents in workflows, streaming, and workflow construction.
The folder name starts with an underscore (
_StartHere) to ensure it appears first in the explorer view.
| Sample | Concepts |
|---|---|
| Streaming | Extends workflows with event streaming |
| Agents | Use agents in workflows |
| Agentic Workflow Patterns | Demonstrates common agentic workflow patterns |
| Multi-Service Workflows | Shows using multiple AI services in the same workflow |
| Sub-Workflows | Demonstrates composing workflows hierarchically by embedding workflows as executors |
| Mixed Workflow with Agents and Executors | Shows how to mix agents and executors with adapter pattern for type conversion and protocol handling |
| Writer-Critic Workflow | Demonstrates iterative refinement with quality gates, max iteration safety, multiple message handlers, and conditional routing for feedback loops |
Once completed, please proceed to the other samples listed below.
| Sample | Concepts |
|---|---|
| Foundry Agents in Workflows | Demonstrates using Microsoft Foundry agents in a workflow through ChatClientAgent |
| Custom Agent Executors | Shows how to create a custom agent executor for more complex scenarios |
| Workflow as an Agent | Illustrates how to encapsulate a workflow as an agent |
| Group Chat with Tool Approval | Shows multi-agent group chat with tool approval requests and human-in-the-loop interaction |
| Sample | Concepts |
|---|---|
| Fan-Out and Fan-In | Introduces parallel processing with fan-out and fan-in patterns |
| Sample | Concepts |
|---|---|
| Looping | Shows how to create a loop within a workflow |
| Sample | Concepts |
|---|---|
| Shared States | Demonstrates shared states between executors for data sharing and coordination |
| Sample | Concepts |
|---|---|
| Edge Conditions | Introduces conditional edges for dynamic routing based on executor outputs |
| Switch-Case Routing | Extends conditional edges with switch-case routing for multiple paths |
| Multi-Selection Routing | Demonstrates multi-selection routing where one executor can trigger multiple downstream executors |
| Sample | Concepts |
|---|---|
| Handoff Orchestration | Introduces the Handoff Orchestration pattern |
| Magentic Orchestration | Coordinates multiple agents with a Magentic manager, streamed plan events, and a final transcript |