LNS.AI.Hosting 1.0.0-rc.1

This is a prerelease version of LNS.AI.Hosting.
dotnet add package LNS.AI.Hosting --version 1.0.0-rc.1
                    
NuGet\Install-Package LNS.AI.Hosting -Version 1.0.0-rc.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LNS.AI.Hosting" Version="1.0.0-rc.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LNS.AI.Hosting" Version="1.0.0-rc.1" />
                    
Directory.Packages.props
<PackageReference Include="LNS.AI.Hosting" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add LNS.AI.Hosting --version 1.0.0-rc.1
                    
#r "nuget: LNS.AI.Hosting, 1.0.0-rc.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package LNS.AI.Hosting@1.0.0-rc.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=LNS.AI.Hosting&version=1.0.0-rc.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=LNS.AI.Hosting&version=1.0.0-rc.1&prerelease
                    
Install as a Cake Tool

LNS.AI.Hosting

Composition root for LNS.AI applications — the ASP.NET Core Host equivalent for AI execution.

Purpose

Registers framework services, binds configuration, validates startup options, composes the execution pipeline, wires providers, and creates execution scopes without embedding business logic or provider SDK calls.

Responsibilities

  • AddAgents() service registration
  • Fluent UsePipeline(), UseMemory(), UsePlanning(), UseStreaming(), UseStreamingSink<T>(), UseTools(), UseMcp(), UseOpenAI(), UseOpenRouter(), UseAzureAIFoundry()
  • Compile-once ILLMPipeline at startup
  • Provider registry auto-registration for first-party providers
  • AgentsOptions configuration and validation
  • ILLMContextFactory and execution scope lifetime management

Dependencies

  • LNS.AI.Core, LNS.AI.Abstractions
  • LNS.AI.Pipeline, LNS.AI.Protocols, LNS.AI.Providers
  • Feature packages: Memory, Planning, Streaming, Tools, Mcp
  • Provider packages: OpenAI, AzureAIFoundry (for fluent registration only — no SDK refs in Hosting)

Basic Usage

using LNS.AI.Hosting;
using Microsoft.Extensions.DependencyInjection;

var host = new ServiceCollection()
    .AddAgents()
    .UsePipeline()
    .UseOpenAI(options => options.ApiKey = "your-key")
    .AddAgent<MyAgent>()
    .Build();

using (host)
using var scope = host.CreateExecutionScope(new CreateContextOptions
{
    ExecutionId = new ExecutionId("exec-001"),
    CorrelationId = new CorrelationId("corr-001"),
});

await host.Pipeline.InvokeAsync(scope.Context);

See HOSTING_GUIDE.md for the full guide.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on LNS.AI.Hosting:

Package Downloads
LNS.AI.Application

High-level agent application model and bootstrapper for LNS.AI.

LNS.AI.Testing

Testing helpers, fakes, and builders for LNS.AI applications. Not required at runtime.

LNS.AI.AspNetCore

ASP.NET Core integration for LNS.AI — minimal API endpoints over the hosting composition root.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-rc.1 92 7/21/2026
1.0.0-preview.1 76 7/17/2026