LM-Kit.NET 2026.3.1

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

title: "LM-Kit.NET - Local AI Agent Platform for .NET Developers" description: "Build AI agents, RAG pipelines, document intelligence, and speech-to-text in C# with LM-Kit.NET. Run LLMs 100% locally with zero cloud dependency."

Local AI Agent Platform for .NET Developers

Your AI. Your Data. On Your Device.

LM-Kit.NET is the complete local AI stack for .NET: high-performance inference, multi-agent orchestration, document intelligence, RAG pipelines, and production-ready tooling in a single NuGet package. Everything runs in-process with zero cloud dependency and zero external dependencies, giving you full control over data, latency, and cost from C# or VB.NET.

🔒 100% Local    ⚡ No Signup    🌐 Cross-Platform

<div class="quick-links"> <a href="guides/getting-started/your-first-ai-agent.md">Getting Started</a> <a href="guides/model-catalog/model-catalog.md">Model Catalog</a> <a href="guides/samples-overview.md">Samples</a> <a href="api/LMKit.yml">API Reference</a> </div>


What Do You Want to Build?

<div class="goal-grid"> <a href="guides/getting-started/your-first-ai-agent.md"> <span class="goal-icon">🤖</span> <strong>Build Autonomous AI Agents</strong> <span>Agents that reason, plan, call tools, and search the web</span> </a> <a href="guides/how-to/build-multi-agent-workflow.md"> <span class="goal-icon">🔗</span> <strong>Orchestrate Multi-Agent Systems</strong> <span>Pipeline, parallel, router, and supervisor patterns</span> </a> <a href="guides/samples-overview/chat-with-pdf-demo.md"> <span class="goal-icon">📄</span> <strong>Chat with Your Documents</strong> <span>PDF Q&A, document intelligence, and grounded answers</span> </a> <a href="guides/how-to/build-rag-pipeline.md"> <span class="goal-icon">📚</span> <strong>Build RAG Pipelines</strong> <span>Retrieval-augmented generation over your own data</span> </a> <a href="guides/samples-overview/structured-data-extraction-demo.md"> <span class="goal-icon">🔍</span> <strong>Extract Structured Data</strong> <span>NER, invoices, forms, and schema-driven extraction</span> </a> <a href="guides/how-to/extract-pii-and-redact-data.md"> <span class="goal-icon">🛡️</span> <strong>Detect and Redact PII</strong> <span>Privacy compliance with local PII detection and redaction</span> </a> <a href="guides/samples-overview/multi-turn-chat-demo.md"> <span class="goal-icon">💬</span> <strong>Add Conversational AI</strong> <span>Multi-turn chat with memory, streaming, and context</span> </a> <a href="guides/samples-overview/speech-to-text-demo.md"> <span class="goal-icon">🎤</span> <strong>Transcribe Speech Locally</strong> <span>Whisper-powered speech-to-text with voice activity detection</span> </a> <a href="guides/samples-overview/vlm-ocr-demo.md"> <span class="goal-icon">🖼️</span> <strong>Analyze Images with Vision Models</strong> <span>VLM-powered OCR, visual Q&A, and image understanding</span> </a> <a href="guides/how-to/build-offline-ai-application-for-edge.md"> <span class="goal-icon">📡</span> <strong>Deploy Offline on Any Device</strong> <span>Air-gapped, edge, and fully offline AI applications</span> </a> </div>


Why LM-Kit.NET

Add AI to any .NET app in minutes. Install one NuGet package and start building. No Python runtimes, no containers, no external services, no dependencies to manage. LM-Kit.NET fits into your existing architecture and deployment pipeline.

Built by experts, updated continuously. Our team ships the latest advances in generative AI, symbolic AI, and NLP research directly into the SDK. Check our changelog to see the pace of innovation.

From prompts to production agents. Multi-agent orchestration, resilience policies, and comprehensive observability let you ship reliable AI workflows, not just prototypes.

<div class="benefits-grid"> <div class="benefit-item"> <strong>Complete data sovereignty</strong> <span>Sensitive information stays within your infrastructure</span> </div> <div class="benefit-item"> <strong>Zero network latency</strong> <span>Responses as fast as your hardware allows</span> </div> <div class="benefit-item"> <strong>No per-token costs</strong> <span>Unlimited inference once deployed</span> </div> <div class="benefit-item"> <strong>Offline operation</strong> <span>Works without internet connectivity</span> </div> <div class="benefit-item"> <strong>Regulatory compliance</strong> <span>GDPR, HIPAA, and data residency requirements by design</span> </div> </div>


What You Can Build

Agents and Automation

  • Autonomous AI agents that reason, plan, and execute multi-step tasks using a growing catalog of built-in tools or your custom APIs
  • Multi-agent systems with pipeline, parallel, router, and supervisor orchestration patterns
  • Research assistants that search the web, analyze results, and synthesize findings using ReAct planning
  • Task automation workflows with agent delegation, resilience policies, and comprehensive observability

Document and Knowledge Workflows

  • RAG-powered knowledge assistants over local documents, databases, and enterprise data sources
  • PDF chat and document Q&A with retrieval, reranking, and grounded generation
  • OCR and extraction pipelines for invoices, forms, IDs, emails, and scanned documents
  • Intelligent document splitting that detects logical boundaries in multi-page PDFs using vision models

Multimodal and Compliance

  • Voice-driven assistants with speech-to-text, reasoning, and function calling
  • Compliance-focused text intelligence with PII extraction, NER, classification, and sentiment analysis

Core Capabilities

🤖 AI Agents and Orchestration

Build autonomous AI agents that reason, plan, and execute complex workflows within your applications.

  • Agent Framework - Complete agent infrastructure with Agent, AgentBuilder, AgentExecutor, and AgentRegistry
  • Multi-Agent Orchestration - Coordinate multiple agents with PipelineOrchestrator, ParallelOrchestrator, RouterOrchestrator, and SupervisorOrchestrator
  • Planning Strategies - ReAct, Chain-of-Thought, Tree-of-Thought, Plan-and-Execute, and Reflection
  • Agent-to-Agent Delegation - Delegate tasks to specialized sub-agents with DelegationManager and DelegateTool
  • Agent Templates - Pre-built templates including Chat, Assistant, Code, Research, Analyst, Planner, and more

<br/>

  • Extensive Built-in Tools - A growing catalog of ready-to-use tools across eight categories (Data, Text, Numeric, Security, Utility, Document, IO, Net), each following the 1 tool = 1 feature atomic design
  • MCP Client Support - Connect to Model Context Protocol servers for extended tool access, resources, and prompts
  • Function Calling - Let models dynamically invoke your application's methods with structured parameters

<br/>

  • Resilience Policies - Retry, Circuit Breaker, Timeout, Rate Limit, Bulkhead, and Fallback
  • Streaming Support - Real-time response streaming with buffered, multicast, and delegate handlers
  • Agent Observability - Full tracing and metrics with AgentTracer, AgentMetrics, and JSON export
  • Agent Memory - Persistent memory across conversation sessions with RAG-based recall
  • Reasoning Control - Adjust reasoning depth for models that support extended thinking

📄 Document Intelligence

Process, extract, and transform documents across PDF, DOCX, XLSX, PPTX, EML, MBOX, HTML, and image formats.

  • VLM-Powered OCR - High-accuracy text extraction from images and scanned content using vision language models
  • Structured Extraction - Define extraction targets with JSON schemas, custom elements, and pattern constraints
  • Confidence Scoring and Validation - Per-element confidence scores, entity auto-detection, format validation, and human verification flags
  • Named Entity Recognition (NER) - Extract people, organizations, locations, and custom entity types
  • PII Detection - Identify and classify personal identifiers for privacy compliance

<br/>

  • Document Splitting - Detect logical document boundaries in multi-page files using vision-based analysis
  • PDF Manipulation - Split, merge, search, extract pages, render to image, and unlock password-protected files
  • Format Conversion - Convert between Markdown, HTML, and DOCX
  • Layout-Aware Processing - Detect paragraphs and lines, support region-based workflows

📚 Retrieval-Augmented Generation (RAG)

Ground AI responses in your organization's knowledge with a flexible, extensible RAG framework.

  • Modular RAG Architecture - Use built-in pipelines or implement custom retrieval strategies
  • Built-in Vector Database - Store and search embeddings without external dependencies
  • PDF Chat and Document RAG - Chat and retrieve over documents with dedicated workflows
  • Multimodal RAG - Retrieve relevant content from both text and images
  • Advanced Chunking - Markdown-aware, HTML-aware, semantic, and layout-based chunking strategies
  • Reranking - Improve retrieval precision with semantic reranking
  • External Vector Store Integration - Connect to Qdrant and other vector databases

🔍 Vision, Speech, and Content Analysis

Process visual, audio, and textual content.

  • Vision Language Models (VLM) - Analyze images, extract information, answer questions about visual content
  • Image Embeddings - Generate semantic representations of images for similarity search
  • Speech-to-Text - Transcribe audio with voice activity detection and multi-language support

<br/>

  • Sentiment and Emotion Analysis - Detect emotional tone from text and images
  • Custom Classification - Categorize text and images into your defined classes
  • Language Detection - Identify languages from text, images, or audio
  • Summarization - Condense long content with configurable strategies
  • Keyword Extraction - Identify key terms and phrases

✍️ Text Generation and Transformation

Generate and refine content with precise control.

  • Conversational AI - Build context-aware chatbots with multi-turn memory
  • Constrained Generation - Guide model outputs using JSON schemas, templates, or custom grammar rules
  • Translation - Convert text between languages with confidence scoring
  • Text Enhancement - Improve clarity, fix grammar, adapt tone

🛠️ Model Customization

Tailor models to your specific domain.

  • Fine-Tuning - Train models on your data with LoRA support
  • Dynamic LoRA Loading - Switch adapters at runtime without reloading base models
  • Quantization - Optimize models for your deployment constraints
  • Training Dataset Tools - Prepare and export datasets in standard formats

Supported Models

LM-Kit.NET ships domain-tuned models optimized for real-world tasks and supports a wide range of open models across four modalities:

  • Text - Chat, reasoning, code generation, and tool calling
  • Vision - Image understanding, visual Q&A, and VLM-powered OCR
  • Embeddings - Semantic search and retrieval
  • Speech - Transcription with voice activity detection

New model families are added continuously. Browse the full list in the Model Catalog, or load any compatible model directly from Hugging Face.


Performance and Hardware

Hardware Acceleration

LM-Kit.NET automatically leverages the best available acceleration on any hardware:

  • NVIDIA GPUs - CUDA backends with optimized kernels
  • AMD/Intel GPUs - Vulkan backend for cross-vendor GPU support
  • Apple Silicon - Metal acceleration for M-series chips
  • Multi-GPU - Distribute models across multiple GPUs
  • CPU Fallback - Optimized CPU inference when GPU unavailable

Dual Backend Architecture

Choose the optimal inference engine for your use case:

  • llama.cpp Backend - Broad model compatibility, memory efficiency
  • ONNX Runtime - Optimized inference for supported model formats

Observability

Gain full visibility into AI operations with comprehensive instrumentation:

  • OpenTelemetry Integration - GenAI semantic conventions for distributed tracing and metrics
  • Inference Metrics - Token counts, processing rates, generation speeds, context utilization, perplexity scores, and sampling statistics
  • Event Callbacks - Fine-grained hooks for token sampling, tool invocations, and generation lifecycle

Platform Support

Operating Systems

  • Windows - Windows 7 through Windows 11
  • macOS - macOS 11+ (Intel and Apple Silicon)
  • Linux - glibc 2.27+ (x64 and ARM64)

.NET Frameworks

Compatible from .NET Framework 4.6.2 through the latest .NET releases, with optimized binaries for each version.


Integration

Zero Dependencies

LM-Kit.NET ships as a single NuGet package with absolutely no external dependencies:

dotnet add package LM-Kit.NET

No Python runtime. No containers. No external services. No native libraries to manage separately. Everything runs in-process.

Ecosystem Connections

  • Microsoft Semantic Kernel - Use LM-Kit.NET as a local inference provider for <a href="https://github.com/microsoft/semantic-kernel" target="_blank" rel="noopener">Microsoft Semantic Kernel</a> via the open-source <a href="https://www.nuget.org/packages/LM-Kit.NET.SemanticKernel" target="_blank" rel="noopener">LM-Kit.NET.SemanticKernel</a> bridge package
  • Microsoft.Extensions.AI - Plug LM-Kit.NET into any .NET application that targets the standard <a href="https://learn.microsoft.com/en-us/dotnet/ai/microsoft-extensions-ai" target="_blank" rel="noopener">IChatClient</a> and IEmbeddingGenerator abstractions via the open-source <a href="https://www.nuget.org/packages/LM-Kit.NET.ExtensionsAI" target="_blank" rel="noopener">LM-Kit.NET.ExtensionsAI</a> bridge package
  • Vector Databases - Integrate with Qdrant via open-source connectors
  • MCP Servers - Connect to Model Context Protocol servers for extended tool access

Data Privacy and Security

Running inference locally provides inherent security advantages:

  • No data transmission - Content never leaves your network
  • No third-party access - No external services process your data
  • Audit-friendly - Complete visibility into AI operations
  • Air-gapped deployment - Works in disconnected environments

This architecture simplifies compliance with GDPR, HIPAA, SOC 2, and other regulatory frameworks.


Getting Started

Basic Chat

using LMKit.Model;
using LMKit.TextGeneration;

// Load a model
var model = new LM("path/to/model.gguf");

// Create a conversation
var conversation = new MultiTurnConversation(model);

// Chat
var response = await conversation.SubmitAsync("Explain quantum computing briefly.");
Console.WriteLine(response);

AI Agent with Tools

using LMKit.Model;
using LMKit.Agents;
using LMKit.Agents.Tools.BuiltIn;

// Load a model
var model = new LM("path/to/model.gguf");

// Build an agent with built-in tools
var agent = Agent.CreateBuilder(model)
    .WithSystemPrompt("You are a helpful research assistant.")
    .WithTools(tools =>
    {
        tools.Register(BuiltInTools.WebSearch);
        tools.Register(BuiltInTools.Calculator);
        tools.Register(BuiltInTools.DateTimeNow);
    })
    .WithPlanning(PlanningStrategy.ReAct)
    .Build();

// Execute a task
var result = await agent.ExecuteAsync("What is the current population of Tokyo?");
Console.WriteLine(result.Response);

<div class="quick-links"> <a href="guides/getting-started/your-first-ai-agent.md">Your First Agent</a> <a href="https://github.com/LM-Kit/lm-kit-net-samples" target="_blank" rel="noopener">GitHub Samples</a> <a href="guides/samples-overview.md">All Demos</a> <a href="api/LMKit.yml">API Reference</a> </div>

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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 LM-Kit.NET:

Package Downloads
LM-Kit.NET.Data.Connectors.Qdrant

LM-Kit.NET.Data.Connectors.Qdrant acts as a seamless integration bridge between LM-Kit.NET and Qdrant vector databases.

LM-Kit.NET.SemanticKernel

LM-Kit.NET.SemanticKernel acts as a seamless integration bridge between LM-Kit.NET and Microsoft Semantic Kernel.

LM-Kit.NET.ExtensionsAI

LM-Kit.NET.ExtensionsAI provides Microsoft.Extensions.AI integration for LM-Kit.NET, implementing IChatClient and IEmbeddingGenerator for local LLM inference through the standard .NET AI abstraction layer.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2026.3.1 71 3/3/2026
2026.2.11 134 2/28/2026
2026.2.10 139 2/25/2026
2026.2.9 134 2/22/2026
2026.2.6 130 2/19/2026
2026.2.5 126 2/16/2026
2026.2.4 127 2/12/2026
2026.2.3 186 2/9/2026
2026.2.2 182 2/6/2026
2026.2.1 136 2/2/2026
2026.1.5 148 1/31/2026
2026.1.4 165 1/27/2026
2026.1.3 180 1/17/2026
2026.1.2 234 1/11/2026
2026.1.1 289 1/4/2026
2025.12.4 355 12/13/2025
2025.12.3 134 12/13/2025
2025.12.2 463 12/8/2025
Loading failed