Skip to content

AgentFrameworkGeneratedBootstrap

NexusLabs.Needlr.AgentFramework

NexusLabs.Needlr.AgentFramework

AgentFrameworkGeneratedBootstrap Class

Runtime bootstrap registry for source-generated Agent Framework components.

public static class AgentFrameworkGeneratedBootstrap

Inheritance System.Object 🡒 AgentFrameworkGeneratedBootstrap

Remarks

The source generator emits a [ModuleInitializer] in the host assembly that calls NexusLabs.Needlr.AgentFramework.AgentFrameworkGeneratedBootstrap.Register(System.Func{System.Collections.Generic.IReadOnlyList{System.Type}},System.Func{System.Collections.Generic.IReadOnlyDictionary{System.String,System.Collections.Generic.IReadOnlyList{System.Type}}},System.Func{System.Collections.Generic.IReadOnlyList{System.Type}},System.Func{System.Collections.Generic.IReadOnlyDictionary{System.Type,System.Collections.Generic.IReadOnlyList{System.ValueTuple{System.Type,System.String}}}},System.Func{System.Collections.Generic.IReadOnlyDictionary{System.String,System.Collections.Generic.IReadOnlyList{System.Type}}},System.Func{System.Collections.Generic.IReadOnlyDictionary{System.String,System.Collections.Generic.IReadOnlyList{System.Type}}}) with the generated type providers. UsingAgentFramework() checks this bootstrap and auto-populates function types, groups, and agent types without requiring any explicit Add*FromGenerated() calls.

Methods

AgentFrameworkGeneratedBootstrap.RegisterAIFunctionProvider(IAIFunctionProvider) Method

Registers the generated IAIFunctionProvider for this assembly. Called automatically by the generator-emitted [ModuleInitializer].

public static void RegisterAIFunctionProvider(NexusLabs.Needlr.AgentFramework.IAIFunctionProvider provider);

Parameters

provider IAIFunctionProvider

AgentFrameworkGeneratedBootstrap.TryGetAgentTypes(Func<IReadOnlyList<Type>>) Method

Gets the combined agent type provider from all registered assemblies.

public static bool TryGetAgentTypes(out System.Func<System.Collections.Generic.IReadOnlyList<System.Type>>? provider);

Parameters

provider System.Func<System.Collections.Generic.IReadOnlyList<System.Type>>

Returns

System.Boolean

AgentFrameworkGeneratedBootstrap.TryGetAIFunctionProvider(IAIFunctionProvider) Method

Gets the registered IAIFunctionProvider, if one has been registered.

public static bool TryGetAIFunctionProvider(out NexusLabs.Needlr.AgentFramework.IAIFunctionProvider? provider);

Parameters

provider IAIFunctionProvider

Returns

System.Boolean

AgentFrameworkGeneratedBootstrap.TryGetFunctionTypes(Func<IReadOnlyList<Type>>) Method

Gets the combined function type provider from all registered assemblies.

public static bool TryGetFunctionTypes(out System.Func<System.Collections.Generic.IReadOnlyList<System.Type>>? provider);

Parameters

provider System.Func<System.Collections.Generic.IReadOnlyList<System.Type>>

Returns

System.Boolean

AgentFrameworkGeneratedBootstrap.TryGetGroupChatGroups(Func<IReadOnlyDictionary<string,IReadOnlyList<Type>>>) Method

Gets the combined group chat groups provider from all registered assemblies.

public static bool TryGetGroupChatGroups(out System.Func<System.Collections.Generic.IReadOnlyDictionary<string,System.Collections.Generic.IReadOnlyList<System.Type>>>? provider);

Parameters

provider System.Func<System.Collections.Generic.IReadOnlyDictionary<System.String,System.Collections.Generic.IReadOnlyList<System.Type>>>

Returns

System.Boolean

AgentFrameworkGeneratedBootstrap.TryGetGroupTypes(Func<IReadOnlyDictionary<string,IReadOnlyList<Type>>>) Method

Gets the combined function group provider from all registered assemblies.

public static bool TryGetGroupTypes(out System.Func<System.Collections.Generic.IReadOnlyDictionary<string,System.Collections.Generic.IReadOnlyList<System.Type>>>? provider);

Parameters

provider System.Func<System.Collections.Generic.IReadOnlyDictionary<System.String,System.Collections.Generic.IReadOnlyList<System.Type>>>

Returns

System.Boolean

AgentFrameworkGeneratedBootstrap.TryGetSequentialTopology(Func<IReadOnlyDictionary<string,IReadOnlyList<Type>>>) Method

Gets the combined sequential topology provider from all registered assemblies.

public static bool TryGetSequentialTopology(out System.Func<System.Collections.Generic.IReadOnlyDictionary<string,System.Collections.Generic.IReadOnlyList<System.Type>>>? provider);

Parameters

provider System.Func<System.Collections.Generic.IReadOnlyDictionary<System.String,System.Collections.Generic.IReadOnlyList<System.Type>>>

Returns

System.Boolean