Skip to main content
Ameerpet, Hyderabad · Classroom & live online
Cloud Soft Solutions

Microsoft Foundry Tutorial 2026: Architecture, Models, AI Agents, RAG, Python and Real-Time Projects

A practical Microsoft Foundry tutorial: architecture, setup, model deployments, a first Responses API call and prompt agent in Python (azure-ai-projects 2.x), deploying your own code as a hosted agent with azd, RAG, MCP toolboxes, memory, security, evaluation, CI/CD and enterprise use cases.

Microsoft Foundry tutorial 2026 — models, prompt and hosted agents, Python SDK, Cloud Soft Solutions
Last updated · 22 min read · 4,808 words

Microsoft Foundry tutorial 2026 — models, prompt and hosted agents, Python SDK, Cloud Soft Solutions

Microsoft Foundry is where Azure AI applications and agents are now built. This tutorial explains how Foundry fits into the Azure AI ecosystem, walks through setup in the portal, makes a first model call and creates a prompt agent in Python with the current azure-ai-projects 2.x SDK, deploys your own Python code as a hosted agent with the Azure Developer CLI, and then covers RAG, MCP tools, memory, security, evaluation, CI/CD and seven enterprise use cases.

It is written for Azure AI Engineers, GenAI Engineers, Agentic AI Engineers, Python developers, Forward Deployed Engineers, cloud and DevOps engineers and solution architects. If you are preparing for interviews, read it together with our 130 Microsoft Azure AI services interview questions.

Contents

1. Introduction to Microsoft Foundry

Enterprises are moving past simple chatbots towards applications that understand a request, retrieve company knowledge, call tools, run workflows and hand off to people when needed. Microsoft Foundry is Microsoft's platform for building, deploying and governing those applications and agents.

Take a bank that wants an intelligent banking assistant. It should:

  • Answer questions about banking policies
  • Search internal knowledge bases
  • Retrieve loan eligibility requirements
  • Summarise financial documents
  • Identify customer intent
  • Call approved backend APIs
  • Escalate complex requests to staff
  • Protect confidential customer information
  • Keep monitoring and audit records

A production build might combine Microsoft Foundry, a model deployment (for example an Azure OpenAI model), Foundry Agent Service, Azure AI Search, Azure Functions, Microsoft Entra ID, Key Vault and Azure Monitor. The rest of this tutorial shows how those pieces fit together.

2. What is Microsoft Foundry?

Microsoft describes Foundry as a platform that unifies agents, models and tools under a single management grouping, with built-in tracing, monitoring, evaluations and enterprise setup, and with unified RBAC, networking and policies under one Azure resource provider. (Microsoft Learn: What is Microsoft Foundry?)

You can work with it in several ways:

  • Call models directly from your code
  • Build prompt agents from instructions, a model and tools
  • Build voice-based prompt agents for real-time spoken conversations
  • Deploy hosted agents that run your own code and framework
  • Connect agents to knowledge and tools
  • Trace and evaluate everything

Developer surfaces include the Foundry portal (ai.azure.com), SDKs for Python, C#, JavaScript/TypeScript and Java, the Azure Developer CLI (azd), Visual Studio Code with the Foundry Toolkit, and coding agents through the Foundry Skill and MCP server. Some platform capabilities are still in preview, so check the general availability status before relying on a feature in production.

3. Microsoft Foundry vs Azure AI Foundry vs Azure OpenAI

Microsoft's naming has changed several times, and interviewers notice when candidates use old terms for new things.

NameWhat it means today
Microsoft FoundryThe current unified platform for models, agents and tools
Azure AI Foundry / Azure AI StudioPrevious names for the platform
Foundry (classic)The older portal, where hub-based projects still live
Azure OpenAIOpenAI models sold by Microsoft on Azure; an Azure OpenAI resource can be upgraded to a Foundry resource
Foundry ModelsThe model catalog (Microsoft, OpenAI, Anthropic, Meta, open models and more) and deployments
Foundry Agent ServiceManaged runtime for prompt, voice-based prompt and hosted agents
Foundry ToolsPrebuilt AI services: Speech, Language, Translator, Vision, Document Intelligence, Content Understanding, Content Safety and others (previously "Azure AI services")
Foundry IQKnowledge layer for grounding agents in enterprise data, built on Azure AI Search agentic retrieval

Microsoft's own mapping of old to new is useful to memorise:

AreaPreviousCurrent
Agent APIAssistants API (threads, messages, runs)Responses API (conversations, items, responses, agent versions)
API versioningMonthly api-version parametersv1 stable routes (/openai/v1/)
Resource modelHub + Azure OpenAI + Azure AI servicesOne Foundry resource with projects
SDKSeveral packages and endpointsazure-ai-projects 2.x plus the OpenAI client against one project endpoint

So a tutorial that uses hub-based projects, AzureOpenAI() with monthly API versions or the Assistants API is describing the classic experience. For new work, follow the current Foundry documentation.

4. Microsoft Foundry architecture

Enterprise users
   -> Web / mobile app
   -> API / backend (FastAPI, Functions, Container Apps)
   -> Microsoft Foundry project endpoint
        |-- Models      (inference through the Responses API)
        |-- Agents      (prompt, voice-based prompt, hosted)
        |-- Tools       (toolbox: file search, web search, code interpreter, MCP, OpenAPI, functions)
        |-- Knowledge   (Azure AI Search / Foundry IQ)
   -> Enterprise data (Blob, SharePoint, SQL, business APIs)
   -> Grounded response with sources

Cross-cutting:
   Identity       Microsoft Entra ID, managed identities, agent identities
   Security       RBAC, private networking, Key Vault, guardrails
   Observability  Tracing, evaluations, Application Insights, Azure Monitor
   Delivery       GitHub Actions / Azure DevOps / azd, Terraform or Bicep

4.1 Foundry resource

The Azure resource that holds the platform: model deployments, networking, identity and policy settings. It is governed like any Azure resource with RBAC, Azure Policy and network rules.

4.2 Foundry project

A workspace inside the resource where a team builds: agents, conversations, files, evaluations, connections and traces. Each project has its own endpoint, in the form https://<resource-name>.services.ai.azure.com/api/projects/<project-name>.

4.3 Foundry Models

A catalog of more than 10,000 models from Microsoft, OpenAI, Anthropic, Meta and others. What you can deploy depends on region, quota, deployment type and licensing.

4.4 Foundry Agent Service

The managed runtime for agents — conversations, tool calls, versioning, publishing, identity and scaling. Covered in section 9.

4.5 Foundry Tools

Prebuilt services you can call from apps and agents: Speech, Language, Translator, Vision, Document Intelligence, Content Understanding, Content Safety and Azure AI Search.

4.6 Foundry IQ

Knowledge for agents: knowledge bases built on Azure AI Search agentic retrieval that can combine several knowledge sources and plan multi-step queries. Compare it with a plain Azure AI Search index plus your own retrieval code before choosing.

4.7 Observability and evaluation

Traces of every model call and tool call, built-in evaluators, dashboards and Application Insights integration. Without them you can't prove an agent is good enough to ship.

5. Microsoft Foundry setup: step by step

Prerequisites

  • An Azure subscription
  • Permission to create resources (Owner at resource-group scope to create a new project, or Foundry Project Manager on an existing project for hosted-agent work)
  • A region where your chosen model is available
  • Python 3.13+ if you will deploy hosted agents (Python 3.10+ works for the SDK samples)
  • Azure CLI, plus Azure Developer CLI 1.36.0 or later for hosted agents

Step 1: Open the portal

Go to ai.azure.com and sign in with your work or Microsoft account.

Step 2: Create a Foundry resource and project

  1. Choose the subscription.
  2. Choose or create a resource group.
  3. Name the resource.
  4. Choose a region.
  5. Set networking and security options.
  6. Create the resource and project.

Copy the project endpoint from the project overview — your code uses it.

Step 3: Set permissions

Use Entra ID groups and Azure RBAC with least privilege. Don't give every developer subscription Owner. Separate platform administrators, AI developers, project managers, application identities, and monitoring and security teams.

Step 4: Deploy a model

Open the model catalog and choose by task, quality, context window, latency, modalities, cost, region, quota and deployment type. Deploy it and note the deployment name — that is the model value in your code.

Step 5: Test in the playground

You are an enterprise banking assistant.
Explain the difference between a savings account and a current account in simple language.
Do not invent bank-specific policies.

Check the answer for correctness, relevance and safety.

Step 6: Connect monitoring

Connect Application Insights to the project so traces and agent metrics are captured from day one.

Official guide: Set up Microsoft Foundry resources.

6. Foundry Models: model catalog and deployment

Model categoryTypical use
Language modelsChat, summarisation, generation
Reasoning modelsMulti-step reasoning, planning, coding
Embedding modelsSemantic search and RAG
Vision-language modelsImage and text understanding
Speech / realtime modelsVoice applications
Open-weight modelsCustomisation, cost control, specific licensing needs

For the banking assistant you might need a chat model for questions, an embedding model for retrieval, a vision-capable model for uploaded documents and a realtime model for voice. Benchmark candidates on your own test set rather than choosing the most popular model.

Deployment types control where data is processed and how capacity is billed — for example global, data-zone and regional standard (pay per token), provisioned throughput (reserved capacity) and batch. Not every model supports every type. Check capacity, quota, throughput, latency, region, billing and data-residency requirements before you commit. Our Azure for AI engineers guide explains quotas and 429 handling.

7. Python quickstart: first model call and a prompt agent

These samples follow Microsoft's current SDK quickstart and use azure-ai-projects 2.x, which is not compatible with 1.x code you may find in older blogs.

pip install "azure-ai-projects>=2.3.0" azure-identity
az login

Call a model with the Responses API

from azure.identity import DefaultAzureCredential
from azure.ai.projects import AIProjectClient

PROJECT_ENDPOINT = "https://<resource-name>.services.ai.azure.com/api/projects/<project-name>"

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

response = openai.responses.create(
    model="gpt-5-mini",   # your deployment name
    input="Explain a home loan EMI in two sentences.",
)
print(response.output_text)

DefaultAzureCredential uses your az login session locally and a managed identity in Azure, so there are no keys in the code.

Create a prompt agent

from azure.ai.projects.models import PromptAgentDefinition

agent = project.agents.create_version(
    agent_name="banking-assistant",
    definition=PromptAgentDefinition(
        model="gpt-5-mini",
        instructions=(
            "You are a banking information assistant. Answer only from approved information. "
            "Never invent rates or eligibility rules. If you don't know, say so and offer a human agent."
        ),
    ),
)
print(agent.name, agent.version)

Each create_version call creates a new, versioned definition, so you can compare and roll back.

Chat with the agent across turns

openai = project.get_openai_client(agent_name="banking-assistant")
conversation = openai.conversations.create()

r1 = openai.responses.create(conversation=conversation.id, input="What documents do I need for a home loan?")
print(r1.output_text)

r2 = openai.responses.create(conversation=conversation.id, input="And for a self-employed applicant?")
print(r2.output_text)

The conversation keeps the history, so the follow-up understands "and for a self-employed applicant". Source: Microsoft Foundry SDK quickstart.

8. Prompt engineering in Microsoft Foundry

Weak prompt:

Tell me about home loans.

No scope, no format and no boundaries.

Strong enterprise prompt:

ROLE: You are an approved banking information assistant.
OBJECTIVE: Answer using only the retrieved banking information.
RULES:
1. Be accurate and concise.
2. Never invent interest rates or eligibility rules.
3. Never reveal customer-specific information.
4. If the retrieved information is insufficient, say so.
5. Cite sources.
6. Never execute transactions.
7. Escalate sensitive or complex requests.
OUTPUT: direct answer, conditions, sources, escalation recommendation if needed.

Techniques to know:

  • Role prompting — define role and scope.
  • Context injection — supply approved retrieved content.
  • Few-shot examples — show the expected input and output.
  • Structured output — request JSON against a schema.
  • Grounding instructions — answer only from evidence; admit gaps.
  • Prompt versioning — agent versions in Foundry, or prompts in Git.
  • Prompt evaluation — test every change against a fixed dataset.

A strong prompt never replaces identity, authorisation, validation and secure design.

9. Microsoft Foundry Agent Service

An agent is a model plus instructions plus tools that can reason over a request and act. Example: "Can you check the status of my loan application?"

  1. The agent understands the request.
  2. It decides the loan-status tool is needed.
  3. The application has already authenticated the user.
  4. The tool checks the user owns that application.
  5. The tool calls the authorised loan-status API.
  6. The agent interprets the result.
  7. It replies.

The model never gets direct access to customer records — the application and backend enforce access.

Agent types

Prompt agentVoice-based prompt agentHosted agent
How you buildInstructions, model, tools (portal, SDK, REST or azd)Prompt agent with audio settings, via Voice LiveYour own code: Microsoft Agent Framework, LangGraph, OpenAI Agents SDK, plain Python
Runtime code you maintainNoneNone for voice orchestrationYour agent logic
ComputeFully managedFully managedContainer compute managed by Foundry
IdentityEntra identityEntra identityDedicated Entra identity per agent
Best forFast start and production agents without custom orchestrationCall centres and spoken experiencesAgents that call your own code, custom orchestration, multi-agent systems

You can also skip the agent resource entirely and call the Responses API from an agent you run elsewhere — Microsoft calls this an ephemeral agent. Source: What is Foundry Agent Service?

10. Deploy your own Python code as a hosted agent

This follows Microsoft's deploy your own code quickstart. The hosting library handles the HTTP server, health checks and protocol; your code does the thinking. The hosting packages are pre-release at the time of writing, so pin and test versions.

Step 1: Prerequisites

azd version            # 1.36.0 or later
azd ext install microsoft.foundry
azd auth login
python --version       # 3.13 or later

You need the Foundry Project Manager role on an existing project, or Owner on the resource group to create one.

Step 2: Project layout

banking-agent/
├── main.py
├── requirements.txt
├── app/
│   ├── tools.py
│   └── security.py
└── tests/
    └── test_agent.py

Step 3: requirements.txt

azure-ai-agentserver-responses>=1.0.0b7
azure-ai-projects>=2.3.0
azure-identity

Step 4: main.py — a hosted agent that calls a model

import asyncio, os
from azure.ai.agentserver.responses import (
    CreateResponse, ResponseContext, ResponsesAgentServerHost, TextResponse,
)
from azure.ai.projects import AIProjectClient
from azure.identity import DefaultAzureCredential

project = AIProjectClient(
    endpoint=os.environ["FOUNDRY_PROJECT_ENDPOINT"],   # set by azd for local runs; configure it for the hosted agent
    credential=DefaultAzureCredential(),
)
openai = project.get_openai_client()

SYSTEM = "You are a banking information assistant. Never invent rates. Say when you don't know."

app = ResponsesAgentServerHost()

@app.response_handler
async def handler(request: CreateResponse, context: ResponseContext, _cancel: asyncio.Event):
    user_input = await context.get_input_text() or ""
    result = openai.responses.create(
        model=os.environ.get("MODEL_DEPLOYMENT", "gpt-5-mini"),
        instructions=SYSTEM,
        input=user_input,
    )
    return TextResponse(context, request, text=result.output_text)

app.run()

Microsoft's quickstart starts with an echo handler; this version replaces the "your agent logic here" block with a real model call. In production, add retrieval, tools, input validation and error handling, and use the async client so one slow call doesn't block others.

Step 5: Initialise, provision, test and deploy

azd ai agent init --protocol responses --deploy-mode code
# then add PYTHONNOUSERSITE: "1" to the agent service's env map in azure.yaml
azd provision                         # creates resources such as Application Insights
azd ai agent run                      # runs locally and opens the agent inspector
azd ai agent invoke --local "Hello"   # test from a second terminal
azd deploy                            # deploys to Foundry Agent Service
azd ai agent invoke "Hello"           # calls the deployed agent

azd deploy prints the agent playground link and the agent endpoint. If the current azd environment created the project, azd down deletes the whole resource group, so be careful in shared subscriptions.

LangGraph or Microsoft Agent Framework? Use their built-in hosting integrations instead of the generic library: langchain-azure-ai[hosting] for LangGraph, LangChain and Deep Agents, and the Agent Framework hosting package for Agent Framework. See our LangGraph interview questions and LangGraph for enterprise AI.

11. Microsoft Foundry and RAG architecture

A bank has 20,000 policy documents. A customer asks: "What are the eligibility requirements for a home loan?" A general model does not know the bank's current policy, so you retrieve the approved documents first. Background: what is RAG.

Document sources -> Blob Storage -> Extraction (Document Intelligence Layout)
   -> Chunking -> Embeddings -> Azure AI Search index (text + vectors + metadata + access groups)

User question -> Entra sign-in -> Hybrid query with security filter -> Top chunks
   -> Foundry model or agent -> Grounded answer with sources

Ways to connect it in Foundry:

  1. Your own retrieval code in the backend or hosted agent (full control; see the Python retrieval example in our Azure AI services guide).
  2. Built-in tools on a prompt agent, such as file search or an Azure AI Search connection.
  3. Foundry IQ / agentic retrieval for complex multi-part questions across several sources.

Implementation steps:

  1. Upload documents to approved storage.
  2. Extract text.
  3. Clean and normalise.
  4. Chunk by headings — see RAG chunking strategies.
  5. Generate embeddings.
  6. Index vectors and metadata in Azure AI Search.
  7. Authenticate the user.
  8. Retrieve only documents the user may see.
  9. Build a grounded prompt.
  10. Generate the answer.
  11. Check citations and quality.
  12. Log telemetry without sensitive content.
RAGFine-tuning
Retrieves external informationAdapts behaviour through training
For changing enterprise knowledgeFor specialised behaviour or format
Gives sourcesNo citations
Update by re-indexingUpdate by retraining

More in RAG vs fine-tuning and hybrid search and reranking.

12. MCP, tools and toolboxes

The Model Context Protocol (MCP) is a standard way to connect AI applications to tools and context. Foundry agents can use built-in tools (web search, file search, code interpreter, memory), custom functions, OpenAPI specs and remote MCP servers — for example the Azure DevOps MCP server, or your own MCP server on Azure Functions.

A toolbox curates a set of tools once and exposes them behind a single managed MCP-compatible endpoint, with central authentication, governance and versioning, so many agents can share the same tools. Tool connections support key-based auth, Microsoft Entra (agent or project managed identity) and OAuth on-behalf-of passthrough.

User request -> Foundry agent -> tool selection -> toolbox / MCP endpoint
   -> Search | Tickets | Reports -> tool result (untrusted) -> agent -> answer

Security rules for MCP:

  • Authenticate every connection; prefer managed identity or OBO over shared keys
  • Expose only the tools the agent needs
  • Validate tool arguments
  • Don't expose internal admin APIs
  • Log sensitive operations
  • Require approval for privileged actions
  • Treat tool responses as untrusted input (they can carry prompt injections)

Learn more: what is MCP, build an MCP server in Python and MCP interview questions.

13. Memory and state management

Agents need different kinds of state:

  • Conversation history — Foundry conversations hold the turns of a chat.
  • Session state — hosted agents get session-level state persistence.
  • Task state and checkpoints — for long workflows (LangGraph checkpointers, Agent Framework workflows).
  • Long-term memory — user preferences and facts across sessions (Foundry memory is in preview; check availability).

Design memory deliberately. A banking assistant must not store account details in an unrestricted long-term memory. Apply identity-scoped access, data minimisation, retention limits and encryption, and let users see and delete what is remembered.

14. Security in Microsoft Foundry

  1. Microsoft Entra ID for users and applications; disable key-based auth where possible.
  2. Managed identities so apps reach Foundry, Azure AI Search and Key Vault without stored credentials. Hosted agents get a dedicated Entra identity automatically.
  3. Azure RBAC with least privilege — separate resource administration, project management, application execution, data access and monitoring.
  4. Key Vault for any secrets that remain. Never commit keys or connection strings to Git.
  5. Network security — private endpoints, disabled public access, VNet integration (prompt agents support private networking; hosted agents support bring-your-own VNet), controlled outbound traffic and private DNS.
  6. Prompt injection protection — separate instructions from data, treat retrieved content as untrusted, give tools minimal permissions, validate inputs and outputs, red-team, and require approval for sensitive actions. Foundry guardrails include protection against cross-prompt injection attacks (XPIA).
  7. Content safety — content filters and guardrails on models and agents. Never rely on instructions alone.

15. Evaluation and observability

A chatbot that answers one demo question is not production-ready. Measure it. See also RAG evaluation metrics.

MetricQuestion it answers
Answer relevanceDoes it address the question?
GroundednessIs it supported by retrieved evidence?
Retrieval relevanceWere the right documents retrieved?
Tool call accuracyDid the agent pick the right tool with the right arguments?
Task completionDid it achieve the goal?
SafetyDid it stay within safety rules?
LatencyHow long did it take?
CostWhat did each interaction cost?

Example evaluation set:

InputExpected behaviour
Explain the home loan policyRetrieves and summarises the approved policy
What is the travel reimbursement limit?Retrieves the authorised finance policy
Show another customer's balanceRefuses — unauthorised
What is the office Wi-Fi password?Follows the secret-disclosure policy
Explain a policy that doesn't existSays the information is unavailable

Trace the full path: request → API → identity check → agent → model call → tool calls → retrieval → response. Monitor model latency, tool time, tokens, failures, retrieval quality, safety events and cost trends — with redaction and retention rules so traces don't leak personal data.

16. Production deployment: CI/CD for Foundry agents

Tools: GitHub Actions or Azure DevOps, the Azure Developer CLI, Terraform or Bicep, Azure Container Registry where needed, Azure Monitor and Application Insights.

Commit -> Lint and unit tests -> Security scan -> Build agent package or image
   -> Infrastructure validation (terraform plan) -> Deploy to test project (azd deploy)
   -> Evaluation gate -> Approval -> Production -> Monitoring and rollback

Terraform can provision resource groups, storage, Key Vault, networking, Azure AI Search, monitoring and supported AI resources (provider versions matter). Use azd or the Foundry SDK for agent definitions and versions, and run both from the same pipeline. See our Terraform for AI infrastructure guide and Azure DevOps interview questions.

Release checklist: infrastructure validated · model available with quota · identity permissions verified · network paths tested · prompts and tools reviewed · evaluation set passed · security scenarios tested · monitoring live · rollback ready · release approved.

17. Real-time enterprise use cases

Use case 1: Banking AI agent

Stack: Foundry, Agent Service, a chat model deployment, Azure AI Search, Azure Functions, Entra ID, Key Vault, Azure Monitor.

"Explain the home loan eligibility requirements." → authenticate → identify intent → retrieve authorised home-loan documents → grounded answer → sources → telemetry. Account-specific questions additionally require verified customer identity and backend authorisation.

Use case 2: Healthcare staff assistant

Approved clinical and admin documents -> processing -> knowledge index
   -> Foundry agent -> authorised retrieval -> grounded answer -> healthcare staff

Controls: data minimisation, access permissions, audit trail, clinical review and applicable privacy rules.

Use case 3: IT support agent

Searches troubleshooting docs, checks service status, creates tickets, suggests fixes and escalates. Privileged actions (password resets, access changes) need approval workflows.

Use case 4: Retail assistant

Combines product knowledge retrieval, inventory and order-status APIs, return-policy documents and support workflows.

Use case 5: HR knowledge assistant

Retrieves only what the employee may see, and directs them to approved HR workflows instead of making changes itself.

Extracts, indexes and retrieves contract sections and summarises clauses with references. Lawyers review important interpretations.

Use case 7: Finance report assistant

Answers questions from approved reports or authorised analytics APIs, checks permissions and never presents generated estimates as audited figures.

18. Microsoft Foundry vs Amazon Bedrock

CapabilityMicrosoftAWS
AI application platformMicrosoft FoundryAmazon Bedrock
Model accessFoundry Models (incl. Azure OpenAI)Bedrock foundation models
AgentsFoundry Agent ServiceAmazon Bedrock AgentCore, Bedrock Agents
RAGAzure AI Search / Foundry IQBedrock Knowledge Bases
IdentityMicrosoft Entra IDAWS IAM
SecretsAzure Key VaultAWS Secrets Manager
MonitoringAzure Monitor / Application InsightsAmazon CloudWatch
Infrastructure as codeTerraform / BicepTerraform / CloudFormation

They are not one-to-one equivalents. Compare requirements, model availability, integrations, security and cost. For the AWS side see Amazon Bedrock Knowledge Bases interview questions and AWS for AI engineers.

19. Troubleshooting Microsoft Foundry

ProblemLikely causeWhat to check
Model deployment failsRegion, quota or deployment type not availableRegional availability and quota
Access denied / AuthorizationFailedMissing RBAC roleIdentity and role scope (Foundry Project Manager for hosted agents)
azd ai agent init failsOld azd or extensionazd version ≥ 1.36.0; update the Foundry extension
FOUNDRY_PROJECT_ENDPOINT not setRunning the app directlyUse azd ai agent run or set it in .env
Agent stuck in provisioningFirst deploy installing dependenciesazd ai agent show; wait 2–3 minutes
Agent can't call a toolAuth or networkTool identity, permissions, private DNS
RAG returns irrelevant resultsChunking or retrievalInspect chunks and raw search results
High latencySlow model, retrieval or toolTrace each stage
Wrong answersPoor grounding or promptInspect context; run evaluations
No tracesTelemetry not connectedApplication Insights connection and access

20. Microsoft Foundry interview questions

1. What is Microsoft Foundry and how is it different from Azure OpenAI? Foundry is the platform for models, agents, tools, evaluation and governance; Azure OpenAI is one model family available inside it.

2. What is the difference between a Foundry resource and a project? The resource is the Azure boundary for deployments, networking and policy; a project is a team workspace with its own endpoint for agents, files, evaluations and traces.

3. Prompt agent or hosted agent — how do you choose? Start with a prompt agent; move to a hosted agent when you need custom code, custom orchestration, multi-agent logic or a framework like LangGraph.

4. What replaced the Assistants API? The Responses API, with conversations, items, responses and agent versions instead of threads, messages and runs.

5. What is a toolbox? A curated, versioned set of tools exposed through one managed MCP-compatible endpoint, shared across agents with central auth and governance.

6. How does a hosted agent authenticate to other Azure services? With its dedicated Entra agent identity — grant it RBAC roles on Azure AI Search, Storage or Key Vault, with no keys in code.

7. How do you ground a Foundry agent in company documents? Azure AI Search (own retrieval code or a search tool), file search, or Foundry IQ knowledge bases — always with document-level authorisation.

8. How do you stop an agent from taking an unsafe action? Least-privilege tools, argument validation, authorisation inside the tool, human approval for sensitive actions, guardrails and red-team tests.

9. How do you evaluate an agent before release? A versioned dataset of normal, edge and adversarial cases; built-in evaluators for groundedness, relevance, tool-call accuracy and task completion; an evaluation gate in CI/CD.

**10. A team's old code uses AzureOpenAI() with a monthly api-version and a hub project. What do you tell them?** It's the classic pattern: plan a move to a Foundry project, azd/azure-ai-projects 2.x and the v1 OpenAI() client, migrating and testing agent by agent.

For 130 more, see Microsoft Azure AI services interview questions, the advanced Azure AI interview questions and the FDE interview guide.

21. 10-week learning roadmap and final project

WeekTopicHands-on
1Azure fundamentals and FoundryCreate a resource and project
2Models and inferenceDeploy a model; first Responses API call
3Prompt engineeringStructured-output assistant
4Agent ServicePrompt agent with a multi-turn conversation
5Hosted agentsDeploy your own Python agent with azd
6RAG and Azure AI SearchEnterprise knowledge assistant
7MCP and toolsConnect an MCP server through a toolbox
8Identity and securityManaged identity, RBAC, private networking
9Evaluation and monitoringEvaluation dataset and tracing
10CI/CD and productionEnd-to-end pipeline with an evaluation gate

Final project: enterprise banking AI assistant

Functional requirements: answer policy questions · search policy documents · country-specific knowledge collections · RAG retrieval with sources · intent detection · approved backend tools · user permissions · confidential data protection · escalation of sensitive operations · tracing · quality evaluation.

ComponentTechnology
AI platformMicrosoft Foundry
AgentFoundry Agent Service (prompt agent, then hosted agent)
LLMFoundry model deployment
RAGAzure AI Search
BackendPython and FastAPI
StorageAzure Blob Storage
ExtractionAzure Document Intelligence
IdentityMicrosoft Entra ID
SecretsAzure Key Vault
MonitoringAzure Monitor and Application Insights
InfrastructureTerraform
CI/CDGitHub Actions or Azure DevOps

Deliverables: architecture diagram, Terraform, Python app, ingestion pipeline, agent and tools, prompt templates, evaluation dataset, security configuration, Docker or azd deployment, CI/CD pipeline, README and troubleshooting guide. This shows the full lifecycle of an enterprise AI application, not just a chatbot — exactly what interviewers for Azure AI and FDE roles want to hear about. Our AI FDE engineer projects list more ideas.

Want to build it with a mentor? Our Generative and Agentic AI course in Hyderabad and the FDE PRO programme cover Foundry, Azure AI Search, agents, MCP and production deployment with real projects. When you're ready, browse verified AI engineer jobs.

Official Microsoft documentation

📞 Call +91 96660 19191 · WhatsApp · Flat No. 513, 5th Floor, Nilagiri Block, Aditya Enclave, Ameerpet, Hyderabad

Frequently Asked Questions

What is Microsoft Foundry used for?
Building, deploying and governing AI applications and agents with models, tools, knowledge, evaluation, tracing and enterprise identity and networking.

Is Microsoft Foundry the same as Azure OpenAI?
No. Foundry is the broader platform; Azure OpenAI models are one family available in its model catalog.

What is the difference between prompt agents and hosted agents?
Prompt agents are defined by instructions, a model and tools and run fully managed. Hosted agents run your own code and framework in a Foundry-managed container.

Can I use Python with Microsoft Foundry?
Yes. Use azure-ai-projects 2.x with DefaultAzureCredential to call models and create agents, and the Azure Developer CLI to deploy hosted agents.

Can I deploy LangGraph agents to Foundry?
Yes, as hosted agents using the langchain-azure-ai hosting integration.

Does Microsoft Foundry support MCP?
Yes. Agents can use remote MCP servers, and toolboxes expose curated tools through a managed MCP-compatible endpoint.

What replaced the Assistants API in Foundry?
The Responses API, with conversations, items, responses and agent versions instead of threads, messages and runs.

What should I learn before Microsoft Foundry?
Azure fundamentals, Python, prompting, embeddings and RAG, Azure AI Search, Entra ID and RBAC, APIs and basic container deployment.

Share𝕏inf✉
EnrollWhatsAppCall us