HandoffWorkflowBuilder 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.
Provides a builder for specifying the handoff relationships between agents and building the resulting workflow.
public sealed class HandoffWorkflowBuilder : Microsoft.Agents.AI.Workflows.HandoffWorkflowBuilderCore<Microsoft.Agents.AI.Workflows.HandoffWorkflowBuilder>
type HandoffWorkflowBuilder = class
inherit HandoffWorkflowBuilderCore<HandoffWorkflowBuilder>
Public NotInheritable Class HandoffWorkflowBuilder
Inherits HandoffWorkflowBuilderCore(Of HandoffWorkflowBuilder)
- Inheritance
-
HandoffWorkflowBuilder
Constructors
| Name | Description |
|---|---|
| HandoffWorkflowBuilder(AIAgent) | |
Fields
| Name | Description |
|---|---|
| FunctionPrefix |
The prefix for function calls that trigger handoffs to other agents; the full name is then |
Properties
| Name | Description |
|---|---|
| Description |
Optional workflow description; applied to the inner WorkflowBuilder at |
| HandoffInstructions |
Gets or sets additional instructions to provide to an agent that has handoffs about how and when to perform them. (Inherited from HandoffWorkflowBuilderCore<TBuilder>) |
| 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 a Workflow composed of agents that operate via handoffs, with the next agent to process messages selected by the current agent. (Inherited from HandoffWorkflowBuilderCore<TBuilder>) |
| EmitAgentResponseEvents(Boolean) |
Sets a value indicating whether aggregated agent response events should be emitted during execution. (Inherited from HandoffWorkflowBuilderCore<TBuilder>) |
| EmitAgentResponseUpdateEvents(Boolean) |
Sets a value indicating whether agent streaming update events should be emitted during execution.
If |
| EnableReturnToPrevious() |
Configures the workflow so that subsequent user turns route directly back to the specialist agent that handled the previous turn, rather than always routing through the initial (coordinator) agent. (Inherited from HandoffWorkflowBuilderCore<TBuilder>) |
| WithAutonomousMode(Nullable<Int32>, String, IEnumerable<AIAgent>, IReadOnlyDictionary<AIAgent,Int32>, IReadOnlyDictionary<AIAgent,String>) |
Enables autonomous mode for the handoff workflow. (Inherited from HandoffWorkflowBuilderCore<TBuilder>) |
| WithDescription(String) |
Sets the description for the workflow. (Inherited from OrchestrationBuilderBase<TBuilder>) |
| WithHandoff(AIAgent, AIAgent, String) |
Adds a handoff relationship from a source agent to a target agent with a custom handoff reason. (Inherited from HandoffWorkflowBuilderCore<TBuilder>) |
| WithHandoffInstructions(String) |
Sets instructions to provide to each agent that has handoffs about how and when to perform them. (Inherited from HandoffWorkflowBuilderCore<TBuilder>) |
| WithHandoffs(AIAgent, IEnumerable<AIAgent>) |
Adds handoff relationships from a source agent to one or more target agents. (Inherited from HandoffWorkflowBuilderCore<TBuilder>) |
| WithHandoffs(IEnumerable<AIAgent>, AIAgent, String) |
Adds handoff relationships from one or more sources agent to a target agent. (Inherited from HandoffWorkflowBuilderCore<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 |
| WithTerminationCondition(Func<IReadOnlyList<ChatMessage>,Boolean>) |
Sets a synchronous termination condition for the handoff workflow. (Inherited from HandoffWorkflowBuilderCore<TBuilder>) |
| WithTerminationCondition(Func<IReadOnlyList<ChatMessage>,ValueTask<Boolean>>) |
Sets an asynchronous termination condition for the handoff workflow. (Inherited from HandoffWorkflowBuilderCore<TBuilder>) |
| WithToolCallFilteringBehavior(HandoffToolCallFilteringBehavior) |
Sets the behavior for filtering FunctionCallContent and Tool contents from ChatMessages flowing through the handoff workflow. Defaults to HandoffOnly. (Inherited from HandoffWorkflowBuilderCore<TBuilder>) |