AIKernel.Providers.LocalLlm 0.1.6

dotnet add package AIKernel.Providers.LocalLlm --version 0.1.6
                    
NuGet\Install-Package AIKernel.Providers.LocalLlm -Version 0.1.6
                    
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="AIKernel.Providers.LocalLlm" Version="0.1.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AIKernel.Providers.LocalLlm" Version="0.1.6" />
                    
Directory.Packages.props
<PackageReference Include="AIKernel.Providers.LocalLlm" />
                    
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 AIKernel.Providers.LocalLlm --version 0.1.6
                    
#r "nuget: AIKernel.Providers.LocalLlm, 0.1.6"
                    
#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 AIKernel.Providers.LocalLlm@0.1.6
                    
#: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=AIKernel.Providers.LocalLlm&version=0.1.6
                    
Install as a Cake Addin
#tool nuget:?package=AIKernel.Providers.LocalLlm&version=0.1.6
                    
Install as a Cake Tool

Local LLM Provider

chat.local generates a reply using the CPU inference engine in AIKernel.Kernel 0.1.4. The host supplies a local Bonsai 1.7B Q1_0 GGUF file. The provider opens the weights on the first valid request and reuses the model within that invoker. Use one invoker per registered model and dispose it at host shutdown.

using AIKernel.Dtos.Capabilities;
using AIKernel.Providers.LocalLlm;

using var invoker = new LocalLlmInvoker(new LocalLlmSettings
{
    BonsaiModelPath = "/models/Bonsai-1.7B-Q1_0.gguf",
    CpuThreads = 4,
    ContextTokens = 1024,
    MaxPromptCharacters = 4096,
    MaxNewTokens = 128
});

var request = new CapabilityInvocationRequest(
    "example-1", "local-llm", "chat.local",
    new Dictionary<string, string> { ["prompt"] = "Write a one-sentence greeting." },
    InputHash: null, ReplayLogHash: null, Metadata: new Dictionary<string, string>());

var result = await invoker.InvokeAsync(request);
Console.WriteLine(result.Succeeded ? result.Metadata["text"] : result.ErrorCode);

For a manifest loader using the parameterless constructor, set AIKERNEL_LOCAL_LLM_MODEL_PATH in the host process before constructing the invoker. The model file is supplied by the host. SystemPrompt is host configuration. A request can supply prompt and optionally max_new_tokens within the host-configured cap. The cap is used when the argument is omitted.

The successful result includes text, token counts, finish_reason, cpu_backend, and a SHA-256 digest of the UTF-8 reply in OutputHash. Treat the text and digest as response data when deciding what to log. Missing models, unreadable or unsupported model files, invalid arguments, and empty replies return explicit failures. Cancellation raises OperationCanceledException.

For local embeddings, register an embedding model with AIKernel.Providers.Embedding and call its IEmbeddingRequestProvider contract. Requests for embedding.local to this invoker return provider.model_not_registered.

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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.6 85 11/24/2026
0.1.5 92 11/23/2026
0.1.4 106 11/22/2026
0.1.3 146 11/9/2026 0.1.3 is deprecated because it is no longer maintained.
0.1.2 246 6/16/2026 0.1.2 is deprecated because it is no longer maintained.
0.1.1 166 6/10/2026 0.1.1 is deprecated because it is no longer maintained.

Connects chat.local to the AIKernel Kernel CPU engine for host-registered Bonsai GGUF weights.