Skip to content

NexusLabs.Needlr.AgentFramework

NexusLabs.Needlr.AgentFramework

NexusLabs.Needlr.AgentFramework Namespace

Classes
AgentFactoryOptions Per-agent configuration options passed to IAgentFactory.CreateAgent(configure).
AgentFrameworkConfigureOptions Factory-level configuration options passed to NexusLabs.Needlr.AgentFramework.AgentFrameworkSyringeExtensions.Configure(NexusLabs.Needlr.AgentFramework.AgentFrameworkSyringe,System.Action{NexusLabs.Needlr.AgentFramework.AgentFrameworkConfigureOptions}) callbacks.
AgentFrameworkGeneratedBootstrap Runtime bootstrap registry for source-generated Agent Framework components.
AgentFrameworkSyringe Fluent builder for configuring the Microsoft Agent Framework with Needlr function discovery.
AgentFrameworkSyringeExtensions Extension methods for AgentFrameworkSyringe providing fluent configuration of the Microsoft Agent Framework integration.
AgentFunctionAttribute Marks a method as an agent function that can be auto-discovered by Needlr and registered as an Microsoft.Extensions.AI.AIFunction tool for Microsoft Agent Framework agents.
AgentFunctionGroupAttribute Assigns a class to a named function group so that it can be wired to agents by group name rather than by explicit type reference.
AgentGroupChatMemberAttribute Declares that a NeedlrAiAgentAttribute-annotated agent participates in a named group chat workflow. Apply this attribute to include the agent in a round-robin group chat created via CreateGroupChatWorkflow(string, int).
AgentHandoffsToAttribute Declares a handoff target for a NeedlrAiAgentAttribute-annotated agent. Apply this attribute one or more times to specify which agents the decorated agent can hand off to when used as the initial agent in a handoff workflow via CreateHandoffWorkflow<TInitialAgent>().
AgentResilienceAttribute Configures per-agent resilience settings that override the global default set by UsingResilience() on AgentFrameworkSyringe.
AgentResponseExtensions Convenience extensions for Microsoft.Agents.AI.AgentResponse.
AgentSequenceMemberAttribute Marks an agent class as a member of a named sequential pipeline, specifying its position. The source generator reads these declarations to emit a strongly-typed Create{PipelineName}SequentialWorkflow() extension method on IWorkflowFactory.
AgentTerminationConditionAttribute Declares a termination condition that is wired into the group chat manager for this agent (Layer 1). The condition is evaluated inside MAF's group chat loop, before the next agent turn starts, giving a clean early exit.
AIAgentBuilderPluginOptions Options passed to Configure(AIAgentBuilderPluginOptions) to allow plugins to participate in agent-builder configuration.
AsyncLocalScopedAttribute Marks an interface for source generation of an System.Threading.AsyncLocal<>-backed implementation. The generator emits an internal sealed class that implements the interface with proper scope nesting and dispose semantics.
NeedlrAiAgentAttribute Marks a class as a declared agent type for Needlr's Agent Framework integration. Apply this attribute to a class to enable compile-time registration via the source generator and CreateAgent<TAgent>() lookup.
ProgressSinksAttribute Declares which IProgressSink types should receive progress events when this agent runs. The source generator discovers this attribute and emits a companion method that returns the sink types for use by orchestrators when creating reporters.
SyringeExtensionsForAgentFramework Extension methods for NexusLabs.Needlr.Injection.ConfiguredSyringe that enable registering Microsoft Agent Framework infrastructure (namely IAgentFactory) as part of the Needlr build pipeline.
TerminationContext Provides context to an IWorkflowTerminationCondition when evaluating whether a workflow should stop after an agent's response.
WorkflowRunTerminationConditionAttribute Declares a termination condition that is evaluated by Needlr's RunAsync execution helpers after each completed agent turn (Layer 2). Unlike AgentTerminationConditionAttribute, this works with all workflow types (group chat, handoff, sequential).
Interfaces
IAgentFactory Factory for creating configured Microsoft.Agents.AI.AIAgent instances with auto-discovered AgentFunctionAttribute tools wired up.
IAgentFrameworkFunctionScanner Discovers types containing methods decorated with AgentFunctionAttribute. The source generator emits GeneratedAgentFunctionScanner at compile time; in reflection mode, a runtime scanner is used instead.
IAIAgentBuilderPlugin Extension point for adding middleware layers to every agent created by IAgentFactory. Implementations are registered via NexusLabs.Needlr.AgentFramework.AgentFrameworkSyringe.Plugins and applied in order during CreateAgent<TAgent>().
IAIFunctionProvider Provides pre-built Microsoft.Extensions.AI.AIFunction instances for agent function types. Implemented by the source generator to eliminate reflection-based function discovery.
IWorkflowFactory Creates MAF Microsoft.Agents.AI.Workflows.Workflow instances from topology declared on agent classes via AgentHandoffsToAttribute, AgentGroupChatMemberAttribute, and AgentSequenceMemberAttribute. Registered in DI by UsingAgentFramework() — inject via constructor or resolve from IServiceProvider.
IWorkflowTerminationCondition Evaluates whether a workflow should terminate early after an agent response.