Microsoft Agent Framework: build and deploy to Foundry
Build a Python bakery agent with two tools, inspect calls in DevUI, and deploy to Microsoft Foundry using a GPT-5.4 mini deployment.
Player not loading? Watch on YouTube
Frankie walks through a Python bakery AI agent built with Microsoft Agent Framework. It uses dummy menu and order data, with functions for searching products and checking order status. Function annotations describe the tools and their parameters to the model.
Setup includes a virtual environment, pip dependencies, and an .env file containing the model deployment name and Microsoft Foundry project endpoint. The example uses an existing GPT-5.4 mini deployment and Default Azure Credential for authentication. Although the code and development interface run locally during testing, inference requests go to Foundry. This demonstration does not run models locally or establish offline operation.
A verbose script exposes the request cycle: the model receives instructions, a user message and tool definitions, requests tool calls, then receives their outputs in another inference request. DevUI provides a local interface for checking conversations, events and traces.
The speaker compares container-hosted agents with portal-created prompt agents, describing the latter as requiring less setup but allowing less customization. Deployment uses the Microsoft Foundry toolkit for VS Code, with code upload and remote dependency installation. The example requires azure.yaml for deployment configuration and environment variables; the project endpoint is injected automatically in this workflow. The final playground test checks logs, traces and the order-status function.