Microsoft Foundry · hands-on workshop

Agents that act

Build, ground, equip, evaluate and govern AI agents
in your own Azure subscription

Hands-on workshopIn your own Azure subscription

Vraja Kishore Mudumbai
Microsoft

Today: three hours, eight sessions

10:00 · 50 min

Foundry walkthrough

Models, agents, tools, guardrails + showcase demos

20:50 · 20 min

Project and model

Verify your project and model; compare models

31:10 · 25 min

Build the first agent

Anomaly + diagnosis agents with a function tool

41:45 · 15 min

Knowledge and actions

Demo: Foundry IQ citations, work-order tool, approval step

52:00 · 20 min

Trace and evaluate

App Insights traces; coherence and fluency evaluation

62:20 · 20 min

Orchestrate and deploy

Multi-agent orchestration in code, deployed as a hosted agent

72:40 · 10 min

Production readiness

Identity, RBAC, network, safety, monitoring

82:50 · 10 min

Next steps

Pick one use case, name one owner

Talk and demoHands-on in your own project☕ Break 1:35–1:45, after session 3

Before we start: is your subscription ready?

Two kinds of permission. Most first-day failures are the second one.

Contributor

Control plane: create things

  • Foundry resource and project
  • Model deployment
  • Application Insights, Log Analytics
Foundry Project Manager

Data plane: use things

  • Create and version agents
  • Run conversations and tools
  • Run evaluations
  • Deploy hosted agents
Owner or Contributor alone can't build agents. Ask an Owner or User Access Administrator to grant Foundry Project Manager on your resource group.
Region and quota≥ 10K TPM of gpt-5.4 per person; gpt-5-mini as fallback
WorkstationCodespaces, or Python 3.10+, Azure CLI 2.80+, azd 1.27.1+, Git
Networkai.azure.com, *.services.ai.azure.com, GitHub, PyPI
ProvisionedYour own project (<alias>-workshop), model, App Insights
Smoke testPlayground replies; smoke_test.py passes

Full checklist: PREREQUISITES.md · RBAC for Foundry

Part 1 of 4

The platform

One platform, from model to production agent

The platformSee it actBuild itShip it

From a chatbot that answers to an agent that acts

📡

Live data

Reads the system, not just a document

Chatbot: answers from a PDF you uploaded

Agent: calls tools for current sensor and ERP data

🧮

Computes

Numbers come from code, not memory

Chatbot: guesses plausible numbers

Agent: runs Python and threshold checks to get them

🛠️

Acts

With a human gate where it matters

Chatbot: stops at a suggestion

Agent: raises the work order after a supervisor approves

🔍

Accountable

You can see and score every step

Chatbot: no record of why it answered

Agent: every tool call is traced and evaluated

Microsoft Foundry, left to right

🧠

Models

Catalog, compare, route

🤖

Agents

Prompt, voice, hosted

🛠️

Tools

Functions, MCP, OpenAPI

📚

Knowledge

Foundry IQ, memory

🔀

Orchestration

Agent Framework, in code

📈

Observe

Traces, evaluations, monitoring

🛡️

Operate

Identity, RBAC, network, cost

📣Publish to Microsoft Teams and Microsoft 365 Copilot, so adoption isn't another app.
Use the new Foundry portal (ai.azure.com, New Foundry on) with a Foundry project. Hub-based projects don't get the new agent capabilities or Foundry IQ.

Models: a dropdown, not a rewrite

"Is CP-003 above its vibration limit?"
"Summarise last shift's alarms"
"Why do MX-001 and EX-002 drift together after maintenance?"
→

Model Router

One deployment. Routes each request to the most cost-effective model that meets the quality bar.

→
Small, fastlookup
General purposesummary
Reasoningroot cause
OpenAI GPT-5.xAnthropic ClaudexAI GrokDeepSeekMeta LlamaMicrosoft MAIPhi Global Standard · Data Zone · Standard Check the retirement date on every model card

Routing shown is illustrative. Pay for reasoning only when the question needs it.

Three ways to build an agent, one runtime

📝

Prompt agent

Instructions + model + tools, defined as configuration. Built in the portal or with the SDK. Every save is a new version, and Foundry runs it for you.

Lab: anomaly + diagnosis agents

🎙️

Voice agent Preview

Real-time speech through Voice Live, with the same tools as a text agent. Telephony and Teams channels.

Demo: a technician speaks in their own language

📦

Hosted agent

Your code and framework (Microsoft Agent Framework, LangGraph and others) in a container, with a managed endpoint, scaling and identity.

Lab: the multi-agent orchestration, deployed with azd ai agent

Start with a prompt agent. Move to hosted only when you need custom orchestration.

Your first agent, in code


project = AIProjectClient(
    endpoint=PROJECT_ENDPOINT,
    credential=DefaultAzureCredential(),
)
openai = project.get_openai_client()

agent = project.agents.create_version(
    agent_name="fault-diagnosis",
    definition=PromptAgentDefinition(
        model="gpt-5.4",
        instructions="You diagnose faults on tyre-plant machines.",
        tools=[CodeInterpreterTool()],
    ),
)

response = openai.responses.create(
    input="CP-003 vibration is 2x baseline. Likely cause?",
    extra_body={"agent_reference": {"name": agent.name, "type": "agent_reference"}},
)
print(response.output_text)
    
1Connect to the project with Microsoft Entra ID. No keys.
2Define the agent: model, instructions, tools. Each call creates a new version.
3Call it through the Responses API by name.
✓The same agent shows up in the portal, the playground, traces and evaluations.

Tools: how agents do things

ƒ

Function

Your code, called by the agent

🔌

MCP server

Any Model Context Protocol endpoint

🌐

OpenAPI

Any REST API, from its spec

🐍

Code Interpreter

Python in a sandbox for real maths

🔎

Web search

Grounded, cited web answers

🖱️

Browser automation Preview

Websites with no API

🧩

Fabric IQ Preview

Business data and semantics

📚

Foundry IQ

Enterprise knowledge, as a tool

🧰 Toolbox Preview

IT curates the tools once and exposes them as one governed MCP endpoint to any agent.

CMMSERPDMSTMSTeams
→ one MCP endpoint, one owner
Integrating SAP PM, Maximo, a DMS or a TMS is configuration plus an API, not a new platform.

Acting safely: a tool call that waits for approval


tool = MCPTool(
    server_label="cmms",
    server_url="https://<your-cmms-mcp-endpoint>/mcp",
    require_approval="always",
    project_connection_id="cmms-connection",
)
# ...create the agent with tools=[tool], then call it...

approvals = []
for item in response.output:
    if item.type == "mcp_approval_request" and item.id:
        ok = supervisor_approves(item.name, item.arguments)
        approvals.append(McpApprovalResponse(
            type="mcp_approval_response",
            approve=ok,
            approval_request_id=item.id,
        ))

response = openai.responses.create(
    input=approvals,
    previous_response_id=response.id,
    extra_body={"agent_reference": {"name": agent.name, "type": "agent_reference"}},
)
    
1The agent decides a work order is needed and proposes the tool call.
2Execution pauses: tool name and arguments go to a person, in your UI or a Teams card.
3Approved: the tool runs. Rejected: the agent explains and stops.
⏱Every request and decision is in the trace.

Knowledge and memory, as managed services

📁 SharePoint (user permissions enforced)
🗄️ Blob storage: manuals, SOPs
🏞️ OneLake
🌐 Web
→

📚 Foundry IQ knowledge base

  1. Plans subqueries from the question
  2. Keyword, vector or hybrid search per source
  3. Semantic reranking
  4. Returns answers with source references
lowmediumhighreasoning effort
→
MCP

🤖 Diagnosis agent

"Likely bearing wear on CP-003. Replace per SOP 4.2."
📎 CP-003 maintenance manual, section 4.2
Memory Preview
Session: the current conversation
User: this technician's preferences and history
Procedural: how this plant does things

📎 Connect a Foundry IQ knowledge base · needs Azure AI Search (Basic or higher)

Part 2 of 4

See it act

Orchestration, demos and observability

The platformSee it actBuild itShip it

A multi-agent orchestration with a human gate

anomaly no anomaly 📡 Sensor feed5 machines, 4 signals 🤖 Anomaly agentcheck_thresholds() 🤖 Diagnosis agentroot cause + Foundry IQ 🙋 Supervisorapprove / reject 🛠️ Work orderCMMS tool call 📝 Log to shift report

Agents as steps

Each agent has its own tools and is evaluated on its own.

Approval step

Nothing reaches the CMMS until a person says yes.

Code first, hosted

Agent Framework, deployed as a hosted agent. Visual option: Logic Apps.

Showcase: agents doing the work

🏭

Agents on live machine data

Anomaly → diagnosis → approval → work order, on the factory scenario

6 min
🖱️

Browser automation Preview

Looks up part specs on supplier portals that have no API

5 min
🐍

Code Interpreter as analyst

Plots vibration against RPM for 48 h and checks for a bearing signature

4 min
🎙️

Voice agent Preview

A technician or service agent speaks in their own language and gets a diagnosis by voice

5 min
🧪

Evaluate, red-team, monitor

"Is it safe to put in front of thousands of users?"

4 min
💻

Foundry Toolkit for VS Code

Developer audiences: the orchestration in Agent Inspector → hosted agent with azd ai agent

optional

You can't ship what you can't see

Traces

invoke_agent fault-diagnosis   4.1s
 ├─ chat gpt-5.4               2.3s
 ├─ execute_tool check_thresholds
 └─ mcp knowledge-base         0.9s

Every run, tool call, token count and latency, in Application Insights.

Evaluations

groundedness      4.6 / 5
relevance         4.4 / 5
task_adherence    pass 92%
content_safety    0 flagged

Score a test set before every change. Generate synthetic data from the agent's instructions Preview.

Monitoring

runs (1h)        1,240
p95 latency      6.8s
tokens / run     3.2K
quality alerts   1

Agent monitoring dashboard: live quality, latency and cost over recent traces.

🛑 AI red teaming: adversarial probing before you publish
🔁 Agent Optimizer Preview: trace → improved candidate → new agent version

Sample values are illustrative.

Part 3 of 4

Build it

Hands-on lab in your own subscription, about 100 minutes

The platformSee it actBuild itShip it

Lab scenario: TireForge Industries

A tyre plant with five critical machines, each streaming temperature, pressure, vibration and RPM.

🌀
MX-001
Mixer
temp118°C
vib2.1
rpm42
➡️
EX-002
Extruder
temp96°C
vib1.8
rpm65
🔥
CP-003
Curing press
temp171°C
vib5.9 ▲
press15.2
❄️
CU-004
Cooling unit
temp31°C
vib0.9
rpm1200
🔍
IS-005
Inspection
temp24°C
vib0.6
rpm300
DetectCompare readings against each machine's thresholds
DiagnoseReason about the likely root cause and recommend an action
ReportProduce a consolidated factory health summary

Readings are illustrative. The same pattern applies to connected-product diagnostics and supply-chain exceptions. 📎 Lab guide

What you'll build

A

Set up + first agents

45 min · sessions 2–3

  1. Verify project, model and .env
  2. Compare two models in the catalog
  3. Run agents.py: anomaly and diagnosis agents with check_thresholds
  4. Edit instructions → new agent version
B

Knowledge + actions

15 min · session 4 · demo

  1. Foundry IQ knowledge base from a machine manual
  2. Answer with a citation
  3. Work-order tool through MCP or OpenAPI
  4. Approval step before the tool runs
C

Observe, evaluate, orchestrate

40 min · sessions 5–6

  1. Run monitor.py; open a trace: tool call, tokens, latency
  2. Run an evaluation: coherence and fluency
  3. Run the orchestration and approve a work order: run_local.py
  4. Deploy it as a hosted agent: azd deploy
Quota error? Switch to gpt-5-mini. Blocked? Pair with a neighbour or use Codespaces.

Success: a working agent system, in your subscription

Everyone leaves with all seven, and keeps them.

🗂️

Project

Foundry
🧠

Model

deployed
🤖

2 agents

versioned
🛠️

Tool

check_thresholds
🔍

Trace

App Insights
🧪

Eval run

baseline
🔀

Orchestration

hosted agent
If you get blocked, raise your hand early. Most fixes take one minute: a role, a region, or a quota.

If you get stuck

You seeLikely causeFix
PermissionDenied creating an agentMissing Foundry Project Manager roleAdmin assigns it on the resource group; wait up to 10 minutes; sign in again
InsufficientQuotaNo Global Standard quota in this regionUse gpt-5-mini, another region, or request quota
DeploymentModelNotSupportedModel or version not offered in this regionaz cognitiveservices model list --location <region>
RequestDisallowedByPolicyAzure Policy deny (region, network, tags)Exempt the sandbox resource group, or add the required tags
DefaultAzureCredential failedWrong tenant or not signed inaz login --tenant <id>, then az account set
Can't run az loginSign-in blockedFOUNDRY_API_KEY in .env + portal steps
azd uses the wrong accountazd has its own sign-inazd config set auth.useAzCliAuth true
'project' is misspelledAzure CLI older than 2.80az upgrade
Agents or traces you didn't createIn a colleague's projectSwitch to your own project
Classic or hub screensNew Foundry toggle is offTurn on New Foundry in the portal header

Part 4 of 4

Ship it

Production readiness, and what to build next

The platformSee it actBuild itShip it

Governance is in the platform, not a policy PDF

ControlWhere it lives in FoundryCheck before you publish
🪪 Entra identityAgent identity (Entra Agent ID); project managed identityOne identity per agent
👥 RBACFoundry User · Project Manager · Owner · Account OwnerLeast privilege on project and tools
🔑 Managed identityProject identity for AI Search, Storage and toolsNo keys in code
🌐 Network and dataPrivate endpoints, BYO VNet, Data Zone deployments, BYO storageStandard setup for production
🛡️ Content safetyDeployment content filters; agent guardrails; red teamingFilters on, red-team run done
📈 MonitoringTracing, monitoring dashboard, cost per project, retirement datesAlerts + model-upgrade plan
Gate every release on an evaluation run, the same way you gate code on tests.

Workshop setup vs production setup

Basic setup Workshop

🤖 Foundry Agent Service
Microsoft-managed storage
conversations · files · vector stores

Fastest start. Needs Contributor + Foundry Project Manager.

Standard setup Production

🤖 Foundry Agent Service
Your Cosmos DBconversations
Your Storagefiles
Your AI Searchvectors
Optional: your VNet (private networking) · customer-managed keys

All agent data stays in your resources. Setup also needs Role Based Access Control Administrator.

📎 Agent environment setup: basic vs standard

Brainstorm

Agent patterns you can pilot next

🛠️ Maintenance copilot

Sensor feed→Diagnosis agent+Manuals→Approval→CMMS work order
Pilot: 2 critical lines, 4 weeks of history

📡 Connected-product diagnostics

Telemetry→Diagnosis agents+Manuals→Book service
Pilot: 50 units, one product family

🎙️ Service and warranty desk

Voice or chat agent+Policy KB + user memory→Entitlement tool→Escalate
Pilot: one product line, 5 intents

🚚 Supply-chain control tower

Shipments + inventory→Exception agent→Approval→Teams
Pilot: one lane, late shipments

🧾 Document to ERP

Extract→Validation agent→Approve mismatches→ERP
Pilot: 200 historical documents

📐 Engineering knowledge

SharePoint (Foundry IQ)→Q&A agent→Teams
Pilot: 2 libraries, 20 engineers

Brainstorm

Shape your first pilot, together

Use case

Which business problem, for which users?

Owner

One named person on the business side

Data sample

What data, how much, and is it approved for a pilot?

Systems and tools

Which APIs or MCP servers does the agent call?

Human gate

Which actions need an approval, and from whom?

Success measure

The one number that shows it worked

Evaluation gate

Test set and minimum scores before anyone outside the pilot sees it

Pick one use case. Name one owner. Two weeks.

Today

Choose the use case and the owner; confirm the subscription and region

Week 1

Data sample and tools wired; first agent version; baseline evaluation

Week 2

Orchestration with approval, as a hosted agent; evaluation gate; demo to the business sponsor

Then

Fortnightly solutioning cadence + Foundry Toolkit enablement for developers

💸 Model Router

for cost

🧰 Toolboxes

one team owns integrations

🪪 Entra Agent ID

every agent has an identity

📣 Publish to Teams

adoption isn't another app

Keep going

Let's build.

ai.azure.com → your project → Build → Agents

Vraja Kishore Mudumbai
Microsoft