Tutorials ASP.NET Core with Agentic AI Tutorial
Semantic Kernel Basics — Complete Guide
Semantic Kernel Basics — Complete Guide: free step-by-step lesson with examples, common mistakes, and interview tips — part of ASP.NET Core with Agentic AI Tutorial on Toolliyo Academy.
On this page
ASP.NET Core with Agentic AI Tutorial · Lesson 21 of 100
Semantic Kernel Basics
AI basics → Agents
AI basics · 1 — Setup · ~6 min · Module 3: Semantic Kernel
What is this?
Semantic Kernel (SK) is Microsoft's SDK for prompts, plugins, planners, and memory in .NET. AgentNest builds Kernel instances per tenant with allowed plugins for CRM, ERP, and hospital domains.
Why should you care?
SK unifies OpenAI and Azure OpenAI behind Kernel and KernelPlugin collections so teams stop rewriting orchestration for each feature.
See it live — copy this example
Paste into an ASP.NET Core 8+ / AgentNest project, then run with dotnet run (set your API keys in user-secrets).
// AgentNest.Agents/KernelFactory.cs
public static Kernel Create(IChatClient chat, CrmPlugin crm)
{
var builder = Kernel.CreateBuilder();
builder.Services.AddSingleton(chat);
builder.Plugins.AddFromObject(crm, pluginName: "crm");
return builder.Build();
}
What happened?
- KernelFactory registers IChatClient and adds CrmPlugin as a named plugin.
- Agents invoke kernel.InvokeAsync with function names like crm.GetAccount.
Practice next
- dotnet add package Microsoft.SemanticKernel.
- build CrmPlugin with [KernelFunction] methods.
- Build Kernel in DI via KernelFactory.Create.
- Add HospitalPlugin alongside CrmPlugin and test selective registration.
- Log plugin name on each InvokeAsync for audit.
Remember
Semantic Kernel wraps chat clients and plugins in one Kernel. AgentNest centralizes Kernel creation in a factory. Plugins expose tools as attributed C# methods.
Unified agent host
Three squads each wrote custom OpenAI wrappers.
Outcome: KernelFactory standardizes plugin hosting and cuts duplicate HTTP code.
Interview prep for this lesson
Practice these questions aloud after reading—each links to a full structured answer.
Sign in to ask a question or upvote helpful answers.
No questions yet — be the first to ask!