HandoffWorkflowBuilderCore<TBuilder> 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 class HandoffWorkflowBuilderCore<TBuilder> : Microsoft.Agents.AI.Workflows.OrchestrationBuilderBase<TBuilder> where TBuilder : HandoffWorkflowBuilderCore<TBuilder>
type HandoffWorkflowBuilderCore<'Builder (requires 'Builder :> HandoffWorkflowBuilderCore<'Builder>)> = class
inherit OrchestrationBuilderBase<'Builder (requires 'Builder :> HandoffWorkflowBuilderCore<'Builder>)>
Public Class HandoffWorkflowBuilderCore(Of TBuilder)
Inherits OrchestrationBuilderBase(Of TBuilder)
Type Parameters
- TBuilder
- Inheritance
- Derived
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. |
| 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. |
| EmitAgentResponseEvents(Boolean) |
Sets a value indicating whether aggregated agent response events should be emitted during execution. |
| 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. |
| WithAutonomousMode(Nullable<Int32>, String, IEnumerable<AIAgent>, IReadOnlyDictionary<AIAgent,Int32>, IReadOnlyDictionary<AIAgent,String>) |
Enables autonomous mode for the handoff workflow. |
| 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. |
| WithHandoffInstructions(String) |
Sets instructions to provide to each agent that has handoffs about how and when to perform them. |
| WithHandoffs(AIAgent, IEnumerable<AIAgent>) |
Adds handoff relationships from a source agent to one or more target agents. |
| WithHandoffs(IEnumerable<AIAgent>, AIAgent, String) |
Adds handoff relationships from one or more sources agent to a target agent. |
| 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. |
| WithTerminationCondition(Func<IReadOnlyList<ChatMessage>,ValueTask<Boolean>>) |
Sets an asynchronous termination condition for the handoff workflow. |
| WithToolCallFilteringBehavior(HandoffToolCallFilteringBehavior) |
Sets the behavior for filtering FunctionCallContent and Tool contents from ChatMessages flowing through the handoff workflow. Defaults to HandoffOnly. |