LangChain and LangGraph agents on Microsoft Foundry

Build a local LangChain agent with Ollama, then examine Foundry deployment, retrieval, web search and tracing, including preview limitations.

Player not loading? Watch on YouTube

This Python tutorial builds a LangChain V1 agent with Ollama, then explains how to host agents and LangGraph workflows on Microsoft Foundry. The local example uses Qwen3.5 4B through an OpenAI-compatible localhost endpoint. A Python function supplies benefits-enrollment information. The presenter reports using a machine with 16 GB RAM; this is demo hardware, not a minimum requirement.

The next example switches to a Foundry model endpoint with GPT 5.2 and an Entra token provider. Foundry IQ supplies knowledge retrieval through MCP. A Foundry toolbox exposes web search and code interpreter, though the demonstrated search request uses web search. A toolbox MCP integration bug requires a separate connection to Foundry IQ.

Deployment uses a repository-provided Responses API adapter, Docker and Azure Developer CLI. The session covers deployment configuration, a local development server, playground results and OpenTelemetry tracing. The presenter warns that recorded tool arguments may contain sensitive data.

A simple LangGraph workflow successfully uppercases and reverses text. Azure logout interrupts trace inspection and prevents the live LLM workflow example from running; the presenter uses a saved trace screenshot and shows an existing deployed workflow result. Hosted agents were in public preview, with reported issues. The deployment relies on hosted Azure services.