AgentWorkflowBuilder.CreateHandoffBuilderWith(AIAgent) Method
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.
Creates a new HandoffWorkflowBuilder using initialAgent as the starting agent in the workflow.
public static Microsoft.Agents.AI.Workflows.HandoffWorkflowBuilder CreateHandoffBuilderWith(Microsoft.Agents.AI.AIAgent initialAgent);
static member CreateHandoffBuilderWith : Microsoft.Agents.AI.AIAgent -> Microsoft.Agents.AI.Workflows.HandoffWorkflowBuilder
Public Shared Function CreateHandoffBuilderWith (initialAgent As AIAgent) As HandoffWorkflowBuilder
Parameters
- initialAgent
- AIAgent
The agent that will receive inputs provided to the workflow.
Returns
The builder for creating a workflow based on handoffs.
Remarks
Handoffs between agents are achieved by the current agent invoking an AITool provided to an agent via ChatClientAgentOptions's ChatOptions.Tools. The AIAgent must be capable of understanding those AgentRunOptions provided. If the agent ignores the tools or is otherwise unable to advertize them to the underlying provider, handoffs will not occur.