Skip to content

ServiceCollectionAgentFrameworkExtensions

NexusLabs.Foundry.MicrosoftAgentFramework

NexusLabs.Foundry.MicrosoftAgentFramework

ServiceCollectionAgentFrameworkExtensions Class

Registers Foundry's Microsoft Agent Framework runtime with a service collection.

public static class ServiceCollectionAgentFrameworkExtensions

Inheritance System.Object 🡒 ServiceCollectionAgentFrameworkExtensions

Methods

ServiceCollectionAgentFrameworkExtensions.AddFoundryAgentFramework(this IServiceCollection) Method

Registers the Microsoft Agent Framework runtime with default configuration.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddFoundryAgentFramework(this Microsoft.Extensions.DependencyInjection.IServiceCollection services);

Parameters

services Microsoft.Extensions.DependencyInjection.IServiceCollection

The service collection to configure.

Returns

Microsoft.Extensions.DependencyInjection.IServiceCollection
The supplied service collection.

ServiceCollectionAgentFrameworkExtensions.AddFoundryAgentFramework(this IServiceCollection, Func<AgentFrameworkBuilder,AgentFrameworkBuilder>) Method

Registers the Microsoft Agent Framework runtime with explicit builder configuration.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddFoundryAgentFramework(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Func<NexusLabs.Foundry.MicrosoftAgentFramework.AgentFrameworkBuilder,NexusLabs.Foundry.MicrosoftAgentFramework.AgentFrameworkBuilder> configure);

Parameters

services Microsoft.Extensions.DependencyInjection.IServiceCollection

The service collection to configure.

configure System.Func<AgentFrameworkBuilder,AgentFrameworkBuilder>

A function that receives and returns the runtime builder.

Returns

Microsoft.Extensions.DependencyInjection.IServiceCollection
The supplied service collection.

ServiceCollectionAgentFrameworkExtensions.AddFoundryAgentFramework(this IServiceCollection, Func<AgentFrameworkBuilder>) Method

Registers the Microsoft Agent Framework runtime using a caller-created builder.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddFoundryAgentFramework(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Func<NexusLabs.Foundry.MicrosoftAgentFramework.AgentFrameworkBuilder> configure);

Parameters

services Microsoft.Extensions.DependencyInjection.IServiceCollection

The service collection to configure.

configure System.Func<AgentFrameworkBuilder>

A function that creates the configured builder.

Returns

Microsoft.Extensions.DependencyInjection.IServiceCollection
The supplied service collection.