Microsoft Foundry for AI
What is Microsoft Foundry
Microsoft Foundry is a unified, enterprise-grade platform-as-a-service (PaaS) for building, deploying, and managing AI applications and agents. It consolidates models, agent orchestration, monitoring, and governance tools in one platform, offering production-grade infrastructure and security.
Foundry offers powerful capabilities for developers, including the ability to choose from a wide range of models, use those models to build agents, connect those agents to tools, and integrate knowledge by using Foundry IQ, the centralized connection point for data sources.

Models
Users can browse thousands of models—ranging from massive foundation models to lightweight, domain-specific variants—evaluate them via built-in leaderboards and playgrounds, and manage deployments directly in Foundry
Agents
At the core of Microsoft Foundry is an agent‑first approach that lets developers build intelligent, task‑oriented agents directly within their Foundry projects. These agents can reason over inputs, call tools, interact with data, and automate workflows using the platform’s built‑in orchestration. Foundry handles the underlying coordination—including message threading, tool execution, safety controls, and observability—so developers can focus on designing the agent’s goals and capabilities. Using either low‑code or code‑first workflows, teams can create multi‑agent systems that work with project resources such as documents, datasets, search indexes, and connections to external systems, including integrations like Azure Functions or Microsoft Fabric.
Tools
Foundry offers a comprehensive suite of Azure services—such as speech, vision, language, document intelligence, and more. These Foundry Tools provide AI capabilities that can be built into web or mobile applications in a way that’s straightforward to implement.
Knowledge
Foundry IQ provides a permission‑aware, multi‑source knowledge layer that gives agents accurate, grounded answers using an organization’s own data. It lets you create a configurable knowledge base made up of internal and external knowledge sources—such as Azure Blob Storage, SharePoint, OneLake, or public web data—and automatically handles indexing, document chunking, vector embeddings, and metadata extraction. When an agent queries the knowledge base, Foundry IQ uses agentic retrieval to break the question into subqueries, search multiple sources in parallel, and return relevant, citation‑backed information while enforcing user permissions and Microsoft Purview sensitivity labels. This ensures that agents can draw from trusted, up‑to‑date content and only return information the user is authorized to see, providing a reliable knowledge foundation for enterprise AI workflows.
Foundry resources and projects
Azure resource
A Foundry resource is the Azure resource that provides the platform capabilities. A Foundry resource provides access to:
- Models (Microsoft, partner, and OpenAI‑compatible)
- Foundry’s agent service
- Deployment governance
- Monitoring & observability
- Security boundaries
- Quotas and operational controls
Foundry project
A Foundry project is a workspace inside that resource where you build AI apps, agents, and evaluations. A Foundry Project lets you build and manage:
- Agents
- Evaluations
- Files and datasets
- Vector indexes
- Flows (AI logic)
- Connections
- Project‑specific settings
You might have one Foundry resource for a team or department, and many Foundry projects inside it, each focused on a separate AI use case.
Foundry portal
The Foundry portal provides a modern web-based interface for developing, testing, and operating AI solutions.
Consider the following workflow for using Foundry portal to develop an AI application.
Create an Agent in Foundry portal
Sign in Foundry portal using your Azure subscription and create a Foundry project. https://ai.azure.com

To create an agent in Foundry, you can start by exploring a model or just go straight to agent development. In Foundry portal, creating an agent looks similar at first to testing a model in the playground.
- Choose the model your agent uses.
- Write the system instructions, such as “You’re a helpful scheduling assistant who returns answers in concise bullet points.”
Key configuration parameters
- Temperature: controls creativity vs. determinism.
- Max output tokens – caps response length; affects token consumption and throttling behavior.
- System instructions – sets behavior and role of the model.

In Foundry, pick a model from the Model Catalog and deploy it.

use the Playground to write prompts, test model responses, configure parameters.

In this module, we’ve introduced Azure, Microsoft’s cloud service for global scale software applications, and learned about Microsoft Foundry, a platform for building AI apps and agents on Azure. With this foundational knowledge, you can start to explore how to use Foundry to deploy and work with generative AI models, develop agents, and integrate AI capabilities like speech and computer vision.
Add Tools
Tools in Foundry allow a model to perform actions by calling external systems. They represent callable capabilities such as searching the web, querying a database, or using an MCP server.
create a tool box
Toolbox provides a centralized way to manage and share tools in Microsoft Foundry. Toolbox helps simplify tool integration while enabling centralized credential management, governance, observability, and access control. Instead of configuring tools independently for every agent, teams can manage tools in one place, reuse them across multiple agents, and update tool implementations without requiring changes to agent code.

add tools into the tools box

Add Knowledge
Knowledge allows the model to access and retrieve external content (your documents, datasets, internal sites) through retrieval-augmented generation (RAG).
In the playground, Foundry uses retrieval pipelines to:
- Ingest + index your content
- Search + ground responses
- Make answers more accurate, traceable, and domain‑specific
Using an agent
You can use an agent from a client application by using the Foundry Projects SDK to connect to the project and call it from a client using the Project API.
The Project API enables you to:
- Integrate agents into web apps, bots, or backend workflows
- Orchestrate multi‑step tasks
- Pass structured inputs or tool calls
- Run agents at scale with your Foundry deployments

# Before running the sample:
# pip install "azure-ai-projects>=2.1.0"
from azure.identity import DefaultAzureCredential
from azure.ai.projects import AIProjectClient
endpoint = "https://erjunchen-2531-resource.services.ai.azure.com/api/projects/erjunchen-2531"
agent_name = "WC-agent-2531"
user_message = "Hi WC-agent-2531"
with (
DefaultAzureCredential() as credential,
AIProjectClient(
endpoint=endpoint,
credential=credential,
allow_preview=True,
) as project_client,
):
# Bind the OpenAI client to the existing agent endpoint.
openai_client = project_client.get_openai_client(agent_name=agent_name)
# GitHub Copilot preview agents require a conversation for every Responses turn.
conversation = openai_client.conversations.create()
response = openai_client.responses.create(
conversation=conversation.id,
input=[{"role": "user", "content": user_message}],
)
print(f"Response output: {response.output_text}")

































