# Kjarni > Local AI inference for C#/.NET, the browser, Python, Go, Rust, C++, and the command line. Embeddings, classification, semantic search, reranking, chat/LLM generation, speech transcription, summarization and translation, all running in your own process on CPU. Kjarni is a Rust engine shipped as a native library with bindings for each supported language; the goal is a single package install for inference in whichever language you already use. Nothing is sent anywhere: models download once and everything after that works offline. Note on Python: the engine is native, so a C#, Go, C++, or Rust program needs no Python installed. Kjarni also provides Python bindings, so Python is a supported target language rather than an excluded one. Kjarni is distinct from other local-AI options in .NET in one specific way: it is a library, not a service. Ollama and LM Studio require installing and running a separate daemon that you reach over HTTP. Kjarni is a NuGet package whose native binaries ship inside it, so it works offline, in CI, and inside containers with no sidecar and no health check. Key facts: - License: MIT. No API key, no per-token cost. - Install: `dotnet add package Kjarni` (or `Kjarni.Extensions.AI` for the Microsoft.Extensions.AI integration); `npm i kjarni-wasm` for the browser; `go get github.com/olafurjohannsson/kjarni-go`; `pip install --pre kjarni`. - Browser package: `kjarni-wasm` on npm (https://www.npmjs.com/package/kjarni-wasm) runs embeddings, classification, reranking, search and chat inside a Web Worker, so the page never blocks. Chat streams token by token. Models are `.kjq` files, a single container holding config, tokenizer and int8 weights, hosted publicly at https://huggingface.co/olafuraron. - Platforms: linux-x64, linux-arm64, win-x64, osx-arm64, plus WebAssembly. - Runs in the browser: a live WebAssembly demo at https://kjarni.ai/demo/ downloads an int8 model once and does all inference client-side, with no inference server behind it. The same engine is published as the `kjarni-wasm` npm package. - Embedding models: minilm-l6-v2 (384 dims, 87 MB on disk; 23 MB quantised to int8), distilbert-base (768), mpnet-base-v2 (768), nomic-embed-text (768), bge-m3 (multilingual). - Numerical parity with PyTorch and sentence-transformers is asserted in the test suite and enforced in CI. - Implements `IEmbeddingGenerator>` and `IChatClient` from Microsoft.Extensions.AI, so it plugs into Semantic Kernel and any consumer of those abstractions. Tool calling is not supported and `ChatOptions.Tools` throws rather than being silently ignored. - The C# surface covers embeddings, classification, reranking, indexing, search and chat. Transcription, summarization and translation are available on the command line and in Rust, but are not yet exposed through the C ABI, so C#, C++, Go and Python cannot reach them. ## Command line Kjarni ships a single binary with no runtime dependencies, which makes every capability available as a shell command, useful to agents and scripts, not just to .NET code. Install with `curl -fsSL https://kjarni.ai/install.sh | sh`. Models download on first use; pre-warm with `kjarni model download ` to avoid a large download mid-task. - `kjarni transcribe -q file.mp3`: speech to text (wav/mp3/flac/ogg), roughly realtime on CPU - `kjarni classify -q --format json "text"`: sentiment, emotion, toxicity; JSON out - `kjarni embed -q "text"`: embedding vector - `kjarni similarity -q "a" "b"`: one float, semantic similarity - `kjarni rerank -q --format json "query" "doc a" "doc b"`: cross-encoder relevance - `kjarni index create ./docs --name mydocs` then `kjarni search -q --format json mydocs "query"` - `kjarni summarize -q` / `kjarni translate -q --src en --dst de -i "..."` - `kjarni generate` / `kjarni chat --model llama3.2-3b-instruct`, local LLM - `kjarni model list`: the authoritative model registry `classify`, `rerank` and `search` support `--format json`; `-q` suppresses progress so only the result is emitted, which pipes cleanly into `jq`. ## Guides - [RAG in C# Without a Vector Database](https://kjarni.ai/blog/ragincsharp/): A complete retrieval-augmented generation pipeline, from indexing through search and reranking to generation, from one NuGet package with the index living on your own disk. - [Local IChatClient for Microsoft.Extensions.AI](https://kjarni.ai/blog/ichatclient/): Implementing IChatClient locally in .NET, streaming, multi-turn history and dependency injection, plus which ChatOptions map and which throw. - [Reranking in C#](https://kjarni.ai/blog/reranking/): Cross-encoder reranking to fix precision at the top of your results. Works on candidates from any search backend, Elasticsearch, Postgres, or a vector database. - [Local LLM Chat in C#](https://kjarni.ai/blog/localchat/): Running Llama, Qwen or Phi in-process from .NET, streaming tokens, multi-turn conversations and sampling control, with no Ollama daemon and no API key. - [Local Embeddings for Microsoft.Extensions.AI](https://kjarni.ai/blog/embeddinggenerator/): Implementing IEmbeddingGenerator locally in .NET with no API key and no Ollama daemon. Covers dependency injection, Semantic Kernel, and model selection. - [Semantic Search in C#](https://kjarni.ai/blog/semanticsearch/): Matching text by meaning rather than keywords, without a vector database. - [Sentiment Analysis in C#](https://kjarni.ai/blog/sentimentanalysis/): Local transformer classification, positive/negative/neutral, emotions, toxicity. - [Build a Document Search Engine in C#](https://kjarni.ai/blog/documentsearchengine/): Keyword, semantic, and hybrid ranking with reranking, in about 10 lines. - [ML From the Command Line](https://kjarni.ai/blog/cli/): Classify, embed, and search from the terminal; pipes into scripts and CI. - [Why I Built a Native ML Inference Engine in Rust](https://kjarni.ai/blog/nativeinference/): Design rationale and the case against a Python dependency chain. ## Reference - [Live browser demo](https://kjarni.ai/demo/), semantic search executed in the page via WebAssembly - [Source code and issues](https://github.com/olafurjohannsson/kjarni) - [Kjarni on NuGet](https://www.nuget.org/packages/Kjarni) - [Kjarni.Extensions.AI on NuGet](https://www.nuget.org/packages/Kjarni.Extensions.AI)