Tutorials ASP.NET Core with Agentic AI Tutorial
Plugins — Complete Guide
Plugins — 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 22 of 100
Plugins
AI basics → Agents
AI basics · 1 — Setup · ~6 min · Module 3: Semantic Kernel
What is this?
Plugins bundle related tools the model can call — CRM lookups, ERP journals, lab results. In SK they are KernelPlugin instances backed by C# classes with KernelFunction attributes.
Why should you care?
Hospital assistants need allergy and medication plugins separated so RBAC can disable whole groups per role.
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.Plugins/Hospital/AllergyPlugin.cs
public sealed class AllergyPlugin(IAllergyRepository repo)
{
[KernelFunction, Description("List patient allergies by MRN")]
public async Task<string> ListAsync(string mrn, CancellationToken ct)
{
var items = await repo.GetByMrnAsync(mrn, ct);
return string.Join("; ", items.Select(a => a.Substance));
}
}
What happened?
- Description helps the model choose ListAsync.
- The plugin returns a compact string the LLM can cite in triage summaries.
Practice next
- Create AllergyPlugin in AgentNest.Plugins.
- Register with builder.Plugins.AddFromObject(new AllergyPlugin(repo), "allergy").
- Enable auto tool calling in agent loop for hospital queries.
- Add SearchByIngredient kernel function for drug checks.
- Wrap repo calls with audit logging.
Remember
Plugins group KernelFunctions by domain. Descriptions guide automatic tool selection. Keep plugin outputs minimal and redacted.
Role-based plugin sets
Nurses see allergy plugin; billing clerks do not.
Outcome: TenantAiContext.AllowedPlugins filters kernel registration at startup.
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!