Microsoft Agent Framework – Part 0

I’ve been looking at a number of different ways to build Agents. I’ve settled on two and will be documenting what I learn as I go:

  • Building from first principles based on my course on Agentics at Johns Hopkins
  • Building using Microsoft’s new Agent Framework

The advantage of the first is that you understand the underlying mechanisms in more depth; the advantage of the second is that a lot of the plumbing is done for you and you become more productive more quickly.

I will do the .NET work in C#, and probably do all the other work in Python. See my blogpost on why Python.

I will, to a degree, be documenting what I learn as I learn it, without infringing on copyright, of course.

Project 1 – Jupyter

The work for Johns Hopkins is done in a Jupyter notebook. These are very convenient files that contain runnable cells. You put your code snippet in a cell and run it, either receiving a result or extensive error information. To get started, open Visual Studio Code and click New File. In the drop down on top, choose Jupyter Notebook:

Choose your Python environment, and put code into the first “cell.” Then click on the knob on the left and the cell runs and the output is displayed:

You can add markdown, you can even tell it to generate code based on your description of what you want. It is possible to have these cells generate a proper Python program and/or generate

Open AI Endpoint

Whether you are working in the Jupyter notebook or in Agent Framework, you will want an OpenAI Endpoint. To do so go to https://platform.openai.com, sign in, go to API Keys, create a new key. Your endpoint is the base url used for API calls.

Or… if you are working in the Microsoft ecosystem, in the Azure Portal search for Azure OpenAI and create a resource. Then go to Resource Management -> Keys and Endpoint. Copy the Endpoint and Key 1 (your API key) Deploy under Resource Management -> Model Deployments. Your endpoint will look like this:

https://<your-resource-name>.openai.azure.com/

Copilot can set all this up for you.

Next up: setting up your environment.

Unknown's avatar

About Jesse Liberty

** Note ** Jesse is currently looking for a new position. You can learn more about him at https://jesseliberty.bio Thank you. Jesse Liberty has three decades of experience writing and delivering software projects and is the author of 2 dozen books and a couple dozen online courses. His latest book, Building APIs with .NET, is now available wherever you buy your books. Liberty was a Team Lead and Senior Software Engineer for various corporations, a Senior Technical Evangelist for Microsoft, a Distinguished Software Engineer for AT&T, a VP for Information Services for Citibank and a Software Architect for PBS. He is a 13 year Microsoft MVP.
This entry was posted in Essentials. Bookmark the permalink.