LNS.AI.Hosting
1.0.0-rc.1
dotnet add package LNS.AI.Hosting --version 1.0.0-rc.1
NuGet\Install-Package LNS.AI.Hosting -Version 1.0.0-rc.1
<PackageReference Include="LNS.AI.Hosting" Version="1.0.0-rc.1" />
<PackageVersion Include="LNS.AI.Hosting" Version="1.0.0-rc.1" />
<PackageReference Include="LNS.AI.Hosting" />
paket add LNS.AI.Hosting --version 1.0.0-rc.1
#r "nuget: LNS.AI.Hosting, 1.0.0-rc.1"
#:package LNS.AI.Hosting@1.0.0-rc.1
#addin nuget:?package=LNS.AI.Hosting&version=1.0.0-rc.1&prerelease
#tool nuget:?package=LNS.AI.Hosting&version=1.0.0-rc.1&prerelease
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
ILLMPipelineat startup - Provider registry auto-registration for first-party providers
AgentsOptionsconfiguration and validationILLMContextFactoryand execution scope lifetime management
Dependencies
LNS.AI.Core,LNS.AI.AbstractionsLNS.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 | Versions 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. |
-
net10.0
- LNS.AI.Abstractions (>= 1.0.0-rc.1)
- LNS.AI.Agents (>= 1.0.0-rc.1)
- LNS.AI.Anthropic (>= 1.0.0-rc.1)
- LNS.AI.AzureAIFoundry (>= 1.0.0-rc.1)
- LNS.AI.Collaboration (>= 1.0.0-rc.1)
- LNS.AI.Core (>= 1.0.0-rc.1)
- LNS.AI.DeepSeek (>= 1.0.0-rc.1)
- LNS.AI.Gemini (>= 1.0.0-rc.1)
- LNS.AI.Groq (>= 1.0.0-rc.1)
- LNS.AI.Mcp (>= 1.0.0-rc.1)
- LNS.AI.Memory (>= 1.0.0-rc.1)
- LNS.AI.Mistral (>= 1.0.0-rc.1)
- LNS.AI.Models (>= 1.0.0-rc.1)
- LNS.AI.Modules (>= 1.0.0-rc.1)
- LNS.AI.Moonshot (>= 1.0.0-rc.1)
- LNS.AI.Observability (>= 1.0.0-rc.1)
- LNS.AI.Ollama (>= 1.0.0-rc.1)
- LNS.AI.OpenAI (>= 1.0.0-rc.1)
- LNS.AI.OpenRouter (>= 1.0.0-rc.1)
- LNS.AI.Orchestration (>= 1.0.0-rc.1)
- LNS.AI.Pipeline (>= 1.0.0-rc.1)
- LNS.AI.Planning (>= 1.0.0-rc.1)
- LNS.AI.Prompts (>= 1.0.0-rc.1)
- LNS.AI.Protocols (>= 1.0.0-rc.1)
- LNS.AI.Providers (>= 1.0.0-rc.1)
- LNS.AI.Qwen (>= 1.0.0-rc.1)
- LNS.AI.Retrieval (>= 1.0.0-rc.1)
- LNS.AI.Routing (>= 1.0.0-rc.1)
- LNS.AI.Streaming (>= 1.0.0-rc.1)
- LNS.AI.Tools (>= 1.0.0-rc.1)
- LNS.AI.Workflows (>= 1.0.0-rc.1)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.3)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.3)
- Microsoft.Extensions.DependencyInjection (>= 10.0.3)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.3)
- Microsoft.Extensions.Options (>= 10.0.3)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.3)
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 |