Wirewalk Instituteof AI
dev-206 Intermediate Waitlist

C# and .NET AI Integration

For .NET developers who need to add LLM features to ASP.NET Core and worker services with Microsoft.Extensions.AI, the official vendor SDKs, Microsoft Agent Framework and local ONNX models.

The curriculum is being prepared and reviewed. Enrollment is not open yet.

About this course

The .NET AI stack consolidated considerably during 2025 and 2026. Microsoft.Extensions.AI now provides a common IChatClient and IEmbeddingGenerator abstraction with middleware for caching, telemetry and function invocation; the official OpenAI, Anthropic and Google.GenAI SDKs all plug into it; Microsoft Agent Framework (GA since April 2026) has replaced Semantic Kernel as the recommended agent layer, with Semantic Kernel in maintenance mode; and local inference is available through ONNX Runtime GenAI, Foundry Local, LLamaSharp and Ollama.

This course teaches that stack the way production .NET code uses it. You will register chat clients through dependency injection, compose middleware pipelines, get strongly typed structured output into C# records, stream tokens with IAsyncEnumerable to ASP.NET Core endpoints and Blazor or SignalR clients, and handle concurrency with System.Threading.Channels and resilience with Microsoft.Extensions.Http.Resilience. You will build agents and tools with Microsoft Agent Framework and the ModelContextProtocol C# SDK, use Microsoft.Extensions.VectorData for retrieval, run models in-process, and test and evaluate with xUnit and Microsoft.Extensions.AI.Evaluation. The course closes with configuration, secrets, OpenTelemetry, Aspire orchestration, Native AOT considerations and container deployment. Versions are as of October 2026 (.NET 10 LTS, C# 14, Aspire 13).

What you will be able to do

  • Register and compose IChatClient and IEmbeddingGenerator implementations for OpenAI, Azure OpenAI, Anthropic, Gemini and Ollama through dependency injection
  • Produce strongly typed structured output into C# records and handle schema or deserialization failures
  • Stream responses with IAsyncEnumerable from ASP.NET Core to a client with cancellation and resilience policies applied
  • Build a tool-using agent with Microsoft Agent Framework and expose or consume tools through the ModelContextProtocol C# SDK
  • Run a local model in-process with ONNX Runtime GenAI or LLamaSharp, or via Foundry Local, and justify that choice against a hosted API
  • Test LLM-dependent code with fakes and recorded responses, and add quality evaluations with Microsoft.Extensions.AI.Evaluation
  • Plan a migration from Semantic Kernel to Microsoft Agent Framework and deploy an AI service with telemetry, secrets management and containers

Syllabus

6 modules · 19 lessons · about 14 hours

Module 1: The .NET AI Abstractions and Vendor SDKs

Microsoft.Extensions.AI as the common contract, and the official SDKs behind it.
3 lessons
  1. IChatClient and IEmbeddingGenerator: the Microsoft.Extensions.AI contract
  2. The OpenAI, Anthropic and Google.GenAI SDKs, and reaching Azure OpenAI with the OpenAI client
  3. Middleware pipelines: caching, logging, OpenTelemetry and automatic function invocation

Module 2: Structured Output, Streaming and Concurrency

Typed results and responsive services using idiomatic async C#.
3 lessons
  1. Structured output into C# records: JSON schema generation and validation
  2. Streaming with IAsyncEnumerable to minimal APIs, SignalR and Blazor
  3. Channels, bounded parallelism and Polly-based resilience with Microsoft.Extensions.Http.Resilience

Module 3: Agents, Tools and Retrieval

From single calls to tool-using agents and grounded answers.
4 lessons
  1. Microsoft Agent Framework: agents, tools, workflows and threads
  2. Migrating from Semantic Kernel: what maps across and what changes
  3. Model Context Protocol servers and clients with the ModelContextProtocol C# SDK
  4. Retrieval with Microsoft.Extensions.VectorData connectors

Module 4: Local and On-premises Inference

Running models on your own hardware from .NET.
3 lessons
  1. ONNX Runtime GenAI and Foundry Local: small models on CPU, GPU and NPU
  2. LLamaSharp and OllamaSharp: GGUF models in-process and over HTTP
  3. Choosing local versus hosted: latency, cost, data residency and operations

Module 5: Testing and Evaluation

Keeping AI features correct as models and prompts change.
3 lessons
  1. Unit tests with fake IChatClient implementations and recorded responses
  2. Quality and safety evaluations with Microsoft.Extensions.AI.Evaluation
  3. Integration tests against local models in CI

Module 6: Packaging and Deployment

Production concerns for AI-enabled .NET services.
3 lessons
  1. Configuration, secrets and managed identity for model endpoints
  2. Aspire orchestration and OpenTelemetry for AI calls
  3. Containers, Native AOT trade-offs and cost controls in production

Exam and certificate

The exam unlocks once you have completed every lesson. It draws 20 questions from a larger bank, spread across the modules, with the answer options shuffled for each attempt. You have 40 minutes and need 80% to pass. After a failed attempt you can try again after 24 hours, up to 3 attempts in total. Feedback is given per module, never as the answer key.

Passing earns a certificate of completion and assessment from the Wirewalk Institute of AI with a unique ID that anyone can check at institute.wirewalk.com/verify. It is not an accredited qualification or a vendor certification. How certification works.

The Wirewalk Institute of AI is independent. This course teaches publicly documented products and is not affiliated with or endorsed by Microsoft (.NET, Microsoft.Extensions.AI, Agent Framework, Semantic Kernel, Foundry Local, ONNX Runtime, Aspire), OpenAI, Azure OpenAI, Anthropic, Google (Gemini), Ollama, LLamaSharp, or Model Context Protocol. Product and company names are trademarks of their respective owners.

More in AI in Software Development

All 19 courses in this track
dev-001 Free intro Available

Your First AI API Call: A One-Hour Hands-On Start

A free, one-hour, hands-on start built on one realistic job: sorting a property manager's 1,150 monthly maintenance requests. You get an API key the safe way, make real calls with curl and an official Python SDK, run them over forty work orders, read stop reasons, usage and errors, estimate the monthly cost, and decide whether the script is ready. Exercises run on your own provider account for well under a dollar.

1 h · 7 lessons Free intro
dev-201 Intermediate Available

Python AI Integration: SDKs, Async, Pydantic, Packaging and Testing

A code-first course on integrating LLMs into Python the way production code needs it: uv projects and secrets, the OpenAI, Anthropic and Google GenAI SDKs side by side, async concurrency and streaming, Pydantic structured outputs and tools, retries, local models, embeddings and RAG, FastAPI and pandas integration, testing and evals with pytest, observability, cost tracking and deployment.

15 h · 19 lessons See price at checkout
dev-202 Intermediate Waitlist

Perl and AI: Modernizing Scripts and Text Pipelines with LLM APIs

Call OpenAI, Anthropic, Gemini and local Ollama models from Perl with real CPAN modules, add streaming, concurrency and validated JSON output to text pipelines, and use AI coding assistants to modernize legacy Perl behind characterization tests.

12 h · 18 lessons Join the waitlist