Devui
Giving any agent a local chat window plus a live call inspector with agent_framework.devui.serve.
What it demonstrates
DevUI is a local web app that wraps any agent (or workflow) in a chat window plus an inspector panel that shows each model call and tool call as it happens. It is the fastest way to actually see an agent behave — no curl, no print statements. You build a normal Foundry agent, then hand it to serve(), which boots a local web server and blocks until Ctrl-C. Pass several entities and you can switch between them in the UI.
One real excerpt
from agent_framework.devui import serve
agent = build_agent() # a normal Foundry-backed Agent with a get_weather tool
print("Starting DevUI — open the printed URL, ask about the weather, watch the tool call.")
serve(entities=[agent]) # blocks; add more agents/workflows to switch between them
The gotcha
DevUI ships as a separate package — agent-framework-devui — so the from agent_framework.devui import serve import raises ModuleNotFoundError on a bare install. Fix it with uv sync --extra hosting (or uv add agent-framework-devui). Also note that serve() owns the event loop: it is a blocking call, so there is no asyncio.run() around it and no await — you call it directly from a synchronous main().
Azure / MAF mapping
The served entity is a plain Agent over FoundryChatClient (project_endpoint + model + AzureCliCredential), so DevUI is transport, not intelligence — it just renders the same model and tool calls the Foundry client already makes. Because it accepts a list of entities, one DevUI process can front several agents and even workflows side by side.
Run it
uv run tutorial/04-hosting/01_devui.py — needs Foundry creds (run az login first) and the hosting extra installed. Worked if you see two startup lines then the server prints its URL; open it, ask about the weather, and watch the tool call appear in the inspector.
Next: A2A