Skip to content

Microsoft.Extensions.AI

The canonical .NET AI abstraction. Every later piece in this guide — Agent Framework, RAG, function calling, observability — is built on top of IChatClient and friends. Understand this layer first.

Topics (canonical order)

  •   IChatClient & Pipeline


    The contract, the middleware/pipeline pattern, building a custom delegating client

  •   IEmbeddingGenerator


    The embeddings contract, batching, dimensionality, cross-vendor portability

  •   IImageGenerator


    The image-generation contract, prompts, models, output formats

  •   Function Calling — Auto


    FunctionChoiceBehavior.Auto, declaring functions, why auto function calling supersedes deprecated planners

  •   Telemetry & Caching


    Built-in OpenTelemetryMiddleware, distributed tracing of LLM calls, response caching, redaction

Why this order

Contract first (IChatClient), then siblings (embeddings, images), then the killer capability layered on top (function calling), then cross-cutting middleware (telemetry, caching). Each topic depends on the previous.

Cross-references