MagenticWorkflowBuilder Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Fluent builder for creating Magentic One multi-agent orchestration workflows.
Magentic One workflows use an LLM-powered manager to coordinate multiple agents through dynamic task planning, progress tracking, and adaptive replanning.The manager creates plans, selects agents, monitors progress, and determines when to replan or complete.
The builder provides a fluent API for configuring participants, the manager, optional plan review, checkpointing, and event callbacks.
Human-in-the-loop Support: Magentic provides specialized HITL mechanisms via:
RequirePlanSignoff- Review and approve/revise plans before execution- Tool approval via
function_approval_request: Approve individual tool calls on participating agents. Note that tool calls are not supported on the ManagerAgent.
public class MagenticWorkflowBuilder : Microsoft.Agents.AI.Workflows.OrchestrationBuilderBase<Microsoft.Agents.AI.Workflows.MagenticWorkflowBuilder>
type MagenticWorkflowBuilder = class
inherit OrchestrationBuilderBase<MagenticWorkflowBuilder>
Public Class MagenticWorkflowBuilder
Inherits OrchestrationBuilderBase(Of MagenticWorkflowBuilder)
- Inheritance
Constructors
| Name | Description |
|---|---|
| MagenticWorkflowBuilder(AIAgent) |
Fluent builder for creating Magentic One multi-agent orchestration workflows. Magentic One workflows use an LLM-powered manager to coordinate multiple agents through dynamic task planning, progress tracking, and adaptive replanning.The manager creates plans, selects agents, monitors progress, and determines when to replan or complete. The builder provides a fluent API for configuring participants, the manager, optional plan review, checkpointing, and event callbacks. Human-in-the-loop Support: Magentic provides specialized HITL mechanisms via:
|
Properties
| Name | Description |
|---|---|
| Description |
Optional workflow description; applied to the inner WorkflowBuilder at |
| Name |
Optional workflow name; applied to the inner WorkflowBuilder at |
| OutputDesignations |
Memoized output designations. |
Methods
| Name | Description |
|---|---|
| AddParticipants(IEnumerable<AIAgent>) |
Adds the specified |
| ApplyMetadata(WorkflowBuilder) |
Applies the optional Name and Description to |
| ApplyOutputDesignations(WorkflowBuilder, IReadOnlyDictionary<AIAgent,ExecutorBinding>, String, Action) |
Applies the user's memoized output designations to |
| Build() |
Builds and returns a workflow instance. |
| RequirePlanSignoff(Boolean) |
If |
| WithDescription(String) |
Sets the description for the workflow. (Inherited from OrchestrationBuilderBase<TBuilder>) |
| WithIntermediateOutputFrom(IEnumerable<AIAgent>) |
Designates the given |
| WithMaxResets(Nullable<Int32>) |
Set the maximum number ofnumber of resets allowed. |
| WithMaxRounds(Nullable<Int32>) |
Set the maximum number of coordination rounds. |
| WithMaxStalls(Int32) |
Set the maximum number of consecutive rounds without progress before replan (default 3). |
| WithName(String) |
Sets the human-readable name for the workflow. (Inherited from OrchestrationBuilderBase<TBuilder>) |
| WithOutputFrom(IEnumerable<AIAgent>) |
Designates the given |