When we build agents, we often want to give them the ability to browse the web: open webpages, navigate from one page to the other, and read the content of a webpage. By combining Pydantic AI with the Playwright capability from Pydantic AI Harness, we can build agents that browse the web safely and programmatically. Using Pydantic AI with Microsoft Foundry models Pydantic AI is an open-source model-agnostic framework from Pydantic for building LLM-based applications and agents. It's type-safe and supports OpenTelemetry, making it a great choice for robust production applications. We can use…
When we build agents, we often want to give them the ability to browse the web: open webpages, navigate from one page to the other, and read the content of a webpage. By combining Pydantic AI with the Playwright capability from Pydantic AI Harness, we can build agents that browse the web safely and programmatically. Using Pydantic AI with Microsoft Foundry models Pydantic AI is an open-source model-agnostic framework from Pydantic for building LLM-based applications and agents. It's type-safe and supports OpenTelemetry, making it a great choice for robust production applications. We can use…
Model Context Protocol (MCP) is an open protocol that describes how agents can connect to external tools and data sources, and is now widely supported by the most popular coding agents (like GitHub Copilot, Claude Code, and Codex) and agent frameworks (like LangChain and Pydantic AI). If you want to give agents a standard way to access the data in a database, you can build your own MCP server and expose tools for the agent to query or even modify data. But you need to design your MCP server carefully, to ensure that agents can do everything that users want - but nothing that you don't want…
Model Context Protocol (MCP) is an open protocol that describes how agents can connect to external tools and data sources, and is now widely supported by the most popular coding agents (like GitHub Copilot, Claude Code, and Codex) and agent frameworks (like LangChain and Pydantic AI). If you want to give agents a standard way to access the data in a database, you can build your own MCP server and expose tools for the agent to query or even modify data. But you need to design your MCP server carefully, to ensure that agents can do everything that users want - but nothing that you don't want…
When we're building automation tools in 2025, I see two main approaches: Agent + MCP: Point an LLM-powered Agent at MCP servers, give the Agent a detailed description of the task, and let the Agent decide which tools to use to complete the task. For this approach, we can use an existing Agent from agentic frameworks like PydanticAI, OpenAI-Agents, Semantic Kernel, etc., and we can either use an existing MCP server or build a custom MCP server depending on what tools are necessary to complete the range of tasks. Old school with LLM sprinkles: This is the way we would build it before LLMs:…
In the summer of 2006, I discovered the blossoming world of web APIs: HTTP APIs like the Flickr API, JavaScript APIs like Google Maps API, and platform APIs like the iGoogle gadgets API. I spent my spare time making "mashups": programs that connected together multiple APIs to create new functionality. For example: A search engine that found song lyrics from Google and their videos from YouTube A news site that combined RSS feeds from multiple sources A map plotting Flickr photos alongside travel recommendations I adored the combinatorial power of APIs, and felt like the world was my mashable…
I'm writing this post on the flight back from PyCon US 2026 in Long Beach, California. It was my second time attending PyCon, and it was a fantastic conference - a cornocopia of Python knowledge, but more importantly, a coming-together of developers across the Python ecosystem. I'll recap my PyCon US 2026 experience in this post, both what I contributed and what thousands of others contributed. First, a big old disclaimer: part of my job as a developer advocate at Microsoft is to attend conferences like PyCon, so I was able to expense my travel and spend my work days on my PyCon…
I'm writing this post on the flight back from PyCon US 2026 in Long Beach, California. It was my second time attending PyCon, and it was a fantastic conference - a cornocopia of Python knowledge, but more importantly, a coming-together of developers across the Python ecosystem. I'll recap my PyCon US 2026 experience in this post, both what I contributed and what thousands of others contributed. First, a big old disclaimer: part of my job as a developer advocate at Microsoft is to attend conferences like PyCon, so I was able to expense my travel and spend my work days on my PyCon…
I recently spoke at the PyAI conference, put on by the good folks at Prefect and Pydantic, and I learnt so much from the talks I attended. Here are my top takeaways from the sessions that I watched: AI Evals Pitfalls Hamel Husain 📺 Watch the video recording | 📊 View slides Hamel cautioned against blindly using automated evaluation frameworks and built-in evaluators (like helpfulness and coherence). Instead, we should adopt a data science approach to evaluation: explore the data, discover what's actually breaking, identify the most important metric, and iterate as new data comes in. We…
The Model Context Protocol (MCP) gives AI agents a standard way to call external tools, but things get more complicated when those tools need to know who the user is. In this post, I’ll show how to build an MCP server with the Python FastMCP package that authenticates users with Microsoft Entra ID when they connect from a pre-authorized client such as VS Code. If you need to build a server that works with any MCP clients, read my previous blog post. With Microsoft Entra as the authorization server, supporting arbitrary clients currently requires adding an OAuth proxy in front, which increases…
The Model Context Protocol (MCP) gives AI agents a standard way to call external tools, but things get more complicated when those tools need to know who the user is. In this post, I’ll show how to build an MCP server with the Python FastMCP package that authenticates users with Microsoft Entra ID when they connect from a pre-authorized client such as VS Code. If you need to build a server that works with any MCP clients, read my previous blog post. With Microsoft Entra as the authorization server, supporting arbitrary clients currently requires adding an OAuth proxy in front, which increases…
MCP servers contain tools, and each tool is described by its name, description, input parameters, and return type. When an agent is calling a tool, it formulates its call based on only that metadata; it does not know anything about the internals of a tool. For my PyAI talk last week, I investigated this hypothesis: If we use stricter types for MCP tool schemas, then agents calling those tools will be more successful. This was a hypothesis based on my personal experience over the last year of developing with agents and MCP servers, where I'd started with MCP servers with very minimal schemas,…
MCP servers contain tools, and each tool is described by its name, description, input parameters, and return type. When an agent is calling a tool, it formulates its call based on only that metadata; it does not know anything about the internals of a tool. For my PyAI talk last week, I investigated this hypothesis: If we use stricter types for MCP tool schemas, then agents calling those tools will be more successful. This was a hypothesis based on my personal experience over the last year of developing with agents and MCP servers, where I'd started with MCP servers with very minimal schemas,…
When I was a kid, one of my first Java applets was a UI for choosing outfits by mixing and matching different articles of clothing. Now, with the advent of agents and MCP, I realized that I could make a modern, more dynamic version: an MCP server that can find relevant clothing based off a user query, and render matching clothing as a slideshow. Let's walk through the experience and code powering it. Searching for relevant clothing After connecting VS Code to my closet MCP server, I ask a query like: i am presenting at PyAI about MCP, do I have MCP themed clothing? show me the best option.…
When I was a kid, one of my first Java applets was a UI for choosing outfits by mixing and matching different articles of clothing. Now, with the advent of agents and MCP, I realized that I could make a modern, more dynamic version: an MCP server that can find relevant clothing based off a user query, and render matching clothing as a slideshow. Let's walk through the experience and code powering it. Searching for relevant clothing After connecting VS Code to my closet MCP server, I ask a query like: i am presenting at PyAI about MCP, do I have MCP themed clothing? show me the best option.…
I recently spoke at the PyAI conference, put on by the good folks at Prefect and Pydantic, and I learnt so much from the talks I attended. Here are my top takeaways from the sessions that I watched: AI Evals Pitfalls Hamel Husain 📺 Watch the video recording | 📊 View slides Hamel cautioned against blindly using automated evaluation frameworks and built-in evaluators (like helpfulness and coherence). Instead, we should adopt a data science approach to evaluation: explore the data, discover what's actually breaking, identify the most important metric, and iterate as new data comes in. We…
In December, we presented a series about MCP, culminating in a session about adding authentication to MCP servers. I demoed a Python MCP server that uses Microsoft Entra for authentication, requiring users to first login to the Microsoft tenant before they could use a tool. Many developers asked how they could take the Entra integration further, like to check the user's group membership or query their OneDrive. That requires using an "on-behalf-of" flow, also known as "delegation" in OAuth, where the MCP server uses the user's identity to call another API, like the Microsoft Graph API. In…
In December, we presented a series about MCP, culminating in a session about adding authentication to MCP servers. I demoed a Python MCP server that uses Microsoft Entra for authentication, requiring users to first login to the Microsoft tenant before they could use a tool. Many developers asked how they could take the Entra integration further, like to check the user's group membership or query their OneDrive. That requires using an "on-behalf-of" flow, also known as "delegation" in OAuth, where the MCP server uses the user's identity to call another API, like the Microsoft Graph API. In…
I do not consider myself an expert in generative AI, but I now know enough to build full-stack web applications on top of generative AI models, evaluate the quality of those applications, and decide whether new models or frameworks will be useful. These are the resources that I personally used for getting up to speed with generative AI. AI foundation Let's start first with the long-form content: books and videos that gave me a more solid foundation. table.favorites { width: 100%; border-collapse: collapse; margin: 1em 0; } table.favorites td { padding: 12px; vertical-align: top; }…
MCP is one of the fastest growing technologies in the Generative AI space this year, and the first AI related standard that the industry has really embraced wholeheartedly. I just gave a three-part live stream series all about Python + MCP. I showed how to: Build MCP servers in Python using FastMCP Deploy them into production on Azure (Container Apps and Functions) Add authentication, using either Keycloak and Microsoft Entra as the OAuth provider All of the materials from our series are available and linked below: Video recordings of each stream Powerpoint slides Open-source code samples…
Read at the source
Your visit, your choice.
Optional Google Analytics helps us understand visits. Microsoft Clarity records masked interactions to improve the site. Optional tools stay off unless you choose them. Privacy details.