Build Your First AI Agent in .NET
AI & .NET
2 days
Duration
12-25 people
Group Size
Intermediate
Level
2-Day Intensive

Build Your First AI Agent in .NET

You write the agent yourself in C#, starting from a raw HTTP call and finishing with your own MCP server. Two days, then the same agent rebuilt on a framework so you can see what it actually adds.

November 17-18, 2026, Porto, Portugal. 1,390 EUR, 2-day workshop pass. NDC Porto sells the seat and handles the booking.

Already going? It runs the Tuesday and Wednesday before the talks start, 09:00 to 17:00.

At NDC AI Oslo in June 2026, all 20 people who filled in the feedback form rated both the instructor and the content Very Good. Read the feedback.

Want it for your team instead? Black Lab Studios runs it privately.

What you'll achieve:

  • An agent you built yourself in C#, and a project you take home and keep building on
  • Tool calling, search by meaning, memory and the agent loop, written by hand before any framework hides them
  • Evals that tell you when a prompt, tool or model change broke something
  • An MCP server of your own, plugged into Claude Desktop or VS Code
  • A clear picture of the parts inside Codex, Copilot and Claude, because you just wrote a small version of them

Prerequisites:

  • You build APIs in C# and are comfortable in the language
  • You'd rather learn by writing code than by watching slides
  • Install your IDE (Visual Studio 2026 if that's your pick), the .NET 10 SDK, Docker and Git before you arrive
  • A GitHub account, plus an Azure account or your own OpenAI API key. Expect up to 5 euros of usage.
Instructor
Gui Ferreira
Software Engineer Educator | Microsoft MVP

Somebody at your company has already shipped an agent. It books meetings, or it triages support tickets, or it reads invoices and decides something about them. You've seen the demo. What you haven't seen is the code, and you have a suspicion that the demo and the code are quite far apart.

They usually are. A chat box wired to an API is a weekend. An agent that reasons about real data, calls tools without going off the rails, remembers what you told it ten minutes ago and doesn't leak your database to a prompt injection is a different piece of engineering.

What you build

One thing, across two days: a personal finance assistant. It reads a question in plain language, pulls actual transaction data, holds the thread of a conversation, and does things for you once you've said yes.

We start with a raw HTTP call to a model. No SDK, no framework, nothing hiding the mechanics. Then we refactor behind a clean abstraction and keep building on it, so that by the end you can look at any agent library and recognise what it's doing, because you already wrote it once by hand.

Day one is the machinery: the model, tools, the loop, search by meaning and memory. Day two is everything that stands between a working prototype and something you'd let a colleague use. Context that doesn't blow up on a long chat. Prompt injection. Asking before it does anything with consequences. Evals, so you know a change didn't quietly break it. Then you put it behind your own MCP server and plug it into Claude Desktop or VS Code.

What this isn't

Not a tour of frameworks. Not a slide deck about what agents might mean for your industry. We do touch a framework, right at the end, by rebuilding what you wrote on Microsoft Agent Framework. By then you know every piece it replaces, so you can judge where it helps and where your own code was already enough.

Is this for you?

If you build APIs in C# and you'd rather learn by writing code than by watching someone else's, yes. You don't need any AI background to start.

Before you come

Set up your Azure account, or get your OpenAI key, at home. Every workshop where people do it in the room loses the first hour, and the first hour is the one where we write the raw call that everything else is built on.

Curriculum

You build one thing across the two days: a personal finance assistant that reads natural language, pulls real transaction data, remembers what you told it earlier, and acts on your behalf when you say so. It runs on Microsoft Foundry by default, or on your own OpenAI key. The project switches between the two.

1

Talking to the model directly

Day 1

We start at the metal, with a raw HTTP call and no library in the way. Then we refactor behind an abstraction you keep using for the rest of the two days.

Key Topics:

  • What the model is actually doing when it answers you
  • Prompts and tokens, and why both end up on your bill
  • One raw API call, no SDK, so you see the shape of the thing
  • Moving to IChatClient, and what that buys you the day the provider changes
2

Tools and the agent loop

Day 1

Up to here it can only talk. Now it reads your data and does things, and you write the loop that decides which tool runs next.

Key Topics:

  • Declaring the tools it is allowed to reach for
  • Describing a tool well enough that the model picks the right one
  • Feeding the result back in and letting it decide the next step
  • Capping the loop, before it decides to run four hundred times
3

Search by meaning

Day 1

You ask in your words and the bank statement uses its own. An exact match never connects the two. Agentic RAG does.

Key Topics:

  • What an embedding is, and what "close" means to it
  • Giving the agent search as a tool, so it decides when to look
  • Finding transactions by what they mean, not how they were typed
4

Memory

Day 1

Every turn starts from nothing unless you carry the history yourself. You carry it, so a follow-up question doesn't need the whole story again.

Key Topics:

  • Why an agent forgets between turns
  • Keeping conversation history that stays useful
5

Long conversations and safety

Day 2

Day two opens with what breaks once real people use it. Long chats fill the context window, and some of what comes in was written to trick it.

Key Topics:

  • Summarising older messages and choosing what the model actually sees
  • Tracing a run so you can reconstruct what it did and why
  • What prompt injection looks like when it lands on your agent
  • Asking for confirmation before anything with consequences
6

Evals

Day 2

You will change a prompt, swap a tool or move to a new model. Evals are how you find out it still works before your users find out it doesn't.

Key Topics:

  • Writing evals for an agent, not just for a function
  • Running them after every prompt, tool or model change
7

Your own MCP server

Day 2

Right now it only runs where you run it. Put it behind MCP and any client that speaks the protocol can use what you built.

Key Topics:

  • What MCP is and what it solves
  • Building an MCP server in .NET
  • Plugging it into Claude Desktop or VS Code
8

Rebuilding it on Microsoft Agent Framework

Day 2

We finish by rebuilding the agent on a framework. You already wrote every piece by hand, so you can see exactly what it saves you and what it doesn't.

Key Topics:

  • Swapping your hand-written pieces for the framework's, one at a time
  • Where the framework earns its place
  • Where your own code was already enough

What participants say

The last time this ran in Oslo, at NDC AI in June 2026, all 20 people who filled in the feedback form rated both the instructor and the content "Very Good". The forms are anonymous, so the quotes below carry no names.

Gui was an excellent instructor, fantastic pace, good explanations and analogies. Covered each topic in depth.
Top notch workshop! The content was relevant and easy to follow, even without prior knowledge about the topic.
The instructor teaches abstract concepts by using hands-on techniques in an efficient way... his teaching style which is engaged, inspiring and honest.

Catch it in public

When this runs in public it runs at a conference, and the conference sells the seat. Registration goes to them, not to me.

NDC Porto

2-Day Intensive

November 17-18, 2026
Porto, Portugal
Seats available
1,390 EUR, 2-day workshop pass

Already going? It runs the Tuesday and Wednesday before the talks start, 09:00 to 17:00.

NDC London

2-Day Intensive

January 25-26, 2027
London, United Kingdom
Seats available
1,650 GBP plus VAT, 2-day workshop pass (1,450 GBP early bird until 2 October)

Already going? It runs the Monday and Tuesday before the talks start.

Frequently Asked Questions

Want this for your team?

Private sessions run on-site or remote, against the codebase your team actually works in. Black Lab Studios, the company I founded, handles the scoping and the contract. I run the room.

NDC Porto
November 17-18, 2026
Register