Pillar A
Constrained output
Dynamic grammar guarantees JSON, schemas, and tool-call shapes always parse. A novel hybrid path runs roughly twice as fast as classical grammar sampling.
Turn documents into structured data and internal knowledge into cited answers, on an engine that also runs agents, vision, speech, text analysis and generation. One platform, on your hardware. The files, the indexes and the inference never leave your network.
The same document processing, retrieval and inference engine, delivered in the shape your team needs. Start with the server when you want a private AI service. Embed the runtime when the AI has to live inside your own application.
Deploy
A private AI server for document processing, structured extraction, internal knowledge search and agent tools. Familiar APIs, an admin surface, and an MCP endpoint so AI assistants can use your document capabilities without reaching your files. Currently in Business Preview.
See LM-Kit OneEmbed
The local AI runtime for .NET. One NuGet, in-process, no sidecar and no Python service. Agents, RAG, OCR, structured extraction, vision, speech and embeddings on an adaptive inference engine that runs on the hardware you already own.
See LM-Kit.NETDefine the fields you need. LM-Kit reads the document, including scans and photographs, and returns JSON matching your schema, with a confidence figure per field and null where the source does not say. Results are shaped for the system downstream, not for a person to read.
Extract
Invoices, contracts, claims, forms and correspondence. Grammar-constrained decoding means the output parses every time, so a malformed response cannot reach your pipeline.
Structured data extractionRead
Local OCR and vision-language reading for documents that were never digital. Layout, tables and reading order are preserved rather than flattened into a wall of text.
OCR and document readingSort
Scanned batches arrive as one file containing many documents. Classify each one, find the boundaries, and route the pieces before extraction runs.
Classification and splittingPoint LM-Kit at a corpus of policies, manuals, specifications, contracts or support archives. Ask in natural language and get the passage that supports the answer, with the document and the page. When the corpus does not support an answer, that is what it reports.
Retrieve
Exact wording matters for a part number, meaning matters for a policy question. Run either, or both together, and see which strategy produced each result.
RAG and grounded chatCite
Every answer carries its sources: document, page, passage and retrieval score. A reviewer can check the claim against the original in one click.
Document searchStore
Built-in local vector storage with nothing to provision, or bring Qdrant or PostgreSQL with pgvector. Embeddings are computed locally and never leave with a request.
Vector storage optionsDetection is only useful if something happens next. LM-Kit converts, splits, merges, searches, archives and redacts the document itself, and puts a human checkpoint in front of the changes that matter.
Redact
Find personal data across every page, group repeated values, and present each finding with its evidence for a person to keep or remove. Approved regions are deleted from the file, not drawn over. Reopen the output and check.
Smart redactionConvert
PDF, Office, email and images to clean Markdown with structure intact. The step that makes everything downstream, from indexing to extraction, behave predictably.
Document conversionHandle
Inspect, search, render, split, merge, unlock and convert to PDF/A for archival. The operations a document workflow needs constantly and nobody wants to build twice.
PDF toolkitLM-Kit.NET ships seven pillars and the local runtime they all sit on. Use the parts you need, ignore the rest.
01 · AI Agents
ReAct planning, supervisors, parallel and pipeline orchestrators, persistent memory, MCP clients, custom tools.
AI Agents02 · Document Intelligence
PDF text and table extraction, on-device OCR reaching SOTA benchmark scores, structured field extraction with grammar-constrained generation.
Document Intelligence03 · Vision & Multimodal
Image understanding, classification, labeling, multimodal chat, image embeddings, VLM-OCR, background removal. Same conversation surface as LLMs.
Vision & Multimodal04 · RAG & Knowledge
Built-in vector store, Qdrant and pgvector connectors, embeddings, hybrid retrieval, document chunking, source citations.
RAG & Knowledge05 · Text Analysis
Built-in classifiers and an extractor that emits typed C# objects via grammar-constrained sampling. Sentiment, keywords, language detection.
Text Analysis06 · Speech & Audio
A growing local speech-to-text stack: hallucination suppression, Voice Activity Detection, real-time translation, streaming output, 100+ languages.
Speech & Audio07 · Text Generation
Single-turn, multi-turn, and stateless conversation primitives. Translate, correct, rewrite, summarise. Prompt templates, streaming, grammar-constrained outputs.
Text GenerationThe foundation
Every capability above runs on this runtime.
Foundation
The runtime all seven pillars sit on. The LM-Kit.NET NuGet ships the complete inference system: open-weight LLMs, vision-language models, embeddings, on-device speech-to-text, OCR and classifiers, accelerated on CPU, AVX2, CUDA 12/13, Vulkan or Metal. One package, zero cloud calls, predictable latency, full data and technology sovereignty.
Give an AI assistant private document tools, call the server from any language over HTTP, or compile the whole thing into your .NET application. The processing happens in the same place regardless.
Path 01
Expose a curated set of document tools over the Model Context Protocol. The assistant asks for an extraction or a search; LM-Kit does the work locally and returns only the result. You choose which tools are reachable and what they may return.
MCP tools and clientsPath 02
LM-Kit One speaks the API dialects your existing clients already use, so pointing a working integration at a private deployment is usually a base URL change rather than a rewrite.
LM-Kit OnePath 03
No network hop, no serialization boundary, no second runtime to deploy and monitor. Typed C# objects in, typed C# objects out, on the threads your application already owns.
LM-Kit.NETThe reason a small local model can hold its own on extraction, classification and structured generation. Dynamic Sampling is an adaptive inference engine that sits underneath every LM-Kit call, steering each token with structural awareness, contextual signals and grammar-aligned validation. It works on any model as it ships, and it keeps working on one you have fine-tuned yourself.
Pillar A
Dynamic grammar guarantees JSON, schemas, and tool-call shapes always parse. A novel hybrid path runs roughly twice as fast as classical grammar sampling.
Pillar B
Per-token contextual perplexity, semantic memory for codes and identifiers, structural rejection of malformed runs. Hallucinations drop, recoveries happen in place.
Pillar C
No architecture coupling and no per-model adapter required. Drop in a new open-weight release, or your own fine-tune, and the layer keeps working from day one.
Prompting only goes so far. When a task depends on your vocabulary, your document shapes or your house style, the model has to learn them. That is the one thing a hosted provider cannot offer on sensitive material, because training on it means handing it over. LM-Kit trains on your machine, against your corpus, and the weights that come out are yours.
Train
Fine-tune an open-weight model from your own .NET code, with training steps running on the GPU rather than falling back to CPU. No Python toolchain, no notebook, no upload step, and no separate machine to babysit.
LLM fine-tuningAdapt
Train a small adapter instead of a whole model, keep several for different tasks, load them against a shared base, and merge one down when it has earned its place in production.
LoRA integrationCompress
Bring a trained model down to a size the target hardware can actually hold, and choose the precision trade-off yourself rather than accepting whatever a vendor published.
Model quantizationLM-Kit.NET is the answer when the alternatives don't fit. Three honest comparisons, no straw men.
Compare
No per-token bill. No data leaving your network. Latency you can predict. Inference cost equals the cost of compute you already own. Works offline by design.
Local vs Cloud, in depthCompare
No FastAPI sidecar, no HTTP shim, no two-runtime tax. LM-Kit links into your .NET process, picks up the right native acceleration, and stays out of the way. Async/await all the way down.
LM-Kit vs LangChainCompare
Most ship inference only. LM-Kit ships the full runtime: agents, RAG, OCR, structured extraction, speech, vision, classifiers, embeddings, plus the symbolic layer that makes small models behave.
LM-Kit vs LlamaSharpBridges for the .NET AI abstractions, connectors for production vector databases, and a provider-agnostic embedding layer. Keep your orchestration, storage, and models; move inference local where it counts.
Bridge
Every IChatClient, IEmbeddingGenerator, and middleware-aware abstraction you wrote against the official package keeps working with a local model behind it.
Bridge
Use LM-Kit.NET as a Semantic Kernel connector. Plug local chat completion, embeddings, and function-calling into existing SK plans, planners, and skills.
Open the Semantic Kernel bridgeConnectors
Persist RAG embeddings in production stores. Official connectors for Qdrant and PostgreSQL/pgvector implement the same IVectorStore as the built-in memory path.
Embeddings
Bring a managed embedding provider to your RAG pipeline. Amazon Titan and Cohere models on Bedrock plug in through the same IEmbedder contract as local models.
No sidecar service, no special runtime. LM-Kit links into your application, picks up the right native acceleration for the host, and gets out of the way.
One license, both products, no activation key. Nothing checks a license at runtime. Evaluation and development are free at any company size, with no time limit.
$0no key, no expiry
The complete SDK and the complete server, including commercial use and redistribution, for small companies. Evaluation and development stay free at any size.
Customannual, scaled to scope
Required above the thresholds. Scaled to deployment size, never metered by tokens, seats or end users. Carries the assurance a production deployment needs.
Get started