Skip to content

AgentFactoryWorkflowExtensions

NexusLabs.Needlr.AgentFramework.Workflows

AgentFactoryWorkflowExtensions Class

Extension methods on NexusLabs.Needlr.AgentFramework.IAgentFactory for building MAF handoff workflow topologies.

public static class AgentFactoryWorkflowExtensions

Inheritance System.Object 🡒 AgentFactoryWorkflowExtensions

Methods

AgentFactoryWorkflowExtensions.BuildHandoffWorkflow(this IAgentFactory, AIAgent, AIAgent[]) Method

Builds a handoff workflow where initialAgent routes to one of the handoffTargets based on LLM-driven tool-call decisions.

public static Microsoft.Agents.AI.Workflows.Workflow BuildHandoffWorkflow(this NexusLabs.Needlr.AgentFramework.IAgentFactory agentFactory, Microsoft.Agents.AI.AIAgent initialAgent, params Microsoft.Agents.AI.AIAgent[] handoffTargets);

Parameters

agentFactory NexusLabs.Needlr.AgentFramework.IAgentFactory

initialAgent Microsoft.Agents.AI.AIAgent

handoffTargets Microsoft.Agents.AI.AIAgent[]

Returns

Microsoft.Agents.AI.Workflows.Workflow

Remarks

This is an ergonomic wrapper over the raw MAF handoff builder, which requires passing initialAgent twice — once to CreateHandoffBuilderWith and again as the from argument in WithHandoffs.