ConcurrentWorkflowBuilder 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 concurrent agent workflows: a fan-out start that broadcasts the incoming messages to every participating agent, a per-agent accumulator that batches each agent's outgoing messages, and a fan-in aggregator that reduces them into a single output list.
public sealed class ConcurrentWorkflowBuilder : Microsoft.Agents.AI.Workflows.OrchestrationBuilderBase<Microsoft.Agents.AI.Workflows.ConcurrentWorkflowBuilder>
type ConcurrentWorkflowBuilder = class
inherit OrchestrationBuilderBase<ConcurrentWorkflowBuilder>
Public NotInheritable Class ConcurrentWorkflowBuilder
Inherits OrchestrationBuilderBase(Of ConcurrentWorkflowBuilder)
- Inheritance
Remarks
When no explicit output designations are made, the default is the Python-aligned shape: the terminal aggregator is the workflow output, and every participating agent (plus its per-agent accumulator) is designated as an intermediate output source. Calling WithOutputFrom(IEnumerable<AIAgent>) or WithIntermediateOutputFrom(IEnumerable<AIAgent>) at all suppresses these defaults.
Constructors
| Name | Description |
|---|---|
| ConcurrentWorkflowBuilder(IEnumerable<AIAgent>) |
Initializes a new ConcurrentWorkflowBuilder with the given participating
|
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 |
|---|---|
| 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 the configured concurrent workflow. |
| WithAggregator(Func<IList<List<ChatMessage>>,List<ChatMessage>>) |
Sets the aggregator function. If not called, defaults to returning the last message from each agent that produced at least one message. |
| WithDescription(String) |
Sets the description for the workflow. (Inherited from OrchestrationBuilderBase<TBuilder>) |
| WithIntermediateOutputFrom(IEnumerable<AIAgent>) |
Designates the given |
| WithName(String) |
Sets the human-readable name for the workflow. (Inherited from OrchestrationBuilderBase<TBuilder>) |
| WithOutputFrom(IEnumerable<AIAgent>) |
Designates the given |