
Welcome to the course. Let's quickly go over what we are about to learn pre-requisites there are.
In this lecture, we will take a high-level overview of what the Microsoft Agent Framework consists of and its origin.
Small heads-up of some breaking change that have happend between the recording of the videos and now in the Agent Framework
Having taken a similar course like this myself, I know you want to see some code now!... So we will leave the theory behind a bit, and see Microsoft Agent Framework in action, well knowing that we are skipping a few steps here... Don't worry; we will go into more details after Hello is done.
We will, in this lecture, install the needed NuGet package and make the raw connection
We will use the raw connection and make our first Agent and call to the LLM
To see our options, let's replace OpenAI as the provider with Azure OpenAI as the provider instead (to show that you only switch the raw connection, and the rest of the code will remain the same)
Let's see how to properly store secrets for LLMs in C# code using User-Secrets + Go to OpenAI / Azure OpenAI and revoke the exposed secrets.
In this Optional video, I show that it is not only OpenAI and Azure OpenAI that the Microsoft Agent Framework can't connect to, but literally anything is supported! You can skip this if you only intend to use OpenAI
Note (July 2026): GitHub Models are being retired so they can't be used anymore.
In this lecture, I will give you a brief introduction to the Companion GitHub Repository
Before we go into the main content of the course, I want to touch on the subject of cost to follow along. It is a rather lengthy but important topic... If you do not care about cost, you can skip it for now and see it at the end for reference.
It is time to introduce the 4 main concepts of AI, and what the main part of the rest of this course is about
In this video, we talk about why "Chat" is not really a covering word anymore, and how we use "Chat" for not just chatbots.
In this first sample, we dive a little deeper into what we actually did during Hello World, and introduce the option to do streaming calls
In this lecture, we will introduce the Chat-loop and how to make the AI able to do follow-up questions using an AgentSession.
In this lecture, I will give an introduction to Prompt engineering, in the form of setting Instructions on the Agent
In this optinal lecture, we will explore all the options there are for setting options when creating agents.
In this optional lecture, we will explore the options you have when making the call to the agent beyond the message and AgentThread we have already seen.
In this lecture, we are going to define, create, and use our first AI Tools
In this lecture, we will learn how to consume an MCP Server
In this lecture, we will introduce Tool Calling Middleware that lets you log, change, and refuse tool calls.
In this lecture, I will show you that you can use Agents as Tools for other Agents
In this lecture, we explore how we can feed up-to-date information into our agent when the user asks for current news items, beyond AI's cut-off date.
In this lecture, I will teach you about the code_interpreter tool, that let an AI execute python script in a sandbox container online, for complex operations or example chart-generation.
In this lecture, we will finally look into Structured Output: what it is and the problem it solves
Let's explore how Structured Output can have Instructions on the object
As we are on 3/4 of the way through the 4 main concepts of AI, we now have enough knowledge to see what actually happens when we call an LLM in terms of requests to the LLM and responses back
In this optional video, I will show you how to enable the option to see the raw Request/Response of an LLM
Welcome to the RAG section of this course; RAG is a complex topic with many moving parts, so in this first lecture, we will talk about what RAG actually is before we get into the code
In this lecture, we will take what we learned in the previous one and make it more abstract in what parts of tech are involved and what the flow is to making RAG happen.
In this Lecture we will see how Embedding Vectors are generated and check how similar they are to each other
Now that we know about Vectors, let's choose a vector store to ingest the vectors into.
Now that we have our Vector Store, let's use it in a sample Chatbot and see the result
In this lecture, I will show a variation on how to use RAG as a Tool instead of always searching the Vector store upfront.
You made it through the 4 main concepts of AI and IMHO are able to make at least 90% of all the AI Apps you need to make. This lecture introduces the rest of this course.
Explore what reasoning means for LLMs, how chain-of-thought and auto reasoning work, and when to enable or limit thinking across OpenAI, Google, and Anthropic within the Microsoft Agent Framework.
Learn to control the reasoning effort in the Microsoft Agent Framework for AI in C#, using Azure OpenAI and OpenAI, and compare minimal, low, medium, and high settings.
Explore how the Microsoft Agent Framework enables multimodal inputs—text, images, and PDFs—using Azure AI and OpenAI, with data extraction and retrieval augmented generation.
Shows how to add memory to AI agents with a custom AI context provider and memory extractor, persisting user facts like name and location.
Configure OpenTelemetry in the Microsoft Agent Framework to export AI traces to the console, application insights, and Azure Monitor. Set up a trace source and provider with sensitivity options.
In this video, I explore the Agent Framework HarnessAgent that allows you to build tools like Codex and GitHub Copilot via the Agent Framework
Hi, and welcome to the course 'AI in C# using the Microsoft Agent Framework.'
My name is Rasmus, and I will be taking you through how you can use AI in your C# Apps using Microsoft's Agent Framework (The replacement of Semantic Kernel)...
The content will revolve around what I call the 4 main concepts of AI that will lay a solid foundation for working with AI
Those 4 concepts are:
1. Chat (General Q&A Capabilities)
Either as a real chat or behind the scenes
2. Tools Calling (Ability to call User-code)
Live interaction with other systems for data queries and commands
3. Structured Output (More structured responses)
Get AI responses back in JSON format instead of messages
4. Retrival Augmented Generation (RAG)
Give your own data to AI by turning Text into Search Vectors
---
In order to follow along in the course, I expect you to be proficient in C#, meaning I will teach you the AI parts, but will assume you know the C# language fully.
You will also need an IDE like Visual Studio or similar (I will be using VS2026)
Finally, you will need access to a Large Language Model... If you do not have that already, don't worry, I will show you how to get such access...
In the course, I will demo OpenAI and Azure OpenAI
Let's get started!