No code rewrites
Code that consumes IChatClient or IChatCompletionService works as-is. Swap the registration; inference now runs on the box.
Most .NET teams already speak one of two AI abstraction surfaces:
Microsoft.Extensions.AI or Semantic Kernel. Existing services accept
IChatClient or register an IChatCompletionService.
The LM-Kit integration packages implement those interfaces on top of
on-device inference. Same kernel, same plugin model, same prompt
files, same middleware. The backend moves local; the rest of the
application keeps working.
Both bridges ship as separate NuGet packages. Pick the one that matches the abstraction your codebase already speaks.
Microsoft
Implements IChatClient and IEmbeddingGenerator<string, Embedding<float>>. Streaming, function calling, function-invocation middleware all work. Drop into any pipeline already built on the abstraction.
Microsoft
Implements IChatCompletionService and a memory store backed by LM-Kit embeddings. Existing kernels, plugins, planners, prompt files, and memory connectors run on-device.
Teams that adopted Microsoft.Extensions.AI or Semantic Kernel built investments in plugins, planners, prompt-function libraries, memory connectors, and middleware. Switching to a local backend should not cost that investment. Bridges keep the surface, swap the backend.
Code that consumes IChatClient or IChatCompletionService works as-is. Swap the registration; inference now runs on the box.
Register multiple chat services. Route per request: local for sensitive data, cloud for bulk traffic. Same abstraction handles both.
Logging, caching, retry, function-invocation middleware written against the abstraction works unchanged. The bridge is just another implementation.
Run end-to-end tests against the abstraction with the LM-Kit implementation. No external API quota, no flaky network in CI.
A NuGet that consumes IChatClient works with LM-Kit out of the box. The library author does not need to know about LM-Kit.
Both abstractions evolve. The bridges track the surface. New methods on IChatClient land as new methods on the bridge.
When the abstraction is not enough for fine control, the native Tools API gives finer control over invocation, permissions, streaming.
The vector store under both bridges' memory paths. Same primitive other LM-Kit RAG paths use.
For full-document workflows beyond text snippets, the native RAG primitives add source attribution and adaptive ingestion.
Once your kernel runs on the bridge, shipping to edge environments is a packaging change.
Working console demos on GitHub, step-by-step how-to guides on the docs site, and the API reference for the classes used on this page.