# DotNetStudioAI — Comprehensive LLM Knowledge Base & Technical Index # https://www.dotnetstudioai.com/llms-full.txt # Generated: 2026-10-24 # Focus: .NET 10, C#, Semantic Kernel, Microsoft Foundry, Microsoft Agent Framework 1.0 GA, MCP, Microsoft.Extensions.AI > DotNetStudioAI is the authoritative production reference for .NET developers building AI applications. > This file contains structured summaries, technical takeaways, and implementation checklists > for all 82 technical articles and guides published on dotnetstudioai.com. ================================================================================ ## PILLAR: /UNIVERSITY/ ================================================================================ ### AI Agent Architecture in .NET: Single-Agent, Orchestrator & Group Chat Patterns - **URL:** https://www.dotnetstudioai.com/university/ai-agent-architecture-concepts-patterns-dotnet/ - **Description:** Design production AI agents in C# — perception, reasoning, tools, memory. Three multi-agent patterns with Semantic Kernel and Agent Framework code. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** AI Agents, Architecture, .NET AI, Design Patterns, Semantic Kernel **Technical Summary:** Architecture guide for AI agents in .NET. Covers the five components of agent anatomy (perception, reasoning, tools, memory, action), three production patterns (single-agent, orchestrator-worker, group chat), and implementation guidance using Semantic Kernel and Microsoft Agent Framework. **Key Takeaways:** - Agents have five components: perception, reasoning, tools, memory, action - Single-agent pattern: one LLM with tool-calling for focused tasks - Orchestrator-worker: central agent delegates to specialized workers - Group chat: peer agents collaborate with routing logic - Memory spans three levels: working (chat history), short-term (session), long-term (vector store) **Implementation Steps:** - [ ] Identify the agent pattern that fits your use case - [ ] Define tools as discrete, well-described functions - [ ] Implement appropriate memory strategy - [ ] Add observability to tool calls and reasoning steps - [ ] Test with adversarial and edge-case inputs --- ### Azure OpenAI Cost Optimization & Token Budgets in C# (.NET) - **URL:** https://www.dotnetstudioai.com/university/azure-openai-cost-optimization-dotnet/ - **Description:** Reduce Azure AI Foundry spend in .NET 10: GPT-5.4 tier routing, semantic caching, token budgets, and Ollama for dev. April 2026 pricing examples included. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Cost Optimization, Azure AI Foundry, Azure OpenAI, GPT-5.4, Token Budget, Model Routing, Semantic Caching, .NET AI **Technical Summary:** Azure AI Foundry costs in C# are controlled through six strategies: model tier routing (GPT-5.4-mini is 5x cheaper than GPT-5.4; GPT-5.4-nano is 20x cheaper for simple lookups), semantic caching (40-60% call reduction for repeated queries), token budgets enforced per-user, prompt compression, Ollama for local dev (zero cost), and the Batch API for non-real-time workloads (50% discount). Implement IFunctionInvocationFilter for cross-cutting cost controls in Semantic Kernel. Pricing based on April 2026 Azure AI Foundry rates. Uses .NET 10 (LTS). **Key Takeaways:** - GPT-5.4 model tier routing: GPT-5.4-mini is 5x cheaper than GPT-5.4; GPT-5.4-nano is 20x cheaper — route simple queries to the cheapest capable tier - Semantic caching as IFunctionInvocationFilter: 40-60% cost reduction for repeated queries - Per-user token budgets prevent individual users from monopolizing shared quota - Batch API: 50% cost reduction for non-real-time workloads (document processing, evaluation) — combine with GPT-5.4-mini for maximum savings - Ollama for local dev eliminates all API costs during development and testing - Use .NET 10 (LTS) for all new cost-optimized production systems **Implementation Steps:** - [ ] Classify request complexity before routing — use nano for simple, mini for balanced, GPT-5.4 for complex - [ ] Implement semantic cache using vector similarity on embeddings - [ ] Set max_tokens on every request to cap unexpected output costs - [ ] Track completion.Usage.TotalTokenCount per user for budget enforcement - [ ] Register Ollama as IChatClient in development environments — eliminates all dev/test API cost - [ ] Evaluate Batch API for any non-real-time AI workloads - [ ] Target .NET 10 (LTS) for all new production systems --- ### Azure.AI.OpenAI v2 Migration: Fix Every C# Break - **URL:** https://www.dotnetstudioai.com/university/azure-openai-sdk-v2-migration-csharp-breaking-changes/ - **Description:** Migrating to Azure.AI.OpenAI v2? Map old C# types to ChatClient, ChatMessage, streaming, tools, and compile-error fixes. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Azure OpenAI, SDK v2, Migration, Breaking Changes, .NET AI **Technical Summary:** Azure.AI.OpenAI v2 restructures the .NET Azure OpenAI SDK as a thin wrapper over the official OpenAI .NET SDK. The primary change is that AzureOpenAIClient replaces OpenAIClient, and all chat types (ChatMessage, ChatCompletion, ChatClient) now come from the OpenAI.Chat namespace. ChatRequestUserMessage becomes UserChatMessage, ChatCompletions becomes ChatCompletion (singular), and streaming now uses CompleteChatStreamingAsync returning AsyncCollectionResult. Function calling uses ChatTool.CreateFunctionTool instead of FunctionDefinition. The migration is mechanical but comprehensive — nearly every type name changed. **Key Takeaways:** - AzureOpenAIClient (from Azure.AI.OpenAI) replaces OpenAIClient — call .GetChatClient(deployment) to get a ChatClient - Chat types are now in OpenAI.Chat: UserChatMessage, AssistantChatMessage, SystemChatMessage replace the ChatRequest* types - ChatCompletion (singular) replaces ChatCompletions (plural) — access the response with ClientResult.Value - Streaming uses CompleteChatStreamingAsync() returning AsyncCollectionResult - ChatTool.CreateFunctionTool(name, description, BinaryData) replaces FunctionDefinition for function calling - ChatCompletionOptions replaces ChatCompletionsOptions — note the dropped 's' **Implementation Steps:** - [ ] Update package reference: Azure.AI.OpenAI to version 2.1.0 (OpenAI 2.1.0 is included transitively) - [ ] Replace OpenAIClient with AzureOpenAIClient and call .GetChatClient(deploymentName) - [ ] Replace ChatRequestUserMessage with UserChatMessage, ChatRequestSystemMessage with SystemChatMessage, ChatRequestAssistantMessage with AssistantChatMessage - [ ] Replace ChatCompletionsOptions with ChatCompletionOptions and update changed property names - [ ] Update result access: Response becomes ClientResult, access value via .Value - [ ] Update streaming: GetChatCompletionsStreamingAsync() becomes CompleteChatStreamingAsync() on ChatClient - [ ] Replace FunctionDefinition with ChatTool.CreateFunctionTool and pass JSON schema as BinaryData - [ ] Run build and use the compile error table in this article to fix each remaining error --- ### Azure OpenAI Structured Outputs: C# JSON Fix - **URL:** https://www.dotnetstudioai.com/university/azure-openai-structured-outputs-csharp/ - **Description:** Get valid JSON from Azure OpenAI in C#. Use ChatResponseFormat, JSON schema, MEAI, and Semantic Kernel patterns that avoid 400 errors. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 **Technical Summary:** Azure OpenAI structured outputs guarantee strict JSON schema compliance on current Azure AI Foundry GPT-5.4-family deployments when used with a current preview or supported API version. In the OpenAI .NET SDK, use ChatResponseFormat.CreateJsonSchemaFormat(name, strict: true) in ChatCompletionOptions. Semantic Kernel supports structured outputs via ResponseFormat = typeof(T) in OpenAIPromptExecutionSettings. Schema types must use only JSON Schema primitives — string, int, bool, decimal, enums, nested objects, and arrays. Replace DateTime, Uri, and TimeSpan properties with string and use [Description] attributes to convey format expectations to the model. Use JsonSchemaExporter.GetJsonSchemaAsNode in .NET 10 to validate schemas locally before deployment. **Key Takeaways:** - Structured outputs guarantee 100% JSON schema compliance; JSON mode only requests valid JSON without schema adherence - Use ChatResponseFormat.CreateJsonSchemaFormat(name, strict: true) in ChatCompletionOptions for SDK-direct calls - Semantic Kernel enables structured outputs via ResponseFormat = typeof(T) in OpenAIPromptExecutionSettings - Schema types must use JSON Schema primitives only — replace DateTime/Uri/TimeSpan with string - Add [Description] attributes from System.ComponentModel to string properties to guide model formatting - Validate schemas locally with JsonSchemaExporter.GetJsonSchemaAsNode before deploying **Implementation Steps:** - [ ] Confirm deployment uses GPT-5.4 or GPT-5.4-mini - [ ] Set AzureOpenAIClientOptions.ServiceVersion to V2024_08_01_Preview or later - [ ] Design your response type using only JSON Schema primitives (string, int, bool, decimal, enums, arrays, nested objects) - [ ] Replace DateTime, Uri, and TimeSpan properties with string and add [Description] attributes - [ ] Call ChatResponseFormat.CreateJsonSchemaFormat(name, strict: true) in ChatCompletionOptions - [ ] Deserialize the response with JsonSerializer.Deserialize(completion.Value.Content[0].Text) - [ ] Validate schema locally with JsonSchemaExporter.GetJsonSchemaAsNode before production deployment - [ ] Add error handling for 400 invalid_request_error with fallback to JSON mode if needed --- ### Azure OpenAI Token Counting & Context Limits in C# (.NET) - **URL:** https://www.dotnetstudioai.com/university/azure-openai-token-counting-context-management-csharp/ - **Description:** Count Azure OpenAI tokens in C# with Microsoft.ML.Tokenizers. Add budgets, prevent context overflow, estimate cost, and enforce limits. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Azure AI Foundry, Azure OpenAI, Token Counting, Microsoft.ML.Tokenizers, Context Management, .NET AI **Technical Summary:** Token counting in C# uses Microsoft.ML.Tokenizers 0.22.x with TiktokenTokenizer.CreateForModel(). Chat messages add 4 tokens overhead per message plus 2 for reply priming. Implement a token budget as an IFunctionInvocationFilter in Semantic Kernel to prevent context overflow before API calls. Pre-call cost estimation multiplies counted tokens by current Azure AI Foundry per-model pricing, with GPT-5.4-mini as the default production example. Always add a 10% buffer to estimates. **Key Takeaways:** - Use Microsoft.ML.Tokenizers 0.22.x — the Microsoft-maintained TikToken library for .NET - Chat messages add 4 tokens overhead per message + 2 for reply priming beyond text content - IFunctionInvocationFilter makes a clean token budget middleware in Semantic Kernel - Pre-call cost estimation: count tokens × (price / 1M) before every expensive AI call - Client-side counting is accurate to ~97-99% — always add a 10% safety buffer **Implementation Steps:** - [ ] Add Microsoft.ML.Tokenizers 0.22.0 NuGet package - [ ] Create TiktokenTokenizer using TiktokenTokenizer.CreateForModel('gpt-5.4-mini') - [ ] Account for 4-token message overhead and 2-token reply priming in chat token counts - [ ] Implement IFunctionInvocationFilter as a token budget gate in Semantic Kernel - [ ] Add pre-call cost estimation logging for every AI request - [ ] Set a max_tokens limit on every request to cap output token consumption --- ### LLM Providers for .NET: OpenAI vs Azure - **URL:** https://www.dotnetstudioai.com/university/comparing-llm-providers-openai-azure-anthropic/ - **Description:** Compare OpenAI, Azure OpenAI, Anthropic, and Gemini for .NET apps: SDK support, pricing, rate limits, and Semantic Kernel connectors. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** LLM Providers, Azure OpenAI, OpenAI, Anthropic, Ollama, .NET AI **Technical Summary:** This article compares the major LLM providers available to .NET developers — OpenAI, Azure OpenAI, Anthropic Claude, Google Gemini, and open-source models via Ollama. It covers SDK support, enterprise considerations including data residency and SLAs, pricing structures, and provides a decision matrix for .NET teams. A code example demonstrates using Microsoft.Extensions.AI IChatClient to build provider-agnostic applications. **Key Takeaways:** - Azure OpenAI runs identical models to OpenAI but adds enterprise compliance, SLAs, and Azure AD authentication - Microsoft.Extensions.AI IChatClient is the recommended abstraction for provider-agnostic .NET AI code - Anthropic Claude and Google Gemini are accessible from .NET via REST or community connectors - Open-source models (Llama 3, DeepSeek, Qwen) run locally via Ollama for development and air-gapped scenarios - Semantic Kernel connectors exist for all major providers, enabling orchestration-level portability **Implementation Steps:** - [ ] Evaluate provider requirements: compliance, data residency, latency, cost - [ ] Install Microsoft.Extensions.AI for provider-agnostic abstractions - [ ] Register your chosen provider as IChatClient in the DI container - [ ] Use Azure OpenAI for enterprise workloads requiring SLAs and content filtering - [ ] Set up Ollama locally for development and offline testing - [ ] Implement provider-swap capability using configuration-driven registration --- ### DI for AI Services in ASP.NET Core: IChatClient, Kernel & Keyed Services - **URL:** https://www.dotnetstudioai.com/university/dependency-injection-ai-services-aspnet-core/ - **Description:** Register IChatClient, IEmbeddingGenerator, and Semantic Kernel in ASP.NET Core DI. Keyed services for multi-model, plugin injection, and unit testing patterns. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Dependency Injection, ASP.NET Core, IChatClient, Semantic Kernel, .NET AI **Technical Summary:** Register AI services in ASP.NET Core using AddAzureOpenAIChatClient() for IChatClient, AddKernel() for Semantic Kernel, and keyed services for multiple providers. Plugins with dependencies belong in host DI registered with AddSingleton/AddScoped and added to Kernel via AddFromObject(). Mock IChatClient for unit tests. Kernel is registered as Transient — if you need Scoped, register it explicitly via services.AddScoped(). **Key Takeaways:** - AddKernel() registers Kernel as Transient — inject Kernel not IKernel - Multiple AI providers: use keyed services with [FromKeyedServices('key')] - Plugins with DB/API deps: register in host DI, add to kernel via AddFromObject() - IChatClient is easy to mock — no live API needed for unit tests - AddAzureOpenAIChatClient() registers IChatClient; AddKernel() does NOT register IChatClient **Implementation Steps:** - [ ] Add Microsoft.Extensions.AI package for IChatClient - [ ] Register IChatClient with AddAzureOpenAIChatClient() or AddOllamaChatClient() - [ ] Register Semantic Kernel with AddKernel().AddAzureOpenAIChatCompletion() - [ ] Use keyed services for multiple AI providers - [ ] Register stateful plugins in host DI, stateless plugins with AddFromType() - [ ] Mock IChatClient in tests — verify prompt content and return controlled responses --- ### AI Workflow Patterns in .NET: Chaining, Fan-Out, Human-in-the-Loop & Agents - **URL:** https://www.dotnetstudioai.com/university/designing-ai-workflows-orchestration-patterns-dotnet/ - **Description:** Design reliable AI workflows in .NET: prompt chaining, parallel fan-out, human-in-the-loop, and agent orchestration. Pattern code + when to use each one. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** AI Workflows, Orchestration, Prompt Chaining, Semantic Kernel, .NET AI **Technical Summary:** This article covers AI workflow orchestration patterns for .NET developers. It explains single-shot vs multi-step workflows, then details five core patterns: prompt chaining, sequential pipelines with error gates, parallel fan-out/fan-in, human-in-the-loop checkpoints, and the agent loop (observe-plan-act-evaluate). It covers when to use Semantic Kernel's planner vs custom orchestration, how to use Azure Durable Functions for long-running AI workflows, and strategies for testing non-deterministic AI systems. **Key Takeaways:** - Single-shot prompts work for simple tasks; multi-step workflows improve reliability for complex tasks - Prompt chaining decomposes complex tasks into focused, sequential LLM calls - Error gates between pipeline stages prevent bad outputs from propagating - Parallel fan-out reduces latency when multiple independent AI tasks can run concurrently - Human-in-the-loop checkpoints are essential for high-stakes AI decisions - Azure Durable Functions provide durability and state management for long-running AI workflows - Test AI workflows at unit, integration, and evaluation levels **Implementation Steps:** - [ ] Identify whether your task needs single-shot or multi-step processing - [ ] Decompose complex prompts into focused chain steps - [ ] Add error gates with validation between pipeline stages - [ ] Use Task.WhenAll for independent parallel AI operations - [ ] Implement human-in-the-loop for high-stakes decisions - [ ] Consider Azure Durable Functions for workflows exceeding 30 seconds - [ ] Write unit tests with mocked LLM responses for orchestration logic - [ ] Pin model versions and temperature settings for test reproducibility --- ### Semantic Kernel Function Calling C#: Tutorial with Examples - **URL:** https://www.dotnetstudioai.com/university/function-calling-tool-use-semantic-kernel/ - **Description:** Semantic Kernel function calling tutorial for C# developers. Register methods as AI tools with [KernelFunction], auto-invoke plugins, and chain tool calls. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Semantic Kernel, Function Calling, Tool Use, Plugins, .NET AI **Technical Summary:** This article explains how to implement function calling and tool use in .NET applications using Semantic Kernel 1.54.0. It covers the KernelFunction attribute, plugin organization, auto vs. manual function calling behavior, multi-step tool chains, error handling, and security considerations. Includes a complete working example with weather and database plugins. **Key Takeaways:** - Function calling lets the AI model request execution of your C# methods with structured arguments - KernelFunction attribute maps C# methods to the OpenAI function calling schema automatically - FunctionChoiceBehavior.Auto() enables fully automatic tool invocation round-trips - Plugin grouping via KernelPlugin organizes related functions for the model's discovery - Always validate inputs inside kernel functions — the model controls the arguments **Implementation Steps:** - [ ] Install Microsoft.SemanticKernel 1.54.0 - [ ] Create plugin classes with [KernelFunction] and [Description] attributes - [ ] Register plugins with kernel.Plugins.AddFromType() - [ ] Set FunctionChoiceBehavior.Auto() in execution settings - [ ] Add input validation inside every exposed kernel function - [ ] Implement error handling with try/catch inside functions - [ ] Test multi-step function chains with realistic prompts - [ ] Audit exposed functions for security implications --- ### How LLMs Work: Tokens, Context Windows & Next-Token Prediction Explained - **URL:** https://www.dotnetstudioai.com/university/how-large-language-models-work/ - **Description:** How GPT, Claude, and LLMs generate text via next-token prediction. Tokens, context windows, temperature, and transformers — explained for .NET developers. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** LLMs, GPT, Transformers, AI Architecture, Token Prediction **Technical Summary:** This article explains how large language models work at a mechanical level for software engineers. It covers pre-training and fine-tuning phases, tokenization with BPE and SentencePiece, the next-token prediction mechanism, sampling strategies including temperature and top-p, context window engineering, and the major model families (GPT, Claude, Gemini, Llama, DeepSeek). It concludes with practical guidance on choosing between open-source and proprietary models. **Key Takeaways:** - LLMs are next-token prediction machines — they calculate probability distributions over vocabulary at each step - Pre-training learns language patterns from massive corpora; fine-tuning and RLHF align the model to be helpful and safe - Temperature controls randomness: 0 is deterministic, 1.0 is proportional sampling, higher values increase chaos - Context windows are fixed-size working memory — everything the model needs must fit within this limit - Open-source models are production-viable but require infrastructure; proprietary models trade cost for operational simplicity **Implementation Steps:** - [ ] Understand the pre-training → fine-tuning → RLHF pipeline - [ ] Learn how tokenization converts text to model inputs - [ ] Grasp next-token prediction as the core generation mechanism - [ ] Know when to use low vs. high temperature settings - [ ] Evaluate open-source vs. proprietary models for your use case - [ ] Account for context window limits in your application architecture --- ### MCP Server Authentication in C# with Microsoft Entra ID - **URL:** https://www.dotnetstudioai.com/university/mcp-server-authentication-entra-id-dotnet/ - **Description:** Secure remote Model Context Protocol (MCP) servers in C# using Microsoft Entra ID OAuth 2.0 bearer tokens, ASP.NET Core authorization, and API key fallbacks. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** MCP, Model Context Protocol, Microsoft Entra ID, Security, Authentication, ASP.NET Core, .NET 10 **Technical Summary:** Securing remote MCP servers in C# requires authenticating HTTP transports with Microsoft Entra ID OAuth 2.0 bearer tokens. Using ModelContextProtocol.AspNetCore and Microsoft.Identity.Web, developers can protect MCP endpoints with ASP.NET Core JWT bearer middleware and enforce role- or scope-based authorization on specific tools. For automated AI agents, Azure.Identity DefaultAzureCredential automates client-side token acquisition. **Key Takeaways:** - MCP stdio transport operates on process boundaries; remote MCP servers require HTTP transport authentication - ASP.NET Core JWT Bearer authentication integrates directly with ModelContextProtocol.AspNetCore endpoints - Use Microsoft.Identity.Web 3.2+ with .NET 10 for streamlined Entra ID token validation - Tools can enforce granular scopes (e.g. Mcp.Tools.Execute vs Mcp.Tools.Admin) to restrict high-privilege operations - Azure.Identity DefaultAzureCredential enables seamless machine-to-machine authentication for enterprise AI agents **Implementation Steps:** - [ ] Register MCP Server Web API application in Microsoft Entra ID admin center - [ ] Expose API scopes: Mcp.Tools.Execute and Mcp.Tools.Read - [ ] Install Microsoft.Identity.Web and ModelContextProtocol.AspNetCore NuGet packages - [ ] Configure AddMicrosoftIdentityWebApi in Program.cs with AzureAd config section - [ ] Apply RequireAuthorization() to MapMcpServer() route endpoint - [ ] Configure C# MCP client with DelegatingHandler or Authorization header --- ### Microsoft Agent Framework 1.0 for .NET — Complete C# Guide - **URL:** https://www.dotnetstudioai.com/university/microsoft-agent-framework-complete-guide-dotnet/ - **Description:** Complete guide to Microsoft Agent Framework 1.0 in .NET: architecture, orchestration, MCP tool integration, and deployment for autonomous AI agents in C#. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Microsoft Agent Framework, AI Agents, .NET AI, Semantic Kernel, Multi-Agent, MCP **Technical Summary:** Microsoft Agent Framework is the official .NET SDK for autonomous AI agents, succeeding both Semantic Kernel agents and AutoGen. It provides four orchestration patterns (sequential, concurrent, handoff, group chat), native MCP support, human-in-the-loop workflows, and checkpointing. It builds on Semantic Kernel, so SK plugins transfer directly. At 1.0 GA, it is the production standard for enterprise .NET agent systems. **Key Takeaways:** - Agent Framework succeeds both SK agents and AutoGen — use it for new agent projects - Four orchestration patterns: sequential, concurrent, handoff, group chat - SK plugins (KernelFunction) work directly in Agent Framework — no rewrite needed - Native MCP support for connecting agents to external tool servers - 1.0 GA API is production-ready with enterprise support **Implementation Steps:** - [ ] Install Microsoft.Agents.AI and Microsoft.Agents.Core NuGet packages - [ ] Create agents using ChatCompletionAgent with SK kernel - [ ] Choose orchestration pattern based on workflow shape - [ ] Add MCP tool servers via McpToolProvider - [ ] Configure checkpointing for long-running workflows - [ ] Add OpenTelemetry for agent observability --- ### Multi-Agent Orchestration in .NET: Sequential, Handoff & Group Chat Patterns - **URL:** https://www.dotnetstudioai.com/university/microsoft-agent-framework-multi-agent-patterns-dotnet/ - **Description:** Multi-agent patterns with Microsoft Agent Framework: sequential pipelines, handoff delegation, and group chat on Semantic Kernel. .NET code for each pattern. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** AI Agents, Microsoft Agent Framework, Multi-Agent, Semantic Kernel, .NET AI **Technical Summary:** This article covers Microsoft's Agent Framework for .NET, built on Semantic Kernel. It explains the difference between chatbots and AI agents, introduces ChatCompletionAgent and AgentGroupChat, demonstrates single-agent and multi-agent patterns in C#, covers tool registration for agents, and discusses built-in observability. Developers will learn when to choose single vs multi-agent architectures and understand the real-world trade-offs involved. **Key Takeaways:** - Agents differ from chatbots — they maintain goals, use tools, and execute multi-step plans - ChatCompletionAgent wraps a Kernel with instructions and a name for identity - AgentGroupChat orchestrates conversations between multiple agents - Common patterns include writer/editor, sequential pipeline, and round-robin - Agents reuse Semantic Kernel plugins for tool registration - Built-in filters provide observability without custom instrumentation - Start with a single agent and add agents only when you have distinct roles **Implementation Steps:** - [ ] Install Microsoft.SemanticKernel.Agents.Core NuGet package - [ ] Define each agent with a clear name, instructions, and dedicated kernel - [ ] Register tools as plugins on the agent's kernel - [ ] Choose a termination strategy for AgentGroupChat - [ ] Implement selection strategy for multi-agent routing - [ ] Add function invocation filters for observability - [ ] Test individual agents before combining into multi-agent workflows --- ### Microsoft.Extensions.AI: IChatClient Guide - **URL:** https://www.dotnetstudioai.com/university/microsoft-extensions-ai-dotnet-guide/ - **Description:** Learn Microsoft.Extensions.AI in .NET: IChatClient, IEmbeddingGenerator, provider-agnostic chat, middleware, caching, logging, and DI. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Microsoft.Extensions.AI, .NET AI, IChatClient, IEmbeddingGenerator, AI Abstraction **Technical Summary:** Microsoft.Extensions.AI is the .NET abstraction layer for AI services. It defines IChatClient and IEmbeddingGenerator interfaces that all providers implement. It sits below Semantic Kernel in the stack, providing provider-agnostic AI access with native DI support. Supports middleware pipelines for logging, caching, rate limiting, and telemetry. **Key Takeaways:** - IChatClient is the provider-agnostic interface for chat completions in .NET - IEmbeddingGenerator provides the same abstraction for embedding generation - Swap Azure OpenAI for Ollama by changing one DI registration - Middleware pipelines add logging, caching, and rate limiting to any provider - Semantic Kernel and Agent Framework both build on these interfaces **Implementation Steps:** - [ ] Install Microsoft.Extensions.AI NuGet package - [ ] Register an IChatClient implementation in DI - [ ] Use IChatClient for chat completions in your services - [ ] Add middleware (logging, caching) to the client pipeline - [ ] Migrate to a different provider by changing the registration only --- ### MEAI vs Semantic Kernel vs Agent Framework - **URL:** https://www.dotnetstudioai.com/university/microsoft-extensions-ai-vs-semantic-kernel-vs-agent-framework/ - **Description:** Choose the right .NET AI library: Microsoft.Extensions.AI for abstraction, Semantic Kernel for orchestration, Agent Framework for agents. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Microsoft.Extensions.AI, Semantic Kernel, Agent Framework, .NET AI, Architecture **Technical Summary:** Microsoft.Extensions.AI (MEAI), Semantic Kernel (SK), and Agent Framework (MAF) form a three-layer stack — not competing frameworks. MEAI provides the IChatClient and IEmbeddingGenerator abstractions; SK adds plugins, filters, prompt templates, and chat history; MAF adds ChatCompletionAgent and multi-agent orchestration via AgentGroupChat. Choose the layer that matches your complexity: MEAI for simple AI calls or library code, SK for orchestrated features, MAF for autonomous agent workflows. **Key Takeaways:** - MEAI, SK, and MAF are a three-layer stack: foundation → orchestration → agents - MEAI's IChatClient is the provider abstraction — SK and MAF build on top of it - Add SK when you need plugins, auto function calling, or prompt templates - Add MAF when you need autonomous agent loops, multi-agent coordination, or checkpointing - Migration path: SK Planner → Auto Function Calling → ChatCompletionAgent **Implementation Steps:** - [ ] Determine if you need simple AI calls (MEAI), orchestrated workflows (SK), or autonomous agents (MAF) - [ ] Register IChatClient via AddAzureOpenAIChatClient() or AddOllamaChatClient() in DI - [ ] Add AddKernel() and connectors if you need plugins or prompt templates - [ ] Wrap Kernel in ChatCompletionAgent if you need an agent loop - [ ] Use AgentGroupChat for multi-agent coordination with termination conditions - [ ] Adopt Microsoft Agent Framework 1.0 GA for production multi-agent orchestration --- ### Migrate Semantic Kernel to Microsoft Agent Framework 1.0 — C# Step by Step - **URL:** https://www.dotnetstudioai.com/university/migrate-semantic-kernel-to-microsoft-agent-framework/ - **Description:** Side-by-side migration guide: Semantic Kernel Agents to Microsoft Agent Framework 1.0 in .NET. What transfers directly, what changes, and step-by-step code. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Microsoft Agent Framework, Semantic Kernel, Migration, AI Agents, .NET AI **Technical Summary:** Migration from Semantic Kernel Agents to Microsoft Agent Framework 1.0 GA preserves plugins, DI patterns, and kernel configuration. The primary changes are in agent lifecycle management (explicit threads), orchestration patterns (sequential, concurrent, handoff, group chat), and production features (checkpointing, human-in-the-loop). Recommendation: start new agentic projects on Agent Framework 1.0 GA, and migrate existing production SK agents in staged increments with parallel validation. **Key Takeaways:** - Plugins with [KernelFunction] transfer directly — no code changes needed - Agent lifecycle moves from implicit to explicit thread management - Four built-in orchestration patterns replace custom multi-agent coordination - Checkpointing and human-in-the-loop are native to Agent Framework - SK and Agent Framework coexist in the same project via shared Kernel **Implementation Steps:** - [ ] Audit existing SK agent code for ChatCompletionAgent and AgentGroupChat usage - [ ] Verify all plugins use [KernelFunction] attribute (compatible with both) - [ ] Map current orchestration logic to Agent Framework patterns - [ ] Prototype migration using the Microsoft.Agents.AI 1.0 GA package - [ ] Deploy production agent workflows with full 1.0 GA support --- ### MCP Server in C#: Build Model Context Protocol Servers in .NET 10 - **URL:** https://www.dotnetstudioai.com/university/model-context-protocol-dotnet-guide/ - **Description:** Build Model Context Protocol (MCP) servers in C# with the official .NET SDK. Stdio, SSE/HTTP transports, and Semantic Kernel integration. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** MCP, Model Context Protocol, .NET AI, AI Agents, C# SDK **Technical Summary:** MCP is the open standard for connecting AI agents to external tools. The C# SDK v1.0 provides client and server implementations for .NET. MCP uses a host/client/server model: hosts are AI applications, clients manage connections, servers expose tools. MCP tools integrate with Semantic Kernel and Microsoft Agent Framework via KernelFunction conversion. **Key Takeaways:** - MCP standardizes the way AI agents discover and invoke external tools - Host/client/server architecture separates AI applications from tool implementations - C# SDK v1.0 supports stdio and HTTP transports - MCP tools convert to SK KernelFunctions — works with SK and Agent Framework - v1.0 features: authorization, tool sampling, long-running requests **Implementation Steps:** - [ ] Install ModelContextProtocol NuGet package (client or server) - [ ] Create MCP server with tool definitions - [ ] Configure transport (stdio for local, HTTP for remote) - [ ] Connect MCP client from your AI application - [ ] Convert MCP tools to KernelFunctions for SK integration --- ### Run ONNX Models in .NET: HuggingFace Embeddings & Phi-3 Without Azure - **URL:** https://www.dotnetstudioai.com/university/onnx-models-dotnet-run-ai-without-azure/ - **Description:** Run HuggingFace embedding models and Phi-3 locally in .NET with ONNX Runtime. No cloud APIs, no inference costs — pure C# offline AI inference. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** ONNX, ONNX Runtime, .NET AI, Local AI, HuggingFace **Technical Summary:** Guide to running ONNX models in .NET for offline AI inference. Covers: loading HuggingFace embedding models, running Phi-3 locally with ONNX Runtime GenAI, integrating ONNX embeddings with Semantic Kernel, and performance benchmarks for CPU vs GPU inference. **Key Takeaways:** - ONNX Runtime runs models from PyTorch/TensorFlow in .NET without Python - Use Microsoft.ML.OnnxRuntime for classification and embedding models - Use Microsoft.ML.OnnxRuntimeGenAI for text generation (Phi-3, Mistral) - ONNX embedding models can implement SK's ITextEmbeddingGenerationService - CPU inference is viable for embeddings; GPU accelerates generation models **Implementation Steps:** - [ ] Install Microsoft.ML.OnnxRuntime or OnnxRuntimeGenAI NuGet package - [ ] Download ONNX model files (model.onnx, tokenizer.json) - [ ] Create InferenceSession with model path - [ ] Prepare input tensors matching model's expected shapes - [ ] Run inference and extract output tensors --- ### OpenTelemetry for .NET AI Apps - **URL:** https://www.dotnetstudioai.com/university/opentelemetry-ai-dotnet-observability-guide/ - **Description:** Trace .NET AI apps with OpenTelemetry. Track Semantic Kernel calls, token costs, latency, and export telemetry to Aspire and App Insights. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** OpenTelemetry, Observability, Semantic Kernel, .NET AI, Azure OpenAI **Technical Summary:** OpenTelemetry is the standard for AI observability in .NET. Semantic Kernel emits gen_ai.* compliant spans and metrics natively. Enable them with a one-line AppContext switch and wire to .NET Aspire dashboard (local dev) or Application Insights (production) via the OTLP exporter. Custom ActivitySource spans and Counter / Histogram metrics give you token cost tracking and prompt quality monitoring on top of the built-in telemetry. **Key Takeaways:** - Enable SK telemetry with AppContext.SetSwitch before building the Kernel - SK follows OpenTelemetry GenAI semantic conventions (gen_ai.*) out of the box - .NET Aspire dashboard receives all AI telemetry automatically via AddServiceDefaults() - Custom metrics (token cost histograms, latency counters) are added via System.Diagnostics.Metrics - A custom BaseProcessor can mask PII before spans are exported to production backends **Implementation Steps:** - [ ] Add OpenTelemetry NuGet packages to your project - [ ] Call AppContext.SetSwitch to enable SK diagnostic telemetry - [ ] Configure OTLP exporter pointing to Aspire dashboard or Jaeger for local dev - [ ] Add Azure.Monitor.OpenTelemetry.AspNetCore for Application Insights in production - [ ] Implement custom Counter for token usage tracking - [ ] Add a PII-masking BaseProcessor before exporting sensitive prompt data --- ### Prompt Engineering in C#: System Messages, Few-Shot & Structured Output - **URL:** https://www.dotnetstudioai.com/university/prompt-engineering-fundamentals-csharp/ - **Description:** Prompt engineering with C# code examples: system messages, few-shot prompting, structured JSON output, and common mistakes. Azure OpenAI + Semantic Kernel. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Prompt Engineering, C#, Azure OpenAI, System Messages, Few-Shot Prompting **Technical Summary:** This article teaches C# developers prompt engineering fundamentals with practical code examples. It covers the message role system (system/user/assistant), system message design patterns, few-shot prompting with C# string interpolation, chain-of-thought prompting, structured JSON output extraction, temperature tuning for different tasks, common anti-patterns, reusable prompt template classes, and a complete Azure OpenAI integration example using Microsoft.Extensions.AI. **Key Takeaways:** - System messages set the behavioral foundation — define role, constraints, output format, and boundaries - Few-shot examples are the most reliable way to control output format without fine-tuning - Chain-of-thought prompting improves accuracy on reasoning tasks by forcing the model to show its work - Use JSON mode and schema validation together — JSON mode ensures valid JSON, not valid schema - Build reusable prompt template classes in C# instead of scattering string interpolation across your codebase **Implementation Steps:** - [ ] Design system messages with role, task, format, and boundary sections - [ ] Use few-shot examples for consistent output formatting - [ ] Set temperature based on task type (0 for code/JSON, 0.5-0.7 for conversation) - [ ] Enable JSON response format for structured output tasks - [ ] Validate deserialized output against expected schema - [ ] Create reusable prompt template classes for maintainability - [ ] Test prompts with edge cases before deploying to production --- ### RAG Architecture for .NET: Embeddings, Vector Search & Grounded Generation - **URL:** https://www.dotnetstudioai.com/university/retrieval-augmented-generation-explained-dotnet/ - **Description:** Build a RAG pipeline in C# — chunking, embeddings, Azure AI Search, Cosmos DB vector search, and hybrid retrieval. Architecture diagrams included. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** RAG, Embeddings, Vector Search, Azure AI Search, Azure Cosmos DB, .NET AI **Technical Summary:** This article explains the Retrieval-Augmented Generation (RAG) architecture for .NET architects. It covers why LLMs hallucinate and how RAG solves it, the complete RAG pipeline from ingestion through generation, embedding mechanics, vector database options for .NET (Azure Cosmos DB, Azure AI Search, Qdrant), chunking strategies, retrieval methods including hybrid search, and evaluation metrics for RAG quality. **Key Takeaways:** - RAG grounds LLM responses in retrieved documents, reducing hallucinations without fine-tuning - The pipeline is: ingest, chunk, embed, store, retrieve, augment, generate - Embeddings convert text into high-dimensional vectors that capture semantic meaning - Hybrid search (BM25 + vector) with semantic reranking outperforms pure vector search - Azure Cosmos DB and Azure AI Search are the primary .NET-native vector store options **Implementation Steps:** - [ ] Choose a vector store: Azure Cosmos DB, Azure AI Search, or Qdrant - [ ] Select an embedding model: text-embedding-3-small for cost efficiency, text-embedding-3-large for quality - [ ] Implement a chunking strategy with overlap (start with 512 tokens, 50 token overlap) - [ ] Build the ingestion pipeline: read documents, chunk, embed, store - [ ] Implement retrieval with top-K vector search - [ ] Consider hybrid search (BM25 + vector) for better recall - [ ] Design the augmentation prompt template with retrieved context - [ ] Measure faithfulness and relevance with evaluation metrics - [ ] Add citation tracking to link responses back to source documents --- ### Foundry Local vs Ollama in C#: Which for .NET? (2026 Comparison) - **URL:** https://www.dotnetstudioai.com/university/running-phi4-locally-csharp-ollama-onnx-foundry/ - **Description:** Foundry Local vs Ollama in C#: Compare local AI runtimes for .NET 10 developers. Benchmarks, setup code, Semantic Kernel examples, and ONNX Runtime GenAI. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Phi-4, Local AI, Ollama, ONNX Runtime, Foundry Local, Small Language Models, .NET AI **Technical Summary:** Phi-4 runs locally in .NET via four approaches: Ollama (simplest — one command, OpenAI-compatible API), ONNX Runtime GenAI (maximum performance via DirectML/CUDA), Foundry Local (managed runtime with Microsoft Foundry tooling), or LLamaSharp (in-process for GGUF models). All four integrate with Semantic Kernel. Phi-4 (14B) requires 16GB VRAM; Phi-4-mini (3.8B) runs on 4GB VRAM or CPU. Switch between local and Azure OpenAI by changing only the DI registration. **Key Takeaways:** - Phi-4 (14B) needs 16GB VRAM; Phi-4-mini (3.8B) needs 4GB VRAM or CPU-only - Ollama is the fastest setup — one command to pull, one to run, OpenAI-compatible endpoint - Integrate with SK via AddOpenAIChatCompletion pointing to http://localhost:11434/v1 - ONNX Runtime GenAI gives best raw performance on local hardware via DirectML/CUDA - Use IChatClient + environment-based DI to switch local ↔ cloud without code changes **Implementation Steps:** - [ ] Install Ollama from ollama.com and run ollama pull phi4-mini - [ ] Verify Ollama is running with ollama list and ollama run phi4-mini 'Hello' - [ ] Add OllamaSharp NuGet package or use the OpenAI-compat endpoint directly - [ ] Register in SK with AddOpenAIChatCompletion pointing to http://localhost:11434/v1 - [ ] Use environment-based DI registration to switch between local and Azure OpenAI - [ ] For production, test that your code works with both backends before deploying --- ### Securing Azure OpenAI in .NET: RBAC, Key Vault & PII Defense - **URL:** https://www.dotnetstudioai.com/university/securing-ai-applications-dotnet/ - **Description:** Production security for .NET AI apps: Key Vault for secrets, PII redaction middleware, content filtering, and prompt injection defense patterns with code. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** AI Security, Azure Key Vault, Prompt Injection, Content Filtering, .NET AI **Technical Summary:** This article covers production security practices for .NET AI applications. Topics include secret management with Azure Key Vault and User Secrets, PII handling to avoid sending sensitive data to external APIs, Azure OpenAI content filtering, prompt injection attacks and defenses, rate limiting AI endpoints, OpenTelemetry observability with gen_ai conventions, audit trails, and responsible AI engineering practices. Each section includes concrete C# code examples. **Key Takeaways:** - Never hardcode API keys — use Azure Key Vault or User Secrets - Use DefaultAzureCredential for passwordless Azure OpenAI authentication - Sanitize and validate user input before including it in prompts - Azure OpenAI content filters run automatically but can be customized - Implement rate limiting on your own AI endpoints, not just relying on service limits - Use OpenTelemetry gen_ai conventions for AI-specific observability - Strip PII from prompts before sending to external AI services - Validate AI model outputs before executing any actions they suggest **Implementation Steps:** - [ ] Move all API keys to Azure Key Vault or User Secrets - [ ] Implement DefaultAzureCredential for Azure-hosted services - [ ] Add input sanitization middleware for AI-facing endpoints - [ ] Configure Azure OpenAI content filtering in Azure AI Foundry - [ ] Implement rate limiting with fixed window or token bucket - [ ] Set up OpenTelemetry with gen_ai semantic conventions - [ ] Add structured logging for all AI service interactions - [ ] Create PII detection and redaction pipeline - [ ] Build audit trail for AI decisions that affect users --- ### Semantic Kernel Architecture in C# — Deep Dive (2026) - **URL:** https://www.dotnetstudioai.com/university/semantic-kernel-architecture-deep-dive/ - **Description:** Inside Semantic Kernel's request pipeline in C# — Kernel lifecycle, plugin resolution, filter chain, and DI patterns for .NET 10 developers. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Semantic Kernel, AI Agents, Architecture, .NET 10, Azure OpenAI **Technical Summary:** This article explains the internal architecture of Microsoft Semantic Kernel for .NET developers. It covers the Kernel object lifecycle, plugin system, semantic and native functions, modern orchestration patterns, memory connectors, and the request pipeline. Developers will understand how to structure AI applications using SK's abstractions without relying on deprecated planner-first designs. **Key Takeaways:** - The Kernel is the central orchestrator — register services, plugins, and filters through it - Plugins contain functions (semantic or native) that the AI can invoke - Modern SK orchestration relies on functions, filters, and agent integrations instead of planner-first designs - Memory connectors enable RAG patterns with vector stores - The pipeline supports filters for logging, auth, and retry logic **Implementation Steps:** - [ ] Install Microsoft.SemanticKernel NuGet package - [ ] Configure Kernel with Azure OpenAI or OpenAI connector - [ ] Create at least one plugin with native functions - [ ] Register the kernel in your DI container as a singleton - [ ] Add error handling for AI service rate limits - [ ] Implement logging filters for observability --- ### Semantic Kernel ChatHistory: C# Token Fix - **URL:** https://www.dotnetstudioai.com/university/semantic-kernel-chat-history-management-csharp/ - **Description:** Manage Semantic Kernel ChatHistory in C#. Use sliding windows, summarization, token-aware truncation, and Cosmos DB persistence. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Semantic Kernel, Chat History, Token Management, ChatHistory, .NET AI **Technical Summary:** This article covers four production patterns for managing Semantic Kernel ChatHistory growth in C# .NET 10 applications: sliding window truncation, GPT-5.4-mini summarization, token-aware truncation using Microsoft.ML.Tokenizers 0.22.0, and a hybrid approach combining summarization with recency windows. It also covers serializing ChatHistory to Cosmos DB or Redis for multi-user ASP.NET Core persistence. **Key Takeaways:** - ChatHistory inherits from List — RemoveAt() and RemoveRange() work natively - Sliding window is the simplest strategy but loses long-range context; summarization preserves it at the cost of an extra LLM call - Token-aware truncation with TiktokenTokenizer is the most accurate way to stay within model limits - The hybrid pattern (summarize every 20 turns, keep last 5) gives the best coherence/cost tradeoff for production chatbots - Serialize ChatHistory with JsonSerializer.Serialize(chatHistory.ToList()) for persistence in Redis or Cosmos DB **Implementation Steps:** - [ ] Install Microsoft.SemanticKernel 1.54.0 and Microsoft.ML.Tokenizers 0.22.0 - [ ] Initialize ChatHistory with a system prompt: new ChatHistory("system prompt") - [ ] Choose a truncation strategy based on your coherence requirements and token budget - [ ] Implement token counting using TiktokenTokenizer.CreateForModel("gpt-5.4-mini") - [ ] Add a persistent store (Redis or Cosmos DB) for multi-request chat sessions - [ ] Register ChatHistory as Scoped in ASP.NET Core DI, keyed by session ID - [ ] Test that the system message is always preserved at index 0 after any truncation - [ ] Monitor average token count per session in production to tune window sizes --- ### Semantic Kernel Filters: Add Caching, Logging & Safety to AI Calls in C# - **URL:** https://www.dotnetstudioai.com/university/semantic-kernel-filters-middleware-csharp/ - **Description:** Implement IFunctionInvocationFilter, IPromptRenderFilter, and IAutoFunctionInvocationFilter in C#. Cache AI responses, log token usage, detect prompt injection. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Semantic Kernel, Filters, Middleware, IFunctionInvocationFilter, .NET AI **Technical Summary:** Semantic Kernel has three filter types: IFunctionInvocationFilter (wraps all function calls), IPromptRenderFilter (wraps prompt rendering), and IAutoFunctionInvocationFilter (wraps auto-invoked tool calls). Register filters via DI with services.AddSingleton() and AddKernel(). Common patterns: caching (short-circuit with context.Result), structured logging (log before/after next()), content safety (call safety API before next()), and token usage tracking (read context.Result.Metadata after next()). **Key Takeaways:** - Three filter types: IFunctionInvocationFilter, IPromptRenderFilter, IAutoFunctionInvocationFilter - Short-circuit execution: set context.Result and return WITHOUT calling next(context) - Register via DI: services.AddSingleton() - Filters run in registration order (before) and reverse order (after) - IPromptRenderFilter can read and modify context.RenderedPrompt before model call **Implementation Steps:** - [ ] Choose the right filter type for your use case (function vs prompt render vs auto-invoke) - [ ] Register filters via DI for constructor injection support - [ ] For caching: check cache before next(context), set context.Result to skip execution - [ ] For logging: log before and after next(context) to capture args and result - [ ] For content safety: call safety API before next(context), throw if flagged - [ ] Test filter ordering by registering filters in different sequences --- ### Semantic Kernel Memory + Vector Stores: Azure AI Search & Cosmos DB in C# - **URL:** https://www.dotnetstudioai.com/university/semantic-kernel-memory-vector-stores-csharp/ - **Description:** Connect Semantic Kernel to Azure AI Search and Cosmos DB for RAG. Three memory levels, embedding setup, and vector store connectors in C#. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Semantic Kernel, Vector Store, Memory, RAG, Azure AI Search **Technical Summary:** Guide to Semantic Kernel memory system in C#. Covers three memory levels (working, short-term, long-term), vector store connectors for Azure AI Search and Cosmos DB, embedding generation, and RAG implementation patterns. **Key Takeaways:** - Working memory = ChatHistory (current conversation context) - Short-term memory = serialized chat history in session store - Long-term memory = vector stores with embedding search - Azure AI Search and Cosmos DB are the primary Azure vector store options - Use ITextEmbeddingGenerationService for converting text to vectors **Implementation Steps:** - [ ] Choose a vector store connector (Azure AI Search, Cosmos DB, or in-memory) - [ ] Configure an embedding model (Azure OpenAI text-embedding-3-small) - [ ] Define a data model with VectorStoreRecordKey and VectorStoreRecordVector attributes - [ ] Implement upsert for adding documents to the store - [ ] Implement search for retrieving relevant context before LLM calls --- ### Semantic Kernel Planners Deprecated: C# Fix - **URL:** https://www.dotnetstudioai.com/university/semantic-kernel-planners-deprecated-migration-function-calling/ - **Description:** Migrate deprecated Semantic Kernel planners to FunctionChoiceBehavior.Auto in C#. Includes before/after code, filters, and circuit breaking. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Semantic Kernel, Planners Deprecated, Function Calling, Migration, .NET AI **Technical Summary:** SK's HandlebarsPlanner and FunctionCallingStepwisePlanner are deprecated in SK 1.x. Migrate to Auto Function Calling by setting FunctionChoiceBehavior.Auto() in OpenAIPromptExecutionSettings. The model iteratively calls registered [KernelFunction] plugins without an upfront plan. Use IAutoFunctionInvocationFilter to observe which functions are called. Adopt Agent Framework (ChatCompletionAgent) only when you need autonomous multi-step loops, not as a direct planner replacement. **Key Takeaways:** - Planners are deprecated — migrate now to avoid a future breaking change in SK 2.x - FunctionChoiceBehavior.Auto() is the direct replacement for both planner types - Plugins decorated with [KernelFunction] work identically — no changes needed - IAutoFunctionInvocationFilter provides observability into which functions run - Agent Framework is NOT the direct planner replacement — it adds autonomous loops and multi-agent **Implementation Steps:** - [ ] Remove HandlebarsPlanner and FunctionCallingStepwisePlanner usages - [ ] Set FunctionChoiceBehavior.Auto() in OpenAIPromptExecutionSettings - [ ] Keep all [KernelFunction] plugins unchanged — they work with Auto Function Calling - [ ] Add IAutoFunctionInvocationFilter for observability - [ ] Test with representative queries to ensure function selection matches expected behavior - [ ] Consider ChatCompletionAgent only if you need persistent agent state or multi-agent --- ### Semantic Kernel Plugins in C#: Tool Calling - **URL:** https://www.dotnetstudioai.com/university/semantic-kernel-plugins-reusable-ai-tools-csharp/ - **Description:** Build Semantic Kernel plugins in C# with KernelFunction, DI, and auto function calling. Turn your methods into reusable AI tools. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Semantic Kernel, Plugins, KernelFunction, .NET AI, Function Calling **Technical Summary:** Semantic Kernel plugins are C# classes with methods exposed to the LLM via [KernelFunction] and [Description] attributes. Plugins support DI, async operations, and complex return types. They're the primary extensibility mechanism in both SK and Agent Framework. Design plugins as focused tools with clear descriptions for reliable tool selection. **Key Takeaways:** - Decorate methods with [KernelFunction] and [Description] to expose them to the LLM - Descriptions are critical — the LLM uses them to decide when to call your function - Plugins support constructor DI for accessing services - Group related functions in one plugin class (3-7 functions per plugin) - Plugins work in both Semantic Kernel and Microsoft Agent Framework **Implementation Steps:** - [ ] Create a C# class with public methods for each tool - [ ] Add [KernelFunction] attribute with a snake_case name - [ ] Add [Description] attributes to methods and parameters - [ ] Register the plugin with kernel.Plugins.AddFromType() - [ ] Enable FunctionChoiceBehavior.Auto() for automatic invocation - [ ] Test with varied prompts to verify description quality --- ### Semantic Kernel Streaming in C#: Token Fix - **URL:** https://www.dotnetstudioai.com/university/semantic-kernel-streaming-csharp/ - **Description:** Stream Semantic Kernel responses in C#. Compare streaming APIs, track tokens, handle content filters, and wire Blazor Server streaming. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Semantic Kernel, Streaming, InvokeStreamingAsync, Real-Time, .NET AI **Technical Summary:** Semantic Kernel streaming in C# uses GetStreamingChatMessageContentsAsync on IChatCompletionService to return IAsyncEnumerable, or InvokeStreamingAsync on the Kernel for prompt-template functions. Token usage metadata is null during streaming in SK 1.x — workaround by accumulating text and counting with TiktokenTokenizer post-stream. Content filter silent failures stop the stream abruptly without exceptions; detect via FinishReason on the last chunk. Auto function calling works transparently inside the streaming loop. Blazor Server streaming requires await InvokeAsync(StateHasChanged) for thread-safe UI updates. Wrap all streaming loops in try/catch for ClientResultException and OperationCanceledException. **Key Takeaways:** - Use GetStreamingChatMessageContentsAsync on IChatCompletionService for direct chat streaming — simpler than InvokeStreamingAsync for ChatHistory-based conversations - Token usage metadata (FunctionResult.Metadata["Usage"]) is null during streaming in SK 1.x — count tokens client-side post-stream with TiktokenTokenizer - Content filter silent failures terminate the stream abruptly; detect via StreamingChatMessageContent.FinishReason on the final chunk and use a timeout CancellationTokenSource as backup - FunctionChoiceBehavior.Auto() enables transparent tool call interception mid-stream — no dispatch code required - Blazor Server streaming requires await InvokeAsync(StateHasChanged) — never call StateHasChanged() directly from async streaming loops - Catch ClientResultException for API-level errors and OperationCanceledException for timeouts; display partial accumulated response on mid-stream failure **Implementation Steps:** - [ ] Resolve IChatCompletionService from kernel.Services.GetRequiredService() - [ ] Call GetStreamingChatMessageContentsAsync with ChatHistory, OpenAIPromptExecutionSettings, and the Kernel - [ ] Null-check chunk.Content before appending to StringBuilder accumulator - [ ] After stream completes, create a tokenizer for your configured model family and count tokens on the accumulated response - [ ] Check final chunk FinishReason for 'content_filter' to detect silent stream termination - [ ] Set FunctionChoiceBehavior.Auto() in execution settings to enable automatic tool call handling mid-stream - [ ] In Blazor Server, use await InvokeAsync(StateHasChanged) inside the streaming loop - [ ] Wrap streaming loop in try/catch for ClientResultException and OperationCanceledException; display partial response on failure --- ### Semantic Kernel vs LangChain for .NET - **URL:** https://www.dotnetstudioai.com/university/semantic-kernel-vs-langchain-dotnet-guide/ - **Description:** Compare Semantic Kernel and LangChain for C# developers: architecture, DI, Azure integration, tool calling, and Agent Framework path. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Semantic Kernel, LangChain, .NET AI, Comparison, AI Framework **Technical Summary:** For .NET developers, Semantic Kernel is the clear choice over LangChain. SK provides native .NET support (async, DI, NuGet), direct Azure OpenAI integration, and an upgrade path to Microsoft Agent Framework. LangChain is Python-first — using it from .NET adds complexity without benefits. SK and LangChain share the same core concepts (plugins/tools, memory, chains/plans) but SK implements them idiomatically for .NET. **Key Takeaways:** - Semantic Kernel is the .NET-native choice; LangChain is Python-first - Core concepts map: LangChain tools → SK plugins, chains → planning, vectorstores → memory - SK integrates natively with Azure OpenAI, DI, and the .NET ecosystem - SK has a clear upgrade path to Agent Framework; LangChain has LangGraph - For mixed Python/.NET teams, use each in its native ecosystem — don't bridge them **Implementation Steps:** - [ ] Evaluate team expertise: .NET → SK, Python → LangChain - [ ] Check integration needs: Azure-first → SK, AWS-first → either - [ ] Consider future path: agents needed → SK + Agent Framework - [ ] Review ecosystem: NuGet packages → SK, pip packages → LangChain --- ### Semantic Kernel vs Microsoft Agent Framework — Which for .NET in 2026? - **URL:** https://www.dotnetstudioai.com/university/semantic-kernel-vs-microsoft-agent-framework/ - **Description:** Comprehensive 2026 architectural comparison: Semantic Kernel vs Microsoft Agent Framework 1.0 GA. Understand how the two frameworks work together in C#. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Semantic Kernel, Microsoft Agent Framework, Architecture, .NET AI, AI Agents, Comparison, .NET 10 **Technical Summary:** In 2026, Semantic Kernel and Microsoft Agent Framework are complementary, not competing. Semantic Kernel acts as the foundational model connection and plugin orchestration layer, while Microsoft Agent Framework 1.0 GA provides the multi-agent coordination, checkpointed state graphs, and autonomous workflow engine. Enterprise .NET teams build plugins with SK and orchestrate multi-agent collaboration with MAF. **Key Takeaways:** - Semantic Kernel = Model, Plugin, and Vector Memory Infrastructure layer - Microsoft Agent Framework = Multi-Agent, Graph Workflow, and Checkpointing layer - MAF 1.0 GA unifies AutoGen's multi-agent patterns with enterprise .NET type safety - Semantic Kernel plugins seamlessly convert into MAF agent tools - Both frameworks share the unified Microsoft.Extensions.AI foundation **Implementation Steps:** - [ ] Evaluate application requirements: single-turn prompt vs multi-agent state graph - [ ] Use Semantic Kernel for plugin development, embedding generation, and vector RAG - [ ] Use Microsoft Agent Framework when modeling multi-role agent collaboration - [ ] Reference Microsoft.SemanticKernel 1.54.0 and Microsoft.Agents.AI 1.0.0 together - [ ] Leverage Microsoft.Extensions.AI for cloud-agnostic model swapping --- ### Vector Databases for .NET Compared - **URL:** https://www.dotnetstudioai.com/university/vector-database-comparison-dotnet-csharp/ - **Description:** Compare Cosmos DB, Azure AI Search, Qdrant, pgvector, and SQL Server for .NET RAG apps. Includes C# and Semantic Kernel guidance. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Vector Database, Qdrant, Cosmos DB, Azure AI Search, .NET AI, RAG **Technical Summary:** For .NET developers, Azure AI Search is the most mature vector store option with full Microsoft backing and hybrid search (BM25 + vector). Qdrant is the best local dev story with Docker and a stable SK connector. Cosmos DB NoSQL is ideal if your app already uses Cosmos. pgvector is the natural choice for PostgreSQL teams. SQL Server 2025 adds native vector columns for pure Microsoft-stack teams. All are accessible via Microsoft.Extensions.VectorData's IVectorStore abstraction. **Key Takeaways:** - Use Microsoft.Extensions.VectorData IVectorStore to write provider-agnostic vector code - Azure AI Search: best for hybrid search (BM25 + vector) and production at scale - Qdrant: best local dev story, rich filter API, stable SK connector - pgvector: best for PostgreSQL teams — no new infrastructure required - SQL Server 2025: best for pure Microsoft-stack teams with existing SQL Server - Avoid Weaviate SK connector in production — known stability issues in .NET **Implementation Steps:** - [ ] Decide on your primary vector store based on team familiarity and hosting constraints - [ ] Add Microsoft.Extensions.VectorData package for provider-agnostic abstractions - [ ] Add provider-specific SK connector package - [ ] Define your record model with VectorStoreRecordKey, VectorStoreRecordData, and VectorStoreRecordVector attributes - [ ] Register the vector store in DI using the provider-specific AddX method - [ ] Generate embeddings with your text-embedding model before indexing --- ### Generative AI for .NET Developers - **URL:** https://www.dotnetstudioai.com/university/what-is-generative-ai-dotnet-developers/ - **Description:** Learn generative AI for .NET: LLMs, tokens, embeddings, Semantic Kernel, Microsoft.Extensions.AI, ML.NET, and ONNX in C#. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Generative AI, LLMs, .NET AI, Machine Learning, AI Fundamentals **Technical Summary:** This article provides .NET developers with a foundational understanding of generative AI, covering the engineering distinctions between machine learning, deep learning, and large language models. It explains transformer architecture, tokenization, context windows, and embeddings at a conceptual level, then maps the complete .NET AI ecosystem — Microsoft.Extensions.AI, Semantic Kernel, ML.NET, ONNX Runtime — showing when and why to use each tool. **Key Takeaways:** - Generative AI models predict outputs from learned patterns — they do not follow hardcoded rules - Transformers use self-attention to process all tokens in parallel, enabling the scale behind modern LLMs - Tokens are the fundamental unit LLMs operate on — not words, not characters - Microsoft.Extensions.AI is the unified abstraction; Semantic Kernel is the orchestration layer - .NET has first-class AI support — Python is not required to build production AI applications **Implementation Steps:** - [ ] Understand the ML → deep learning → LLM hierarchy - [ ] Learn what tokens, context windows, and embeddings represent - [ ] Identify which .NET AI library fits your use case - [ ] Explore Microsoft.Extensions.AI for basic LLM integration - [ ] Move to Semantic Kernel when you need orchestration, plugins, or agents --- ### What Is ML.NET? Machine Learning in C# for .NET Developers - **URL:** https://www.dotnetstudioai.com/university/what-is-mlnet-machine-learning-dotnet/ - **Description:** Understand ML.NET in plain terms: what it is, when to use machine learning in C#, and how it compares with Azure OpenAI and Semantic Kernel. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** ML.NET, Machine Learning, .NET AI, Classification, Predictive AI **Technical Summary:** ML.NET is Microsoft's open-source machine learning framework for .NET. It handles predictive ML tasks: classification, regression, forecasting, clustering, anomaly detection. It runs on-device without cloud dependencies. ML.NET complements generative AI (Azure OpenAI/Semantic Kernel) — use ML.NET for structured predictions, generative AI for text/reasoning. **Key Takeaways:** - ML.NET = predictive ML in .NET (classification, regression, forecasting) - Runs on-device — no cloud API, no cost per prediction - Pipeline model: load data → transform → train → evaluate → predict - Complements generative AI — different problems, not competing - Supports custom models and ONNX model import **Implementation Steps:** - [ ] Install Microsoft.ML NuGet package - [ ] Define input/output data classes - [ ] Create an MLContext - [ ] Build a pipeline: data loading → transforms → trainer - [ ] Train the model and evaluate metrics - [ ] Use PredictionEngine for inference --- ### What Is Semantic Kernel? C# Guide - **URL:** https://www.dotnetstudioai.com/university/what-is-semantic-kernel-dotnet-guide/ - **Description:** Understand Semantic Kernel for .NET: what it does, when to use it, and how C# developers build plugins, memory, and tool calling. - **Category:** university - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Semantic Kernel, .NET AI, Azure OpenAI, AI Orchestration, Getting Started **Technical Summary:** Semantic Kernel is Microsoft's open-source AI orchestration SDK for .NET. It provides plugins (reusable AI tools), memory (vector store integration), and planning (multi-step AI workflows) for C# applications. In the 2026 Microsoft AI stack, SK sits above Microsoft.Extensions.AI and serves as the infrastructure foundation for Microsoft Agent Framework 1.0 GA. SK is the right choice for most .NET AI integration scenarios; Agent Framework extends it for autonomous multi-agent systems. **Key Takeaways:** - Semantic Kernel is Microsoft's AI orchestration SDK for .NET — open source, MIT licensed - Core concepts: Kernel (central hub), Plugins (tools), Memory (vector stores), Functions (callable units) - SK serves as the orchestration foundation between Microsoft.Extensions.AI and Microsoft Agent Framework 1.0 GA - Works with Microsoft Foundry, Azure OpenAI, OpenAI, Ollama, and any IChatClient-compatible provider - Plugins written for SK transfer directly to Microsoft Agent Framework **Implementation Steps:** - [ ] Install Microsoft.SemanticKernel NuGet package - [ ] Create a Kernel instance with AI model configuration - [ ] Add plugins using KernelFunction attribute - [ ] Enable automatic function calling for tool use - [ ] Connect memory for persistent context (optional) --- ================================================================================ ## PILLAR: /HOSPITAL/ ================================================================================ ### Fix Azure OpenAI 401 Unauthorized & API Key Errors in C# - **URL:** https://www.dotnetstudioai.com/hospital/fix-401-unauthorized-azure-openai-api-key/ - **Description:** Fix Azure OpenAI 401 Unauthorized in .NET. Check API key, endpoint, DefaultAzureCredential, RBAC role, and common config mistakes. - **Category:** hospital - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Azure OpenAI, 401 Unauthorized, Authentication, API Key, DefaultAzureCredential **Technical Summary:** The 401 Unauthorized error from Azure OpenAI in .NET is caused by authentication failures — wrong API key, wrong endpoint URL, wrong deployment name, missing RBAC role (Cognitive Services OpenAI User), or DefaultAzureCredential misconfiguration. Fix by verifying the key and endpoint match the Azure portal values, ensuring the correct RBAC role is assigned for token-based auth, and confirming the deployment name (not model name) is used in requests. **Key Takeaways:** - Always copy the API key from the Azure portal Keys and Endpoint blade — do not guess or reuse keys from other resources - The endpoint must include the full URL with https:// and the .openai.azure.com domain - DefaultAzureCredential requires the Cognitive Services OpenAI User RBAC role on the resource - Deployment name and model name are different — Azure OpenAI expects the deployment name - Rotate keys periodically and use managed identity in production to avoid key leakage **Implementation Steps:** - [ ] Verify API key matches the Azure portal Keys and Endpoint blade - [ ] Confirm endpoint URL format: https://{resource-name}.openai.azure.com/ - [ ] Check deployment name matches exactly (case-sensitive) - [ ] For RBAC auth, assign Cognitive Services OpenAI User role to the identity - [ ] Test with a minimal curl or REST call to isolate SDK issues from auth issues - [ ] Store keys in Azure Key Vault or user-secrets — never hardcode --- ### Fix Azure OpenAI 429 Too Many Requests in C#: Polly Retry & Circuit Breaker - **URL:** https://www.dotnetstudioai.com/hospital/fix-429-rate-limit-exceeded-azure-openai-dotnet/ - **Description:** Instantly fix Azure OpenAI 429 Too Many Requests in C#. Exact code fix for Polly exponential backoff, circuit breaker, and retry storm prevention. Verified October 2026. - **Category:** hospital - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Azure OpenAI, 429 Rate Limit, Retry Logic, Polly, .NET AI **Technical Summary:** The 429 Rate Limit Exceeded error from Azure OpenAI occurs when TPM or RPM quotas are exceeded. In .NET, handle this with the SDK's built-in retry logic (configurable via AzureOpenAIClientOptions), custom Polly resilience pipelines for advanced backoff, or by implementing request queuing and response caching. Monitor token usage per request, request quota increases when needed, and distribute load across multiple deployments for high-throughput scenarios. **Key Takeaways:** - Azure OpenAI enforces both TPM (tokens per minute) and RPM (requests per minute) quotas per deployment - The Azure SDK has built-in retry with exponential backoff — configure MaxRetries and Delay in AzureOpenAIClientOptions - Polly resilience pipelines give finer control over retry timing, circuit breaking, and timeout handling - Cache repeated prompts and batch requests where possible to reduce quota consumption - Monitor the Retry-After header in 429 responses for the exact wait time **Implementation Steps:** - [ ] Check current TPM and RPM quota in Azure portal Quotas blade - [ ] Configure SDK retry options appropriate for your workload - [ ] Implement response caching for repeated or similar prompts - [ ] Add circuit breaker logic for sustained rate limiting - [ ] Request quota increase if current limits are insufficient - [ ] Consider multiple deployments or regions for load distribution --- ### Fix Azure OpenAI 503 Service Unavailable — Retry + Circuit Breaker + Failover - **URL:** https://www.dotnetstudioai.com/hospital/fix-503-service-unavailable-azure-openai-dotnet/ - **Description:** Azure OpenAI returning 503? Production-grade fix: Polly v8 retry, circuit breaker, and multi-region failover. C# code for .NET 10. - **Category:** hospital - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Azure OpenAI, Error Fix, .NET, Resilience, Retry Policy **Technical Summary:** Azure OpenAI 503 errors in .NET have two causes: transient overload (retry with backoff) or misconfigured endpoints (fix configuration). Use Microsoft.Extensions.Http.Resilience for production retry policies with exponential backoff and jitter. For high-availability systems, deploy models in multiple Azure regions and implement circuit breaker failover. **Key Takeaways:** - 503 errors mean the service is temporarily unavailable — always retry with exponential backoff - Default Azure SDK retries are too fast for 503 — customize delay and jitter settings - Use Microsoft.Extensions.Http.Resilience for production-grade retry pipelines - Multi-region deployment with circuit breaker failover is the best reliability strategy - Check Azure status page and Application Insights to distinguish transient vs systemic issues **Implementation Steps:** - [ ] Verify endpoint URL matches your Azure OpenAI resource exactly - [ ] Confirm region is correct in endpoint URL - [ ] Add exponential backoff retry policy with jitter - [ ] Set MaxRetries to 3-5 and MaxDelay to 30 seconds - [ ] Consider multi-region failover for production workloads - [ ] Monitor retry rates in Application Insights --- ### Azure AI Search 429 and Indexing Fix - **URL:** https://www.dotnetstudioai.com/hospital/fix-azure-ai-search-429-indexing-errors-dotnet/ - **Description:** Fix Azure AI Search 429 throttling, index-not-found, and field mapping errors in .NET. Includes retry and indexing patterns in C#. - **Category:** hospital - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Azure AI Search, Error Handling, .NET AI, Troubleshooting, Rate Limiting **Technical Summary:** Troubleshooting guide for the three most common Azure AI Search errors in .NET: HTTP 429 throttling, index-not-found errors, and field mapping mismatches during indexing. Provides root causes, code fixes, and prevention strategies for each. **Key Takeaways:** - 429 errors mean you've exceeded QPS limits for your Azure AI Search tier - Configure SearchClientOptions retry policy for automatic 429 handling - Index-not-found: verify index name, service endpoint, and creation timing - Field mapping errors: C# property names must match index field names (case-sensitive) - Use SearchIndexClient.GetIndexAsync() to validate index exists before querying **Implementation Steps:** - [ ] Check Azure AI Search tier QPS limits against your request volume - [ ] Configure retry policies on SearchClientOptions - [ ] Verify index name matches exactly (case-sensitive) - [ ] Verify SearchClient points to correct Azure AI Search endpoint - [ ] Ensure C# model properties match index field definitions --- ### Fix Azure OpenAI 400 content_filter Error in C# (.NET) - **URL:** https://www.dotnetstudioai.com/hospital/fix-azure-openai-content-filter-error-csharp/ - **Description:** Fix Azure OpenAI content_filter errors in C#. Decode 400 responses, adjust prompts and policies, and catch streaming filter failures. - **Category:** hospital - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Azure OpenAI, Content Filter, Error Fix, .NET AI, Responsible AI **Technical Summary:** Azure OpenAI returns a 400 content_filter error when input or output violates configured content management policies. In C#, catch ClientResultException from Azure.Core and parse ex.GetRawResponse()?.Content.ToString() to read category-level filter details. Configure policies in Azure AI Foundry. For SK streaming, the stream stops silently on content filter — check FinishReason on each chunk. Pre-screen prompts with Azure AI Content Safety to provide better UX. **Key Takeaways:** - Content filter errors return HTTP 400 with error code 'content_filter' — not a 5xx error - Parse ex.GetRawResponse()?.Content.ToString() to read per-category severity details - Configure content filter policies per-deployment in Azure AI Foundry Safety + Security - SK streaming stops silently on content filter — always check FinishReason on each chunk - Pre-screen with Azure AI Content Safety SDK for better user-facing error messages **Implementation Steps:** - [ ] Catch ClientResultException with Status == 400 and check for 'content_filter' error code in JSON - [ ] Log the full raw response body to understand which category triggered the block - [ ] Review your Azure AI Foundry content filter policy and adjust thresholds if legitimate prompts are blocked - [ ] Add Azure AI Content Safety pre-screening for user-generated input - [ ] Add FinishReason.ContentFilter detection to all SK streaming loops - [ ] Test with controlled prompts that trigger each filter category in your development environment --- ### Fix context_length_exceeded in Azure OpenAI C# (.NET 8/10) - **URL:** https://www.dotnetstudioai.com/hospital/fix-azure-openai-context-length-exceeded-csharp/ - **Description:** Fix context_length_exceeded in Azure OpenAI C#. Count tokens, trim ChatHistory, use sliding windows, and prevent RAG prompt overflow. - **Category:** hospital - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Azure OpenAI, Context Length, Token Limit, Error Fix, .NET AI **Technical Summary:** Context length exceeded errors occur when total input tokens (system prompt + history + user message + tools) exceed the model's context window. Fix by counting tokens with Microsoft.ML.Tokenizers before sending, implementing a sliding window to trim old chat history, summarizing old turns with GPT-4o-mini, or using a token budget IFunctionInvocationFilter. For RAG, keep chunks at 512 tokens with max 5 retrieved chunks. **Key Takeaways:** - HTTP 400 context_length_exceeded means total input tokens exceeded the model window - ChatHistory.RemoveRange(1, count) trims old messages — always keep index 0 (system) - Summarization with GPT-4o-mini preserves context while reducing token count by 80-90% - RAG chunk size: 512 tokens, max 5 chunks retrieved, 50-token overlap - Tool schemas consume tokens invisibly — account for 200-500 tokens per plugin **Implementation Steps:** - [ ] Count tokens before sending with Microsoft.ML.Tokenizers - [ ] Implement sliding window ChatHistory.RemoveRange(1, removeCount) - [ ] Add summarization fallback when message count exceeds threshold - [ ] Log InputTokenCount after each call to track trend toward limit - [ ] Adjust RAG chunk size to 512 tokens and limit to 5 retrieved chunks - [ ] Account for tool schema tokens when using Auto Function Calling --- ### Fix Azure OpenAI Structured Output 400 Errors in C# (Schema + API Version) - **URL:** https://www.dotnetstudioai.com/hospital/fix-azure-openai-structured-output-json-schema-errors-csharp/ - **Description:** Getting 400 from structured outputs? Fix API version mismatch, unsupported DateTime/Uri types, and model incompatibility. C# code fixes for Azure.AI.OpenAI 2.1.0. - **Category:** hospital - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Structured Output, JSON Schema, Error Fix, Azure OpenAI, .NET AI **Technical Summary:** Azure OpenAI structured output 400 errors have three causes: wrong API version (need 2024-08-01-preview or later), unsupported property types (DateTime/Uri/TimeSpan must become string), or using a non-GPT-4o model. Fix by setting the correct API version in AzureOpenAIClientOptions, replacing DateTime with string properties, and verifying your deployment uses GPT-4o 2024-08-06 or later. **Key Takeaways:** - Structured outputs need API version 2024-08-01-preview or later - Replace DateTime, DateTimeOffset, Uri, TimeSpan with string in your schema types - Only GPT-4o and GPT-4o-mini support structured outputs — not GPT-4 Turbo - ChatResponseFormat.CreateJsonSchemaFormat(strict: true) is the correct SDK call - Use JsonSchemaExporter.GetJsonSchemaAsNode to validate schemas locally before sending **Implementation Steps:** - [ ] Set AzureOpenAIClientOptions.ServiceVersion to V2024_08_01_Preview or later - [ ] Replace DateTime/Uri/TimeSpan properties with string in your response type - [ ] Confirm your deployment uses GPT-4o (2024-08-06 version) or GPT-4o-mini - [ ] Use ChatResponseFormat.CreateJsonSchemaFormat(strict: true) in ChatCompletionOptions - [ ] Validate schema locally with JsonSchemaExporter before sending --- ### Fix CS8032 'An Instance of Analyzer Cannot Be Created' in .NET 8+ - **URL:** https://www.dotnetstudioai.com/hospital/fix-cs8032-analyzer-cannot-be-created-dotnet/ - **Description:** Resolve CS8032 analyzer errors in .NET 8/9 builds. Root causes: version mismatches, missing dependencies, and broken Roslyn analyzer packages. Quick fix inside. - **Category:** hospital - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** CS8032, Roslyn Analyzers, .NET 8+, Build Errors, Debugging **Technical Summary:** CS8032 'An instance of analyzer cannot be created' in .NET 8+ is caused by Roslyn analyzer version mismatches. Fix by updating analyzer packages, using PackageReference version overrides, or suppressing the warning for specific analyzers. **Key Takeaways:** - CS8032 is caused by analyzer packages targeting older Roslyn API versions - Update all analyzer NuGet packages to their latest versions first - Use NoWarn for non-critical analyzers that haven't been updated yet - Check GitHub Issues for the specific analyzer package for compatibility fixes **Implementation Steps:** - [ ] Identify which analyzer package triggers CS8032 from build output - [ ] Update the analyzer NuGet package to latest version - [ ] If no update available, add NoWarn suppression - [ ] Verify build succeeds without the warning - [ ] Monitor analyzer package for .NET 8+-compatible release --- ### Fix DeploymentNotFound 404 in Azure OpenAI .NET SDK (C#) - **URL:** https://www.dotnetstudioai.com/hospital/fix-deployment-not-found-azure-openai-dotnet/ - **Description:** Fix DeploymentNotFound 404 in Azure OpenAI .NET. Use the deployment name, correct endpoint, API version, and C# configuration. - **Category:** hospital - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Azure OpenAI, Error Fix, .NET, Deployment, Configuration **Technical Summary:** Azure OpenAI DeploymentNotFound errors occur when the deployment name in code doesn't match the actual deployment. Common causes: using model name instead of deployment name, wrong region in endpoint URL, or API version mismatch. Fix by verifying the exact deployment name in Azure Portal and ensuring the endpoint URL matches your resource. **Key Takeaways:** - Deployment name ≠ model name in Azure OpenAI — use the deployment name in code - Find the correct deployment name in Azure Portal under Model deployments - Verify the endpoint URL includes the correct resource name and region - Check API version compatibility with your deployed model **Implementation Steps:** - [ ] Verify deployment name matches Azure Portal exactly (case-sensitive) - [ ] Confirm endpoint URL has correct resource name - [ ] Check that the region in the endpoint matches where you deployed - [ ] Ensure API version supports your model type - [ ] Test with the diagnostic snippet below --- ### Azure AI Search Vector Dimension Mismatch Fix - **URL:** https://www.dotnetstudioai.com/hospital/fix-embedding-dimension-mismatch-azure-ai-search-dotnet/ - **Description:** Fix Azure AI Search embedding dimension errors in C#. Match ada-002 or text-embedding-3 dimensions and reindex without downtime. - **Category:** hospital - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Azure AI Search, Embedding Dimension, Error Fix, RAG, .NET AI **Technical Summary:** Embedding dimension mismatch in Azure AI Search occurs when the vector field's configured dimension differs from the query embedding's dimension. Fix by identifying which embedding model and dimension setting you're using, deleting and recreating the index with the correct dimension, and re-indexing all documents. Use index aliases for zero-downtime migration. Always validate embedding dimensions before indexing with embeddings.Value[0].Vector.Length. **Key Takeaways:** - ada-002 = fixed 1536 dims; text-embedding-3-small = default 1536 (adjustable); text-embedding-3-large = default 3072 (adjustable) - Vector field type must be Collection(Edm.Single) — NOT Collection(Edm.Double) - Index field dimensions cannot be changed in place — must delete and recreate the index - Use index aliases for zero-downtime re-indexing - Validate with embeddings.Value[0].Vector.Length before indexing **Implementation Steps:** - [ ] Identify your embedding model and its configured dimension - [ ] Check VectorSearchField dimensions parameter matches your embedding dimension - [ ] Verify vector field type is Collection(Edm.Single) not Collection(Edm.Double) - [ ] Delete and recreate the index if dimensions are wrong - [ ] Re-index all documents with the correct embedding model and dimension - [ ] Add dimension validation to your indexing pipeline --- ### Fix MCP Server Connection Issues in C#: Stdio vs HTTP Transport Troubleshooting - **URL:** https://www.dotnetstudioai.com/hospital/fix-mcp-server-connection-issues-csharp/ - **Description:** Fix Model Context Protocol (MCP) server connection errors in C#. Solve stdio stdout corruption, HTTP connection refused, and SSE streaming timeouts in .NET. - **Category:** hospital - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** MCP, Model Context Protocol, Error Fix, .NET AI, Hospital, C# SDK **Technical Summary:** Troubleshooting guide for Model Context Protocol (MCP) server connection failures in C#. Covers root cause resolution for stdout stream pollution in stdio transport, container IP binding misconfigurations causing connection refused errors over HTTP, and SSE keep-alive timeout prevention for long-running tool calls in .NET 10. **Key Takeaways:** - Never write application logs to stdout when using MCP stdio transport — redirect to stderr - ASP.NET Core MCP containers must bind to 0.0.0.0 rather than 127.0.0.1 to avoid connection refused - Reverse proxies must have response buffering disabled for Streamable HTTP / SSE transports - Configure client-side HttpClient.Timeout and retry policies with Polly for transient network drops **Implementation Steps:** - [ ] Redirect console logging to stderr: logging.AddConsole(o => o.LogToStandardErrorThreshold = LogLevel.Trace) - [ ] Verify Docker container environment variable: ASPNETCORE_URLS=http://+:5050 - [ ] Configure reverse proxy buffering: proxy_buffering off; proxy_read_timeout 300s; - [ ] Set client timeout: HttpClient.Timeout = TimeSpan.FromMinutes(5) - [ ] Add Polly retry with exponential backoff on MCP client connection attempts --- ### Azure OpenAI Model Not Found: C# Fix - **URL:** https://www.dotnetstudioai.com/hospital/fix-model-not-found-endpoint-errors-azure-openai-dotnet/ - **Description:** Fix Azure OpenAI model_not_found in .NET. Use deployment name, check endpoint and API version, and verify the deployment with Azure CLI. - **Category:** hospital - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Azure OpenAI, Model Not Found, Deployment Errors, Configuration, .NET AI **Technical Summary:** Model not found and deployment errors in Azure OpenAI occur when the deployment name is confused with the model name, the endpoint points to the wrong resource, the API version is incompatible, or the deployment has not finished provisioning. Fix by verifying the exact deployment name from Azure OpenAI Studio or CLI, confirming the endpoint matches the resource that hosts the deployment, and using a supported API version. **Key Takeaways:** - Always use the deployment name (your custom label) — not the model name — when calling Azure OpenAI - Endpoint URL and deployment name must belong to the same Azure OpenAI resource - Use 'az cognitiveservices account deployment list' to verify deployment names and provisioning state - API version mismatches can cause model routing failures — use a supported version for your model **Implementation Steps:** - [ ] Verify deployment name in Azure OpenAI Studio Deployments page - [ ] Confirm endpoint URL matches the resource hosting the deployment - [ ] Check deployment provisioning state is 'Succeeded' - [ ] Validate API version compatibility with the model - [ ] Use Azure CLI to list deployments and confirm configuration --- ### Semantic Kernel NuGet Conflict Fix - **URL:** https://www.dotnetstudioai.com/hospital/fix-nuget-dependency-conflicts-semantic-kernel-azure-ai/ - **Description:** Fix Semantic Kernel and Azure.AI.OpenAI NuGet conflicts. Use compatible 2026 package sets for SK, Azure.AI.OpenAI, OpenAI, and MEAI. - **Category:** hospital - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** NuGet Conflicts, Semantic Kernel, Azure.AI.OpenAI, Assembly Binding, .NET AI **Technical Summary:** NuGet dependency conflicts between Semantic Kernel, Azure.AI.OpenAI, and Microsoft.Extensions.AI occur when transitive dependency versions diverge from directly referenced versions. Diagnose with 'dotnet list package --include-transitive'. Fix by aligning all packages to compatible versions, using explicit PackageReference entries to override transitive versions, and adopting Central Package Management (Directory.Packages.props) to enforce consistency across the solution. **Key Takeaways:** - Semantic Kernel pulls Azure.AI.OpenAI transitively — adding your own direct reference at a different version causes conflicts - Use 'dotnet list package --include-transitive' to diagnose version mismatches - Pin compatible version sets explicitly: SK 1.54.0 + Azure.AI.OpenAI 2.x + Extensions.AI 10.3.0 - Central Package Management (Directory.Packages.props) prevents version drift across multi-project solutions - Check SK release notes for the version compatibility matrix before upgrading any individual package **Implementation Steps:** - [ ] Run dotnet list package --include-transitive to identify conflicting versions - [ ] Check Semantic Kernel release notes for the compatible version matrix - [ ] Add explicit PackageReference entries for transitive packages that conflict - [ ] Adopt Central Package Management with Directory.Packages.props - [ ] Clean and rebuild after version changes: dotnet clean && dotnet build - [ ] Run integration tests to verify runtime binding after version alignment --- ### Ollama Connection Refused in C#: SK Fix - **URL:** https://www.dotnetstudioai.com/hospital/fix-ollama-connection-refused-dotnet-semantic-kernel/ - **Description:** Fix Ollama connection refused in Semantic Kernel .NET. Correct localhost, host.docker.internal, Docker networking, and health checks. - **Category:** hospital - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Ollama, Connection Refused, Error Fix, Semantic Kernel, Local AI, .NET AI **Technical Summary:** Ollama Connection refused errors in .NET have four common causes: Ollama not running (run 'ollama serve'), Docker networking (use host.docker.internal), wrong endpoint URL path (no /v1 for OllamaSharp), or using the deprecated Microsoft.Extensions.AI.Ollama preview package. Fix by verifying Ollama is running, adjusting the endpoint URL for your environment, migrating to OllamaSharp 5.x, and adding a health check. **Key Takeaways:** - Check Ollama is running: ollama list or GET http://localhost:11434/api/tags - Docker: use host.docker.internal:11434 instead of localhost:11434 - OllamaSharp URL: http://localhost:11434 (no /v1). SK URL: http://localhost:11434/v1 - Migrate from deprecated Microsoft.Extensions.AI.Ollama to OllamaSharp 5.x - Add IHealthChecks for Ollama to detect failures before requests reach AI code **Implementation Steps:** - [ ] Run ollama list to verify Ollama is running and models are installed - [ ] Check endpoint URL: OllamaSharp needs http://localhost:11434, SK needs http://localhost:11434/v1 - [ ] For Docker: replace localhost with host.docker.internal - [ ] Uninstall Microsoft.Extensions.AI.Ollama preview package if present - [ ] Install OllamaSharp 5.1.0 and update OllamaApiClient constructor - [ ] Add OllamaHealthCheck to your ASP.NET Core health checks --- ### Semantic Kernel Plugin Errors: C# Fix - **URL:** https://www.dotnetstudioai.com/hospital/fix-semantic-kernel-plugin-function-errors-dotnet/ - **Description:** Fix KernelFunction not found and Semantic Kernel plugin registration errors in C#. Check attributes, AddFromType, DI, and function discovery. - **Category:** hospital - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Semantic Kernel, Plugin Errors, KernelFunction, .NET AI, Debugging **Technical Summary:** Semantic Kernel plugin and function registration errors in .NET are caused by missing [KernelFunction] attributes, non-public methods, incorrect plugin registration calls, unsupported parameter types, or missing [Description] attributes. Fix by ensuring all plugin methods are public, decorated with [KernelFunction], and have [Description] on parameters used in AI function calling. Inspect registered plugins at runtime using kernel.Plugins to verify registration. **Key Takeaways:** - Every plugin method must be public and decorated with [KernelFunction] to be discoverable - Use [Description] on both the method and its parameters — the AI model uses these descriptions for function calling - Register plugins with AddFromType for DI support or AddFromObject for pre-built instances - Inspect kernel.Plugins at runtime to verify what functions are actually registered - Return types must be serializable — avoid returning complex types without JSON serialization support **Implementation Steps:** - [ ] Add [KernelFunction] attribute to every method intended as a kernel function - [ ] Add [Description] attribute to the method and each parameter - [ ] Ensure methods are public (not internal, protected, or private) - [ ] Register the plugin class using the correct AddFrom method - [ ] Verify registration by iterating kernel.Plugins at startup - [ ] Use supported parameter types (primitives, strings, enums) for AI function calling --- ### Fix Semantic Kernel Template HTML-Encoding & Plugin Serialization Errors - **URL:** https://www.dotnetstudioai.com/hospital/fix-semantic-kernel-template-plugin-errors-dotnet/ - **Description:** SK templates encoding your output as HTML? Complex types not serializing? Fix template rendering, KernelException, and breaking changes in SK 1.x. - **Category:** hospital - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Semantic Kernel, Error Handling, .NET AI, Troubleshooting, Templates **Technical Summary:** Troubleshooting guide for Semantic Kernel template and plugin errors. Covers: HTML-encoding breaking change in templates, complex type serialization failures in plugin functions, and KernelException handling patterns. **Key Takeaways:** - SK 1.25+ HTML-encodes template arguments by default - Use PromptTemplateConfig to control encoding behavior - Plugin function parameters must be JSON-serializable - Add JsonConstructor attribute for types with no parameterless constructor - Catch KernelException and inspect InnerException for root cause **Implementation Steps:** - [ ] Check SK version — template encoding behavior changed in 1.25 - [ ] Verify plugin function parameter types are JSON-serializable - [ ] Add error handling around kernel.InvokeAsync calls - [ ] Test templates with special characters (angle brackets, quotes, JSON) - [ ] Use KernelArguments for passing typed data to templates --- ### Fix 'tool_calls Must Be Followed by Tool Messages' in Semantic Kernel C# - **URL:** https://www.dotnetstudioai.com/hospital/fix-semantic-kernel-tool-call-message-ordering-error/ - **Description:** Getting 'tool_calls must be followed by tool messages'? Fix ChatHistory message ordering in manual function calling and FunctionInvokingChatClient. - **Category:** hospital - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Semantic Kernel, Tool Call Error, Error Fix, Function Calling, .NET AI **Technical Summary:** The SK 400 model_error 'tool_calls must be followed by tool messages' occurs when ChatHistory has a message between an assistant's tool call and its tool result. Workarounds: (1) post-process ChatHistory to fix ordering violations, (2) use MEAI's FunctionInvokingChatClient which handles ordering correctly, or (3) disable auto-invoke and manage the function call loop manually. **Key Takeaways:** - Tool result messages must immediately follow their paired tool call — no messages in between - This is SK Issue #7626 — occurs in multi-turn conversations with auto function calling - FunctionInvokingChatClient from MEAI handles message ordering correctly - Manual function calling loop is the most reliable workaround - Scan ChatHistory before each call to detect ordering violations proactively **Implementation Steps:** - [ ] Upgrade to latest SK 1.54.0 — some ordering bugs are fixed in recent releases - [ ] Switch to FunctionInvokingChatClient via ChatClientBuilder.UseFunctionInvocation() - [ ] Or implement manual function call loop with FunctionChoiceBehavior.None() - [ ] Add ChatHistory validation before each multi-turn AI call - [ ] Log ChatHistory contents at DEBUG level for easier diagnosis --- ================================================================================ ## PILLAR: /WORKSHOP/ ================================================================================ ### Add Polly v8 Resilience to Azure OpenAI Calls in C# (Retry + Circuit Breaker) - **URL:** https://www.dotnetstudioai.com/workshop/add-resilience-ai-calls-dotnet-polly-circuit-breaker/ - **Description:** Stop 429s and 503s from crashing your AI app. Polly v8 retry, circuit breaker, and token bucket rate limiting for Azure OpenAI in C#. Production code. - **Category:** workshop - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Polly, Resilience, Azure OpenAI, Circuit Breaker, Rate Limiting, .NET AI **Technical Summary:** Production resilience for Azure OpenAI in .NET requires three layers: retry with exponential backoff and jitter (handles transient 429s), circuit breaker (stops calls during sustained outages), and client-side rate limiting (prevents quota exhaustion). Use Microsoft.Extensions.Resilience for HttpClient-based scenarios and ResiliencePipelineBuilder for direct SDK wrapping. Apply strategies in order: rate limiter → timeout → circuit breaker → retry. **Key Takeaways:** - Three strategies needed: retry (transient), circuit breaker (sustained), rate limiter (prevention) - Strategy order matters: rate limiter → timeout → circuit breaker → retry - Microsoft.Extensions.Resilience for HttpClient scenarios; Polly directly for SDK wrapping - Circuit breaker: 70% failure ratio, 30s window, 15s break — reasonable defaults for Azure OpenAI - Client-side token bucket rate limiter prevents 429s more effectively than retrying after them **Implementation Steps:** - [ ] Add Microsoft.Extensions.Resilience NuGet package - [ ] Configure retry with exponential backoff, jitter, and Retry-After header handling - [ ] Add circuit breaker with 70% failure ratio, 30s window, 15s break duration - [ ] Implement TokenBucketRateLimiter sized to your Azure OpenAI deployment quota - [ ] Ensure strategy order: rate limiter → timeout → circuit breaker → retry - [ ] Test the circuit breaker by simulating sustained 429 responses --- ### Build a Streaming Chat API with Azure OpenAI + ASP.NET Core Minimal API - **URL:** https://www.dotnetstudioai.com/workshop/azure-openai-chat-completion-streaming-dotnet/ - **Description:** Production streaming chat API: Azure OpenAI + Minimal API + DI + Polly retry. Server-Sent Events endpoint with token tracking. .NET 10 source code. - **Category:** workshop - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Azure OpenAI, Chat Completion, Streaming, ASP.NET Core, .NET AI **Technical Summary:** A complete workshop that builds a production-ready streaming chat API with Azure OpenAI and ASP.NET Core 9. Covers project scaffolding, DI registration of AzureOpenAIClient with retry, non-streaming and streaming endpoints, SSE for browser clients, conversation history management, error handling for 429/401/content-filter scenarios, and curl-based testing. **Key Takeaways:** - Register AzureOpenAIClient as a singleton with retry policy for resilient Azure OpenAI calls - Use CompleteChatStreamingAsync and IAsyncEnumerable to stream tokens to API consumers - Expose an SSE endpoint with text/event-stream content type for browser-native consumption - Handle 429 rate-limit, 401 auth, and content-filter errors gracefully in middleware - Manage conversation history per session to maintain multi-turn context **Implementation Steps:** - [ ] Scaffold .NET 10 Web API project and install Azure.AI.OpenAI 2.x - [ ] Register AzureOpenAIClient singleton with retry options in DI - [ ] Implement non-streaming /api/chat endpoint - [ ] Implement streaming /api/chat/stream endpoint with IAsyncEnumerable - [ ] Implement SSE /api/chat/sse endpoint for browser clients - [ ] Add conversation history model and per-session management - [ ] Add error handling for 429, 401, and content filter responses - [ ] Test all endpoints with curl --- ### Build an AI Document Ingestion Pipeline with .NET BackgroundService - **URL:** https://www.dotnetstudioai.com/workshop/build-ai-background-service-dotnet-document-processing/ - **Description:** Queue-driven document processing: BackgroundService + Azure Service Bus + Azure OpenAI embeddings + OpenTelemetry monitoring. Production .NET code. - **Category:** workshop - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** BackgroundService, Hosted Service, Embeddings, Document Processing, .NET AI **Technical Summary:** This workshop builds a production-grade .NET BackgroundService that dequeues document ingestion messages from Azure Service Bus, generates embeddings via Azure OpenAI, and indexes vectors into Azure AI Search. Rate control uses SemaphoreSlim to stay within token-per-minute quotas. Each document is tracked with OpenTelemetry ActivitySource spans and System.Diagnostics.Metrics counters. Scaling is handled by Azure Container Apps with KEDA queue-length autoscaling. **Key Takeaways:** - BackgroundService.ExecuteAsync with CancellationToken is the correct pattern for long-running AI workers in .NET - ServiceBusProcessor with MaxConcurrentCalls = 1 plus an internal SemaphoreSlim gives layered backpressure against embedding rate limits - Dead-letter messages immediately on permanent failures; abandon on transient failures to allow Service Bus redelivery - ActivitySource spans and Meter counters per document enable per-request latency and throughput monitoring - KEDA ServiceBus scaler on Azure Container Apps enables queue-depth-driven horizontal autoscaling **Implementation Steps:** - [ ] Install Azure.Messaging.ServiceBus, Azure.AI.OpenAI, Azure.Search.Documents, and OpenTelemetry NuGet packages - [ ] Define DocumentIngestionMessage record to deserialize from Service Bus message body - [ ] Create EmbeddingWorkerService extending BackgroundService with ServiceBusProcessor injection - [ ] Wire ProcessMessageAsync and ProcessErrorAsync handlers on the processor - [ ] Add SemaphoreSlim(3, 3) gate around each embedding call with 200ms release delay - [ ] Implement dead-letter logic for ClientResultException with non-429 status codes - [ ] Add ActivitySource span and Meter counter per processed document - [ ] Register the hosted service with AddHostedService() --- ### Build a Streaming AI Chatbot in Blazor + Semantic Kernel (Full Source) - **URL:** https://www.dotnetstudioai.com/workshop/build-blazor-ai-chatbot-semantic-kernel/ - **Description:** End-to-end Blazor chatbot with Semantic Kernel streaming, per-user ChatHistory, and function calling. StreamRendering + Azure OpenAI. Source code included. - **Category:** workshop - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Blazor, Semantic Kernel, Streaming, AI Chatbot, .NET AI **Technical Summary:** This workshop builds a production-ready streaming AI chatbot using Blazor Server, Semantic Kernel 1.54.0, and Azure OpenAI. It covers project setup, DI configuration with AddKernel and AddAzureOpenAIChatCompletion, streaming token output with GetStreamingChatMessageContentsAsync and InvokeAsync(StateHasChanged), per-user ChatHistory as a Scoped service with sliding window truncation, function calling via KernelFunction plugins, content safety validation, and containerized deployment to Azure App Service with managed identity. **Key Takeaways:** - Use AddKernel().AddAzureOpenAIChatCompletion() in Program.cs to wire up Semantic Kernel with Azure OpenAI - Register ChatHistory as Scoped so each Blazor circuit (browser tab) gets an isolated conversation - Call await InvokeAsync(StateHasChanged) inside the streaming loop — never call StateHasChanged() directly from a background thread - FunctionChoiceBehavior.Auto() in OpenAIPromptExecutionSettings enables automatic function calling without manual dispatch - Apply sliding window truncation to ChatHistory after each turn to prevent context window exhaustion - Containerize with a multi-stage Dockerfile and use managed identity + Key Vault for secrets in production **Implementation Steps:** - [ ] Create a .NET 10 Blazor Server project and add Microsoft.SemanticKernel 1.54.0 - [ ] Configure DI with AddKernel().AddAzureOpenAIChatCompletion() and register ChatHistory as Scoped - [ ] Build the chat UI component with @rendermode InteractiveServer and message bubble layout - [ ] Add [StreamRendering(true)] attribute and implement the streaming loop with InvokeAsync(StateHasChanged) - [ ] Register a KernelFunction plugin and set FunctionChoiceBehavior.Auto() in execution settings - [ ] Implement sliding window truncation on ChatHistory after each assistant response - [ ] Add input validation and graceful error handling around the streaming loop - [ ] Write a multi-stage Dockerfile and configure managed identity for Key Vault secret access --- ### Build a Document Summarizer API in C# with Azure OpenAI + Chunking - **URL:** https://www.dotnetstudioai.com/workshop/build-document-summarizer-csharp-azure-openai/ - **Description:** Ship a document summarization API: text extraction, token-aware chunking, and streaming generation with Azure AI Foundry (Azure OpenAI) and ASP.NET Core. Full source code. - **Category:** workshop - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Document Summarization, Azure AI Foundry, Azure OpenAI, Text Processing, ASP.NET Core, .NET AI **Technical Summary:** A complete workshop for building a document summarization API with C# and Azure AI Foundry (Azure OpenAI). Covers project setup, document models, token-aware text chunking, single-chunk and recursive multi-chunk summarization strategies, streaming summary output, ASP.NET Core Minimal API endpoint wiring, and error handling -- all in a runnable .NET 10 project using GPT-5.4-mini defaults. **Key Takeaways:** - Use a token-aware chunking strategy that splits text on paragraph boundaries within token budget - Apply the map-reduce pattern: summarize chunks individually then combine summaries - Use recursive summarization when combined summaries still exceed context window limits - Stream the final summary to reduce perceived latency for users - Keep chunk size at 60-70 percent of context window to leave room for system prompt and output **Implementation Steps:** - [ ] Scaffold .NET 10 Web API project and install Azure.AI.OpenAI 2.x - [ ] Define document and summary models - [ ] Implement token-aware text chunking service - [ ] Build single-chunk summarization method - [ ] Build recursive multi-chunk summarization pipeline - [ ] Add streaming summary endpoint - [ ] Wire up DI and Minimal API endpoints - [ ] Add error handling and test with curl --- ### Build Your First AI Agent in C# with Semantic Kernel (.NET) - **URL:** https://www.dotnetstudioai.com/workshop/build-first-ai-agent-dotnet-semantic-kernel/ - **Description:** Hands-on: build a research assistant AI agent from scratch in C#. Tool use, reasoning loops, and structured output with Semantic Kernel. Full source code. - **Category:** workshop - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** AI Agents, Semantic Kernel, .NET AI, Workshop, Function Calling **Technical Summary:** Hands-on workshop building a research assistant AI agent in .NET using Semantic Kernel. The agent uses tool-based reasoning to search, gather data, analyze it, and produce structured output. Covers plugin creation, automatic function calling, ReAct-style reasoning loops, and structured output generation. **Key Takeaways:** - AI agents combine LLM reasoning with tool invocation to complete tasks - Semantic Kernel handles single-agent patterns without needing Agent Framework - FunctionChoiceBehavior.Auto() enables the reasoning-action loop - Well-described plugins are critical — descriptions drive tool selection - Structured output constraints keep agent responses predictable **Implementation Steps:** - [ ] Create a .NET console project with Semantic Kernel - [ ] Build domain-specific plugins as agent tools - [ ] Configure automatic function calling - [ ] Set up the agent's system prompt with clear role and constraints - [ ] Add structured output formatting - [ ] Test with multiple task types to verify tool selection --- ### Build a Local AI App: Ollama + Semantic Kernel + .NET Aspire - **URL:** https://www.dotnetstudioai.com/workshop/build-local-ai-app-ollama-semantic-kernel-aspire/ - **Description:** Local AI dev with zero cloud cost: Ollama + Semantic Kernel + .NET Aspire. Function calling, streaming, and Azure OpenAI cloud failover. Full project. - **Category:** workshop - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Ollama, Semantic Kernel, .NET Aspire, Local AI, OllamaSharp, .NET AI **Technical Summary:** This workshop builds a fully local AI application using Ollama (phi4-mini), Semantic Kernel, and .NET Aspire. It covers OllamaSharp 5.x DI registration, connecting SK to Ollama's OpenAI-compatible endpoint, implementing KernelFunction plugins with FunctionChoiceBehavior.Auto(), orchestrating Ollama as a container via .NET Aspire's community Ollama integration, and adding a cloud fallback to Azure OpenAI on HttpRequestException. The result is a production-ready architecture where local AI handles development and privacy-sensitive workloads while Azure OpenAI handles the cloud path. **Key Takeaways:** - OllamaSharp 5.x uses OllamaApiClient(new Uri('http://localhost:11434')) — not OllamaClient() - Semantic Kernel connects to Ollama via AddOpenAIChatCompletion pointing at http://localhost:11434/v1 - KernelFunction plugins and FunctionChoiceBehavior.Auto() work with Phi-4-mini but need testing - .NET Aspire's Ollama integration eliminates hardcoded URLs via service discovery - Catch HttpRequestException around local AI calls and retry with Azure OpenAI as the cloud fallback - Docker Compose is a viable alternative when Aspire orchestration is not required **Implementation Steps:** - [ ] Install Ollama and run ollama pull phi4-mini to download the model - [ ] Create an Aspire AppHost project and add the Aspire.Hosting.Ollama package - [ ] Register Ollama in AppHost with builder.AddOllama('ollama').WithModel('phi4-mini') - [ ] In the API project, call builder.AddServiceDefaults() and read the Ollama connection string - [ ] Register OllamaApiClient in DI and expose as IChatClient via .AsChatClient() - [ ] Register Semantic Kernel with AddOpenAIChatCompletion pointing to the Ollama /v1 endpoint - [ ] Implement a KernelFunction plugin and set FunctionChoiceBehavior.Auto() in execution settings - [ ] Add HttpRequestException catch around local AI calls to retry with Azure OpenAI fallback --- ### Build a Model Context Protocol (MCP) Server in C# (.NET SDK) - **URL:** https://www.dotnetstudioai.com/workshop/build-mcp-server-dotnet-csharp-sdk/ - **Description:** Ship a production MCP server in C#: file reading, database queries, and summarization tools. ModelContextProtocol.AspNetCore SDK + authorization. - **Category:** workshop - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** MCP, Model Context Protocol, .NET AI, Workshop, C# SDK **Technical Summary:** Workshop for building an MCP server in .NET using the official C# SDK. Covers: creating tools with McpServerTool attribute, hosting with stdio and HTTP transports, connecting to Semantic Kernel, and production deployment with ASP.NET Core. **Key Takeaways:** - Use [McpServerTool] attribute to expose C# methods as MCP tools - Stdio transport for local servers, HTTP/SSE for production - ModelContextProtocol.AspNetCore enables standard ASP.NET Core hosting - MCP tools convert to SK KernelFunctions via AsKernelFunction() - DI works in MCP server tools through method parameter injection **Implementation Steps:** - [ ] Create a .NET console or web project - [ ] Install ModelContextProtocol NuGet package - [ ] Create tool classes with McpServerTool-decorated methods - [ ] Configure transport (stdio or HTTP) - [ ] Test with an MCP client - [ ] Connect to Semantic Kernel agent as tool provider --- ### Build an AI-Powered Minimal API in .NET 10 with Microsoft.Extensions.AI - **URL:** https://www.dotnetstudioai.com/workshop/build-minimal-api-openai-dotnet-10/ - **Description:** Production AI API: .NET 10 Minimal API + IChatClient DI + streaming SSE + structured JSON output. Microsoft.Extensions.AI integration with full source. - **Category:** workshop - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Minimal API, .NET 10, Azure AI Foundry, Azure OpenAI, Microsoft.Extensions.AI, .NET AI **Technical Summary:** This workshop builds a production-ready AI Minimal API with .NET 10 and Microsoft.Extensions.AI 10.3.0. It covers project scaffolding, IChatClient DI registration via AddAzureOpenAIChatClient(), a streaming SSE chat endpoint using CompleteStreamingAsync(), a structured output extraction endpoint using JSON schema formatting, an embeddings endpoint via IEmbeddingGenerator, resilience via ConfigureHttpClientDefaults with AddStandardResilienceHandler(), OpenAPI documentation with Scalar, and deployment to Azure Container Apps using a Dockerfile and managed identity via DefaultAzureCredential. Azure AI Foundry with GPT-5.4-mini is the default platform guidance. **Key Takeaways:** - Register IChatClient and IEmbeddingGenerator via MEAI extension methods — no manual Azure SDK wiring - Streaming SSE requires text/event-stream content type, data: prefix, double newline, and FlushAsync per chunk - Structured output: use ChatResponseFormat.ForJsonSchema or fall back to system prompt + JsonSerializer.Deserialize - AddStandardResilienceHandler() gives retry, circuit breaker, and timeout with zero manual Polly configuration - Managed identity via DefaultAzureCredential removes API key secrets from Container Apps entirely - Program.cs stays under 100 lines with Minimal API — all AI capabilities compose as DI registrations **Implementation Steps:** - [ ] Scaffold with dotnet new webapi --use-minimal-apis and add MEAI + Azure AI Foundry packages - [ ] Register IChatClient with AddAzureOpenAIChatClient(endpoint, credential) - [ ] Implement POST /chat endpoint streaming tokens as SSE with text/event-stream - [ ] Implement POST /extract endpoint returning structured JSON from model output - [ ] Implement POST /embed endpoint using IEmbeddingGenerator> - [ ] Add AddStandardResilienceHandler() via ConfigureHttpClientDefaults - [ ] Configure OpenAPI with Scalar UI for interactive endpoint documentation - [ ] Build Dockerfile and deploy to Azure Container Apps with managed identity --- ### Build an AI-Powered Minimal API with .NET 10 + Microsoft.Extensions.AI - **URL:** https://www.dotnetstudioai.com/workshop/build-minimal-api-openai-dotnet-9/ - **Description:** Production AI API: .NET 10 Minimal API + IChatClient DI + streaming SSE + structured JSON output. Microsoft.Extensions.AI integration with full source. - **Category:** workshop - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Minimal API, .NET 10, Azure AI Foundry, Azure OpenAI, Microsoft.Extensions.AI, .NET AI **Technical Summary:** This workshop builds a production-ready AI Minimal API with .NET 10 and Microsoft.Extensions.AI 10.3.0. It covers project scaffolding, IChatClient DI registration via AddAzureOpenAIChatClient(), a streaming SSE chat endpoint using CompleteStreamingAsync(), a structured output extraction endpoint using JSON schema formatting, an embeddings endpoint via IEmbeddingGenerator, resilience via ConfigureHttpClientDefaults with AddStandardResilienceHandler(), OpenAPI documentation with Scalar, and deployment to Azure Container Apps using a Dockerfile and managed identity via DefaultAzureCredential. Azure AI Foundry with GPT-5.4-mini is the default platform guidance. **Key Takeaways:** - Register IChatClient and IEmbeddingGenerator via MEAI extension methods — no manual Azure SDK wiring - Streaming SSE requires text/event-stream content type, data: prefix, double newline, and FlushAsync per chunk - Structured output: use ChatResponseFormat.ForJsonSchema or fall back to system prompt + JsonSerializer.Deserialize - AddStandardResilienceHandler() gives retry, circuit breaker, and timeout with zero manual Polly configuration - Managed identity via DefaultAzureCredential removes API key secrets from Container Apps entirely - Program.cs stays under 100 lines with Minimal API — all AI capabilities compose as DI registrations **Implementation Steps:** - [ ] Scaffold with dotnet new webapi --use-minimal-apis and add MEAI + Azure AI Foundry packages - [ ] Register IChatClient with AddAzureOpenAIChatClient(endpoint, credential) - [ ] Implement POST /chat endpoint streaming tokens as SSE with text/event-stream - [ ] Implement POST /extract endpoint returning structured JSON from model output - [ ] Implement POST /embed endpoint using IEmbeddingGenerator> - [ ] Add AddStandardResilienceHandler() via ConfigureHttpClientDefaults - [ ] Configure OpenAPI with Scalar UI for interactive endpoint documentation - [ ] Build Dockerfile and deploy to Azure Container Apps with managed identity --- ### Build a Multi-Agent System in .NET with Microsoft Agent Framework - **URL:** https://www.dotnetstudioai.com/workshop/build-multi-agent-system-dotnet-agent-framework/ - **Description:** Three-agent pipeline: sequential, parallel, and handoff patterns with checkpointing. Microsoft Agent Framework + Semantic Kernel. Full .NET source code. - **Category:** workshop - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Multi-Agent, Microsoft Agent Framework, .NET AI, Workshop, OpenTelemetry **Technical Summary:** Workshop for building a multi-agent pipeline in .NET using Microsoft Agent Framework. Implements a three-agent system (Researcher, Analyst, Writer) with sequential execution, group chat, and handoff patterns. Includes OpenTelemetry tracing for production observability. **Key Takeaways:** - Three agents: Researcher (search tools), Analyst (data tools), Writer (output formatting) - Sequential pattern: agents take turns in defined order - Group chat pattern: agents collaborate with selection strategy - Handoff pattern: agents delegate to each other dynamically - OpenTelemetry traces every agent turn and tool call **Implementation Steps:** - [ ] Create separate Kernel instances per agent with specialized tools - [ ] Define system prompts that prevent agents from exceeding their role - [ ] Choose execution pattern (sequential, group chat, handoff) - [ ] Set termination strategy to prevent infinite loops - [ ] Add OpenTelemetry tracing before deploying --- ### Build a RAG Chatbot with Semantic Kernel + Cosmos DB Vector Store (.NET 10) - **URL:** https://www.dotnetstudioai.com/workshop/build-rag-chatbot-dotnet-semantic-kernel-cosmosdb/ - **Description:** Production RAG chatbot: Semantic Kernel + Azure Cosmos DB vector search + Azure OpenAI grounded generation. Ingestion, retrieval, and chat in .NET 10. - **Category:** workshop - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** RAG, Semantic Kernel, Azure Cosmos DB, Azure OpenAI, .NET 10, Tutorial **Technical Summary:** This end-to-end tutorial builds a production-ready RAG chatbot using .NET 10, Semantic Kernel for orchestration, Azure OpenAI for embeddings and chat completion, and Azure Cosmos DB for vector storage. Covers project setup, embedding generation, vector indexing, retrieval pipeline, and chat API with streaming. **Key Takeaways:** - Azure Cosmos DB supports native vector search — no separate vector store needed - Semantic Kernel manages the orchestration between retrieval and generation - Use text-embedding-3-small for cost-effective embeddings - Streaming responses improve perceived latency significantly - The DI-first approach makes the architecture testable and maintainable **Implementation Steps:** - [ ] Create Azure OpenAI resource with chat and embedding deployments - [ ] Create Azure Cosmos DB account with vector search enabled - [ ] Scaffold .NET 10 Web API project - [ ] Install Semantic Kernel, Azure.AI.OpenAI, and Cosmos DB packages - [ ] Implement document ingestion with embedding generation - [ ] Configure Cosmos DB vector index - [ ] Build retrieval pipeline with Semantic Kernel - [ ] Implement streaming chat API endpoint - [ ] Add error handling and rate limit retries - [ ] Deploy to Azure Container Apps --- ### Build Real-Time AI Chat with SignalR + Azure OpenAI Streaming - **URL:** https://www.dotnetstudioai.com/workshop/build-realtime-ai-chat-signalr-azure-openai/ - **Description:** Stream Azure OpenAI responses to browser clients live via SignalR. ASP.NET Core hub, token-by-token rendering, and reconnection handling. Full tutorial. - **Category:** workshop - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** SignalR, Real-Time, Azure OpenAI, ASP.NET Core, .NET AI **Technical Summary:** A complete workshop for building a real-time AI chat application using ASP.NET Core SignalR and Azure OpenAI. Covers project scaffolding, ChatHub implementation with streaming token relay, inline HTML/JS frontend, per-connection conversation history, connection lifecycle management, DI configuration, error handling, and full end-to-end testing. **Key Takeaways:** - Use SignalR Hubs to relay streaming Azure OpenAI tokens to browser clients in real time - Manage per-connection conversation history with ConcurrentDictionary keyed by connection ID - Handle connection lifecycle events to clean up AI resources and conversation state - Build a framework-free HTML/JS frontend using the SignalR JavaScript client - Implement error handling that notifies clients of AI failures without breaking the connection **Implementation Steps:** - [ ] Scaffold .NET 10 project with SignalR and install Azure.AI.OpenAI 2.x - [ ] Configure DI with AzureOpenAIClient singleton - [ ] Implement ChatHub with SendMessage and streaming response relay - [ ] Build per-connection conversation history store - [ ] Handle OnDisconnectedAsync for cleanup - [ ] Create inline HTML/JS frontend with SignalR client - [ ] Add error handling for AI failures - [ ] Test the complete chat flow end to end --- ### Build a Semantic Search API with .NET + Azure AI Search Vectors - **URL:** https://www.dotnetstudioai.com/workshop/build-semantic-search-api-dotnet-azure-ai-search/ - **Description:** Ship a semantic search API: Azure OpenAI embeddings + Azure AI Search vector index + hybrid BM25/vector retrieval. .NET Minimal API with full source. - **Category:** workshop - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Azure AI Search, Vector Search, Semantic Search, Embeddings, .NET AI **Technical Summary:** A complete workshop for building a semantic search API with .NET 10, Azure AI Search, and Azure OpenAI embeddings. Covers index creation with vector fields, embedding generation with text-embedding-3-small, document indexing, pure vector search, hybrid BM25+vector search, semantic ranking, ASP.NET Core Minimal API endpoints, and curl-based testing. **Key Takeaways:** - Create Azure AI Search indexes with vector fields and HNSW algorithm configuration - Generate embeddings using Azure OpenAI text-embedding-3-small for both documents and queries - Implement pure vector search for semantic matching without keyword dependence - Combine BM25 keyword search with vector search via hybrid search for best results - Add semantic ranking on top of hybrid results for re-ranked relevance **Implementation Steps:** - [ ] Scaffold .NET 10 Web API and install Azure.Search.Documents and Azure.AI.OpenAI packages - [ ] Define search index schema with text and vector fields - [ ] Create the index programmatically with HNSW vector search configuration - [ ] Build embedding generation service using Azure OpenAI - [ ] Index sample documents with generated embeddings - [ ] Implement pure vector search endpoint - [ ] Implement hybrid search endpoint (BM25 + vector) - [ ] Add semantic ranking configuration and endpoint - [ ] Test all endpoints with curl --- ### Your First AI App in .NET: Make One API Call and See What Happens - **URL:** https://www.dotnetstudioai.com/workshop/first-ai-app-dotnet-csharp-azure-openai/ - **Description:** Build your first Azure AI Foundry app in C# in 15 minutes. No Python. No complexity. One API call with GPT-5.4-mini and .NET 10 that changes how you think about AI. - **Category:** workshop - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Azure OpenAI, Azure AI Foundry, GPT-5.4, Microsoft.Extensions.AI, Getting Started, Console App, .NET AI **Technical Summary:** Step-by-step guide for .NET developers making their very first Azure AI Foundry API call using Microsoft.Extensions.AI IChatClient abstraction in a .NET 10 console app. Uses GPT-5.4-mini as the default model. Covers Azure AI Foundry resource and deployment setup, dotnet user-secrets for key storage, the 15-line working C# program, interactive chat loop extension, system prompt basics, and clear next-step linking into the ai-foundations learning path. **Key Takeaways:** - 15 lines of C# is all you need for a working Azure AI Foundry (GPT-5.4-mini) console app on .NET 10 - Use IChatClient from Microsoft.Extensions.AI, not the raw AzureOpenAIClient directly — provider-agnostic from day one - A deployment in Azure AI Foundry is your named instance of a model — gpt-5.4-mini is the recommended default - dotnet user-secrets is the correct way to store API keys during local development — never hardcode them - Adding a ChatMessage with ChatRole.System changes the model's personality without changing the API call **Implementation Steps:** - [ ] Create an Azure AI Foundry (Azure OpenAI) resource in the Azure portal - [ ] Deploy gpt-5.4-mini — best cost/performance for beginners and production APIs alike - [ ] Copy the endpoint URL and API key from the Keys and Endpoint blade - [ ] Create a .NET 10 console app and install Azure.AI.OpenAI and Microsoft.Extensions.AI - [ ] Store endpoint and key with dotnet user-secrets — never in source code - [ ] Use .NET 10 (LTS): supported until Nov 2028, the recommended runtime for all new applications - [ ] Write and run the 15-line IChatClient program - [ ] Extend to an interactive loop using Console.ReadLine() - [ ] Add a system prompt to personalise the model's responses --- ### Semantic Kernel .NET Setup: 30-Minute Guide - **URL:** https://www.dotnetstudioai.com/workshop/getting-started-semantic-kernel-dotnet-setup/ - **Description:** Set up Semantic Kernel in .NET: NuGet install, Azure OpenAI config, streaming chat, plugins, and function calling in one working C# app. - **Category:** workshop - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Semantic Kernel, .NET AI, Azure OpenAI, Workshop, Getting Started **Technical Summary:** Step-by-step workshop for setting up Semantic Kernel in .NET. Covers: creating a console project, installing NuGet packages, configuring the kernel with Azure OpenAI, making chat completions, building plugins with KernelFunction, enabling automatic function calling, and adding streaming responses. **Key Takeaways:** - Install Microsoft.SemanticKernel NuGet package to get started - Create a Kernel with AddAzureOpenAIChatCompletion and build it - Use [KernelFunction] and [Description] attributes to create plugins - Enable FunctionChoiceBehavior.Auto() for automatic tool invocation - Use InvokePromptStreamingAsync for real-time streaming responses **Implementation Steps:** - [ ] Create a new .NET console project - [ ] Install Microsoft.SemanticKernel NuGet package - [ ] Configure kernel with Azure OpenAI or OpenAI credentials - [ ] Make a basic chat completion call - [ ] Create a plugin class with KernelFunction methods - [ ] Register the plugin and enable auto function calling - [ ] Add streaming for real-time output --- ### Host an MCP Server in ASP.NET Core with Streamable HTTP - **URL:** https://www.dotnetstudioai.com/workshop/host-mcp-server-aspnet-core-streamable-http/ - **Description:** Step-by-step workshop: Build, containerize, and deploy a remote Model Context Protocol (MCP) server in ASP.NET Core using Streamable HTTP transport and C#. - **Category:** workshop - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** MCP, Model Context Protocol, ASP.NET Core, .NET 10, Streamable HTTP, Workshop, Docker **Technical Summary:** Hands-on lab for building and deploying a remote Model Context Protocol (MCP) server in ASP.NET Core with .NET 10. Covers: configuring Streamable HTTP endpoints, registering parameterized C# tools with dependency injection, adding OpenTelemetry tracing, implementing health checks, and containerizing with Docker for Kubernetes or Azure Container Apps. **Key Takeaways:** - Streamable HTTP enables remote, scalable MCP tool servers accessible over standard HTTPS - ModelContextProtocol.AspNetCore seamlessly integrates with ASP.NET Core Minimal APIs - Dependency injection injects database contexts and HTTP clients directly into MCP tool handlers - Built-in rate limiting and health checks ensure production resilience under heavy agent load - Standard Dockerfiles allow deployment to Azure Container Apps or any cloud environment **Implementation Steps:** - [ ] Initialize ASP.NET Core Web API project targeting .NET 10 - [ ] Install ModelContextProtocol.AspNetCore NuGet package - [ ] Register MCP Server with builder.Services.AddMcpServer() - [ ] Implement tool class with [McpTool] and [McpParameter] attributes - [ ] Map MCP routes with app.MapMcpServer('/mcp') - [ ] Verify streaming connection with curl and MCP Inspector tool --- ### ML.NET Sentiment Analysis in C#: Predictive Analytics Tutorial - **URL:** https://www.dotnetstudioai.com/workshop/mlnet-sentiment-analysis-tutorial-csharp/ - **Description:** Build a predictive analytics workflow with ML.NET in C#: train a sentiment model, evaluate metrics, and serve predictions from an ASP.NET Core API. - **Category:** workshop - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** ML.NET, Sentiment Analysis, Machine Learning, C#, ASP.NET Core **Technical Summary:** Complete ML.NET tutorial for building a sentiment analysis classifier in C#. Covers: loading CSV data, building a training pipeline, evaluating model accuracy, saving/loading models, and serving predictions from an ASP.NET Core minimal API endpoint. **Key Takeaways:** - ML.NET pipelines: load data → transform text → featurize → train → evaluate - Use TextFeaturizing to convert text to numeric features (TF-IDF) - SdcaLogisticRegression works well for binary sentiment classification - Save models as .zip files, load them for inference without retraining - PredictionEngine for single predictions, ITransformer for batch **Implementation Steps:** - [ ] Create a .NET console project and add Microsoft.ML package - [ ] Prepare a CSV dataset with text and label columns - [ ] Build a text featurization pipeline - [ ] Train with SdcaLogisticRegression or LightGbm - [ ] Evaluate with accuracy, F1, and AUC metrics - [ ] Save model and serve from ASP.NET Core --- ================================================================================ ## PILLAR: /NEWS/ ================================================================================ ### Azure.AI.OpenAI 2.1.0 GA: IAsyncEnumerable Streaming + Structured Output - **URL:** https://www.dotnetstudioai.com/news/azure-ai-openai-210-released/ - **Description:** Azure.AI.OpenAI 2.1.0 GA for .NET: IAsyncEnumerable streaming, GPT-4 Vision, and JSON schema response_format. First stable v2 release — migration guide. - **Category:** news - **.NET Version:** .NET 8 - **Last Verified:** 2026-10-24 - **Tags:** Azure OpenAI, Azure.AI.OpenAI, .NET 8+, NuGet Release, Streaming **Technical Summary:** Azure.AI.OpenAI 2.1.0 is the first generally available release of the v2 SDK rewrite. It provides IAsyncEnumerable streaming for chat completions, GPT-4 Vision support, structured output enforcement via JSON Schema response_format, and full Azure Active Directory/Entra ID authentication. Compatible with .NET 8 LTS and later. **Key Takeaways:** - 2.x is a complete rewrite — existing 1.x code requires update when migrating - Streaming uses IAsyncEnumerable — no custom callbacks needed - Structured outputs enforce JSON Schema compliance at the API level for reliable parsing - GPT-4 Vision (multimodal) supported via ChatMessageContentPart.CreateImagePart - Azure Managed Identity / Entra ID authentication works via DefaultAzureCredential **Implementation Steps:** - [ ] Install Azure.AI.OpenAI 2.1.0 and OpenAI 2.1.0 - [ ] Replace OpenAIClient constructor with AzureOpenAIClient - [ ] Update GetChatClient call with Azure deployment name - [ ] Configure DefaultAzureCredential for Managed Identity auth - [ ] Test streaming with await foreach over CompleteChatStreamingAsync - [ ] Verify JSON structured output schema definitions --- ### Azure.Search.Documents 11.7.0 Released: Native Vector Search + HNSW for .NET - **URL:** https://www.dotnetstudioai.com/news/azure-search-documents-1170-released/ - **Description:** Azure.Search.Documents 11.7.0 adds native vector search, HNSW indexing, and hybrid BM25/vector retrieval for .NET RAG apps. NuGet upgrade guide inside. - **Category:** news - **.NET Version:** .NET 8 - **Last Verified:** 2026-10-24 - **Tags:** Azure AI Search, Azure.Search.Documents, Vector Search, RAG, .NET 8+, NuGet Release **Technical Summary:** Azure.Search.Documents 11.7.0 ships stable vector search APIs (VectorSearchField, VectorizedQuery), improved HNSW index configuration, hybrid retrieval via SearchOptions.VectorSearch with RRF fusion, and enhanced semantic ranking integration. Compatible with .NET 8 LTS and later. **Key Takeaways:** - VectorSearchField is now GA — safe for production index definitions - Hybrid search combines BM25 + vector search with RRF merging — improves recall over pure vector - SemanticSearch options can stack on top of hybrid for three-layer retrieval - ExhaustiveKnnAlgorithmConfiguration available for deterministic small-scale vector search - SearchClient.SearchAsync now accepts VectorizedQuery with float[] embeddings directly **Implementation Steps:** - [ ] Update Azure.Search.Documents to 11.7.0 - [ ] Define VectorSearchField with proper dimensions and metric in SearchIndex - [ ] Configure VectorSearch.Algorithms with HnswAlgorithmConfiguration - [ ] Switch SearchOptions to include VectorizedQuery for vector search - [ ] Use hybrid search by combining SearchText with VectorizedQuery - [ ] Enable SemanticSearch for third-layer semantic ranking if needed - [ ] Pre-generate embeddings with Azure OpenAI text-embedding-3-small before indexing --- ### .NET 9.0.200 SDK: Security and JIT Fixes - **URL:** https://www.dotnetstudioai.com/news/dotnet-902-sdk-released/ - **Description:** .NET 9.0.200 SDK ships security patches, ARM64 JIT fixes, and Minimal API updates. See whether you should upgrade from 9.0.100. - **Category:** news - **.NET Version:** .NET 9 - **Last Verified:** 2026-10-24 - **Tags:** .NET 9, SDK Release, Breaking Changes, Migration **Technical Summary:** The .NET 9.0.2 SDK (9.0.200) was released in February 2026 with security patches, performance improvements to the JIT compiler, and updates to the ASP.NET Core and EF Core stacks. No breaking changes from the previous 9.0.100 band. **Key Takeaways:** - .NET 9.0.200 SDK includes security patches — update recommended - JIT compiler improvements for ARM64 workloads - ASP.NET Core Minimal API performance enhancements - No breaking changes from 9.0.100 feature band **Implementation Steps:** - [ ] Update global.json to reference 9.0.200 - [ ] Run full test suite after upgrade - [ ] Review ASP.NET Core release notes for middleware changes - [ ] Test ARM64 deployments for JIT improvements --- ### GPT-5 and o-Series Models: What Changes for .NET AI Apps - **URL:** https://www.dotnetstudioai.com/news/gpt-5-series-what-dotnet-developers-should-know/ - **Description:** GPT-5, o1, o3, o4-mini: improved tool calling, structured output, and 1M+ context windows. What .NET developers need to update in Azure OpenAI + Semantic Kernel. - **Category:** news - **Last Verified:** 2026-10-24 - **Tags:** GPT-5, OpenAI, o-Series, Reasoning Models, .NET AI **Technical Summary:** OpenAI's model lineup now includes GPT-4o for general tasks, o-series reasoning models (o1, o3, o4-mini) for complex multi-step problems, and GPT-5 as the next general-purpose generation. For .NET developers, the practical impacts are improved function calling reliability, better structured output compliance, longer context windows reducing chunking needs, and reasoning models enabling agentic planning. Build on GPT-4o today using IChatClient abstractions for easy future model upgrades. **Key Takeaways:** - GPT-4o is the current production workhorse — build on it now, upgrade later - o-series reasoning models (o1, o3, o4-mini) excel at multi-step logic, math, and planning tasks - Reasoning models use more tokens and have higher latency — use them selectively, not as default - Use IChatClient from Microsoft.Extensions.AI to make model swaps a configuration change - GPT-5 has been previewed by OpenAI with improved tool use and context handling — specifics pending GA - Azure OpenAI typically follows OpenAI releases within weeks to months **Implementation Steps:** - [ ] Ensure current .NET AI code uses IChatClient abstraction for model portability - [ ] Evaluate o4-mini for tasks where GPT-4o produces unreliable reasoning - [ ] Test structured output compliance with current models before assuming GPT-5 fixes issues - [ ] Review context window usage — longer windows reduce need for complex chunking strategies - [ ] Set up model deployment configuration so swapping models requires no code changes - [ ] Monitor Azure OpenAI model availability page for GPT-5 and o-series updates --- ### MCP C# SDK v1.0: .NET Auth and Tools - **URL:** https://www.dotnetstudioai.com/news/mcp-csharp-sdk-v1-released-dotnet/ - **Description:** ModelContextProtocol v1.0 for .NET adds auth discovery, tool sampling, and async requests. See what changes for Semantic Kernel apps. - **Category:** news - **.NET Version:** .NET 9 - **Last Verified:** 2026-10-24 - **Tags:** MCP, Model Context Protocol, .NET SDK, AI Agents, Tool Calling **Technical Summary:** The Model Context Protocol C# SDK v1.0 was released on March 5, 2026. It provides a standardized way for .NET AI applications to expose and consume tools, resources, and prompts. Key v1.0 features include authorization server discovery, Client ID Metadata Documents, tool sampling, and long-running request support. The SDK ships as two NuGet packages: ModelContextProtocol (core) and ModelContextProtocol.AspNetCore (HTTP hosting). **Key Takeaways:** - MCP C# SDK v1.0 released March 5, 2026 — first stable release - Two packages: ModelContextProtocol (core) + ModelContextProtocol.AspNetCore (HTTP hosting) - v1.0 adds authorization, tool sampling, long-running requests, and CIMD - Native integration with Microsoft Agent Framework and Semantic Kernel - API surface is frozen — safe for production use **Implementation Steps:** - [ ] Install ModelContextProtocol 1.0.0 from NuGet - [ ] Add ModelContextProtocol.AspNetCore if hosting over HTTP - [ ] Define tools using [McpTool] attribute on methods - [ ] Configure authorization if exposing server externally - [ ] Test with MCP Inspector or compatible client --- ### Microsoft Agent Framework 1.0 GA Released — What Changed for .NET Developers - **URL:** https://www.dotnetstudioai.com/news/microsoft-agent-framework-10-ga-dotnet/ - **Description:** Microsoft Agent Framework 1.0 has reached General Availability (GA) for .NET. Key features: Microsoft.Agents.AI 1.0.0 NuGet, state graphs, checkpointing, and SK migration. - **Category:** news - **.NET Version:** .NET 10 - **Last Verified:** 2026-10-24 - **Tags:** Microsoft Agent Framework, AI Agents, Release News, .NET AI, .NET 10, Multi-Agent **Technical Summary:** Microsoft Agent Framework 1.0 has reached General Availability (GA). It unifies AutoGen and Semantic Kernel Agent abstractions into a single enterprise C# runtime under the Microsoft.Agents.AI 1.0.0 package. Key GA features include checkpointed state persistence, declarative workflow graphs, human-in-the-loop approvals, native OpenTelemetry tracing, and seamless Semantic Kernel plugin interoperability. **Key Takeaways:** - Microsoft Agent Framework 1.0 is GA with full enterprise support and stable APIs - Official replacement for both AutoGen .NET and experimental SK Agent packages - Core NuGet packages: Microsoft.Agents.AI 1.0.0 and Microsoft.Agents.Core 1.0.0 - Key features: Checkpointed state persistence, workflow graphs, and human gates - Directly interoperable with Semantic Kernel 1.54+ plugins and Microsoft.Extensions.AI **Implementation Steps:** - [ ] Update project packages from RC to Microsoft.Agents.AI 1.0.0 - [ ] Review namespace imports: Microsoft.Agents.AI and Microsoft.Agents.Core - [ ] Migrate experimental SK ChatCompletionAgent code to official MAF 1.0 types - [ ] Configure persistent state storage provider (Cosmos DB, Redis, or SQLite) - [ ] Verify OpenTelemetry distributed tracing across multi-agent workflows --- ### Microsoft Agent Framework RC: .NET Migration - **URL:** https://www.dotnetstudioai.com/news/microsoft-agent-framework-rc-dotnet/ - **Description:** What changed in Microsoft Agent Framework RC for .NET: frozen APIs, MCP tools, multi-agent orchestration, and Semantic Kernel migration steps. - **Category:** news - **.NET Version:** .NET 9 - **Last Verified:** 2026-10-24 - **Tags:** Microsoft Agent Framework, AI Agents, Semantic Kernel, .NET AI, Multi-Agent **Technical Summary:** Microsoft Agent Framework reached Release Candidate status on February 19, 2026, with GA targeted for Q1 2026. It is the official successor to Semantic Kernel Agents and AutoGen for .NET, providing multi-agent orchestration patterns (sequential, concurrent, handoff, group chat), native MCP support, and production features like checkpointing and human-in-the-loop. SK plugins and DI patterns carry forward directly. **Key Takeaways:** - Agent Framework RC has a frozen API surface — safe for new projects - Successor to both Semantic Kernel Agents and AutoGen (now maintenance-only) - Four orchestration patterns: sequential, concurrent, handoff, group chat - Native MCP support for tool integration - SK plugins, DI patterns, and kernel config transfer directly **Implementation Steps:** - [ ] Evaluate whether your project needs agentic capabilities - [ ] For new agent projects, start with Agent Framework RC - [ ] For existing SK agents, plan migration timeline post-GA - [ ] For non-agentic SK usage (RAG, chat), stay on SK - [ ] Install Microsoft.Agents.Core RC from NuGet to explore --- ### Microsoft.Extensions.AI 10.3.0: IChatClient - **URL:** https://www.dotnetstudioai.com/news/microsoft-extensions-ai-1030-released/ - **Description:** Microsoft.Extensions.AI 10.3.0 updates IChatClient, IEmbeddingGenerator, middleware, and OpenTelemetry for provider-agnostic .NET AI. - **Category:** news - **.NET Version:** .NET 8 - **Last Verified:** 2026-10-24 - **Tags:** Microsoft.Extensions.AI, .NET 8+, AI Abstractions, NuGet Release, IChatClient **Technical Summary:** Microsoft.Extensions.AI 10.3.0 ships updated IChatClient and IEmbeddingGenerator interfaces with improved middleware pipeline composition, enhanced OpenTelemetry tracing, and new resilience middleware for 429 rate limit handling. Compatible with .NET 8 LTS and later. **Key Takeaways:** - IChatClient and IEmbeddingGenerator now support richer pipeline middleware composition - New built-in resilience middleware handles 429 rate limit responses automatically - OpenTelemetry integration now emits gen_ai.* semantic convention spans - Compatible with .NET 8 LTS — no need to upgrade to .NET 10 - Semantic Kernel 1.34+ delegates to IChatClient under the hood **Implementation Steps:** - [ ] Update Microsoft.Extensions.AI NuGet package to 10.3.0 - [ ] Update Microsoft.Extensions.AI.OpenAI to matching version - [ ] Review middleware pipeline for any breaking changes in builder API - [ ] Enable OpenTelemetry gen_ai spans for observability - [ ] Test Ollama and Azure OpenAI backends with updated client --- ### Open-Source LLMs in .NET: Run Llama 3, DeepSeek & Qwen Locally in C# - **URL:** https://www.dotnetstudioai.com/news/open-source-llms-dotnet-developers/ - **Description:** Run Llama 3, DeepSeek, and Qwen locally in C# via Ollama and ONNX Runtime. No cloud APIs, no inference costs — full offline AI in .NET. - **Category:** news - **Last Verified:** 2026-10-24 - **Tags:** Open-Source LLMs, Llama, DeepSeek, Ollama, ONNX Runtime, .NET AI **Technical Summary:** Open-source LLMs (Llama 3, DeepSeek, Qwen, Mistral, Phi) have reached production-viable quality for many tasks. .NET developers can run these models locally using Ollama with the Microsoft.Extensions.AI.Ollama provider, or directly via ONNX Runtime. The IChatClient abstraction makes local and cloud models interchangeable in code. Open-source models are best suited for development/testing, data-sovereign environments, edge deployment, and cost-sensitive high-volume workloads. **Key Takeaways:** - Llama 3, DeepSeek-V3, Qwen 2.5, and Mistral provide production-viable open-source LLM options - Ollama is the simplest path to local LLM inference — install, pull a model, and serve via HTTP - Microsoft.Extensions.AI.Ollama provides IChatClient for Ollama — same code as Azure OpenAI - ONNX Runtime enables in-process model inference without an external server - Microsoft's Phi models (Phi-3, Phi-3.5) are optimized small language models for edge and on-device scenarios - Open-source models excel for dev/test, data sovereignty, air-gapped environments, and cost control - Cloud APIs remain better for maximum quality, SLA guarantees, and managed scaling **Implementation Steps:** - [ ] Install Ollama and pull a model (llama3 or phi3) for local development - [ ] Add Microsoft.Extensions.AI.Ollama NuGet package to your project - [ ] Configure IChatClient to use Ollama locally and Azure OpenAI in production - [ ] Evaluate open-source model quality against your specific task requirements - [ ] Consider ONNX Runtime for scenarios requiring in-process inference - [ ] Assess data sovereignty and compliance requirements that may favor local models - [ ] Test performance and quality trade-offs before committing to open-source for production --- ### ChatGPT Agent Mode Launched: What It Means for .NET + Semantic Kernel - **URL:** https://www.dotnetstudioai.com/news/openai-chatgpt-agent-mode-launched/ - **Description:** ChatGPT Agent Mode enables autonomous browsing and multi-step tasks. How these agentic patterns map to .NET apps using Semantic Kernel function calling. - **Category:** news - **Last Verified:** 2026-10-24 - **Tags:** OpenAI, AI Agents, ChatGPT, .NET AI, Industry News **Technical Summary:** OpenAI launched ChatGPT Agent Mode (Operator), enabling autonomous browsing, app interaction, and multi-step task execution. For .NET developers, this validates the agentic architecture pattern and aligns with Microsoft's investment in Semantic Kernel agents, the Agent Framework, and AutoGen. Key engineering lessons include tool registration design, error recovery loops, human-in-the-loop checkpoints, and the wide gap between demo agents and production-ready systems. **Key Takeaways:** - ChatGPT Agent Mode (Operator) autonomously browses, interacts with apps, and executes multi-step workflows - This validates the agentic pattern at consumer scale — autonomous AI systems are the industry direction - Microsoft Semantic Kernel, Agent Framework, and AutoGen provide equivalent building blocks for .NET - Production agents require tool registration, error recovery loops, and human-in-the-loop safety checkpoints - The gap between a demo agent and a production agent is primarily in error handling, observability, and guardrails **Implementation Steps:** - [ ] Understand the agentic pattern: LLM + tools + autonomous decision loop + memory - [ ] Explore Semantic Kernel agent abstractions and plugin registration - [ ] Review Microsoft Agent Framework for multi-agent orchestration patterns - [ ] Design error recovery and human-in-the-loop checkpoints into any agent architecture - [ ] Start with a single-tool agent before scaling to multi-step autonomous systems --- ### AI Agents vs Chatbots: A Practical Definition for .NET Engineers - **URL:** https://www.dotnetstudioai.com/news/what-is-an-ai-agent-practical-definition/ - **Description:** Engineering definition of AI agents: autonomy levels, tool use, reasoning loops, and how they differ from chatbots. What this means for .NET developers in 2026. - **Category:** news - **Last Verified:** 2026-10-24 - **Tags:** AI Agents, Definition, Industry Analysis, .NET AI **Technical Summary:** The AI industry lacks a unified definition of 'agent.' A practical engineering definition: agent = LLM + tools + autonomous decision loop + memory. Agents exist on a spectrum from simple chatbots to fully autonomous systems. In the .NET ecosystem, Semantic Kernel plugins map to tools, the SK planner maps to the decision loop, and the Microsoft Agent Framework provides full agent orchestration. The definition matters architecturally because you design differently for a chatbot (stateless request-response) than for an agent (stateful, autonomous, tool-using). **Key Takeaways:** - There is no industry-standard definition of AI agent — every company defines it differently - Practical engineering definition: agent = LLM + tools + autonomous decision loop + memory - Agents exist on a spectrum: chatbot → tool-using assistant → semi-autonomous agent → fully autonomous agent - The definition matters for architecture: chatbots are stateless request-response; agents are stateful autonomous systems - In .NET: SK plugins = tools, SK planner = decision loop, Agent Framework = full agent orchestration - Start building at the tool-using assistant level before attempting fully autonomous agents **Implementation Steps:** - [ ] Understand the four components: LLM + tools + decision loop + memory - [ ] Classify your current AI features on the chatbot-to-agent spectrum - [ ] Identify which workloads would benefit from autonomous tool use - [ ] Start with Semantic Kernel plugins and AutoInvokeKernelFunctions - [ ] Design human-in-the-loop checkpoints before adding autonomy - [ ] Review Microsoft Agent Framework for multi-agent coordination needs ---