MSBA-311 · Lesson 5 of 12 · 20 min

Microsoft Foundry Agents service

▶ Video coming soon A video version of this lesson is on the way.

Ngozika Pellerano's data science team built Quillfield's submission review agent in Microsoft Foundry during the summer of 2026. It reads a commercial client's application, searches a Foundry IQ knowledge base of about 40,000 inspection reports, and lists the risk issues an underwriter is likely to ask about: an old roof, a missing sprinkler test, a history of water damage. Account executives liked it, and the Policy Service Assistant had been calling it in preview as a connected agent since September. The Commercial Submission Desk would lean on it much more heavily, and Bram wanted to understand exactly what Foundry offered before deciding which parts of the solution should live there.

This lesson is a tour of Microsoft Foundry Agent Service from a multi-agent architect's point of view: the kinds of agents it runs, the tools and knowledge they use, how workflows combine them, how identity, memory and observability work, and how to manage their lifecycle. Foundry changes quickly, and several capabilities described here were in preview in November 2026, so treat status labels as a snapshot and check the documentation when you design.

Foundry in brief

Microsoft Foundry, known until late 2025 as Azure AI Foundry, is Microsoft's platform for building AI applications and agents on Azure. Work is organized into projects, which hold agents, model deployments, connections to data and tools, evaluations and traces. The Foundry Agent Service is the part that runs agents: it hosts them, manages their conversations, calls their tools and records what they do.

Foundry sits at the pro-code end of Microsoft's agent platforms. Where Copilot Studio is designed for makers and integrates with Power Platform, Foundry is designed for developers and data scientists who need a wide choice of models, custom code, fine-grained evaluation and control over hosting. Many organizations use both, as Quillfield does, and the multi-agent question is how they work together.

A Foundry project box containing three kinds of agent (prompt agent, workflow, hosted agent), surrounded by shared services: model deployments and model router, tools (MCP, A2A, OpenAPI, code interpreter, toolboxes), knowledge (Foundry IQ), memory, identity (Entra Agent ID), and tracing and evaluation. Arrows out to publishing channels: Microsoft 365 Copilot and Teams, Copilot Studio, A2A endpoint.
The main parts of a Foundry project as they matter to multi-agent design.

Three kinds of agent

Foundry offers three ways to define an agent, and choosing among them is the first design decision.

Prompt agents are defined declaratively: a model deployment, instructions, tools and knowledge, configured in the Foundry portal or through the SDK. Foundry runs the agent loop for you. Ngozika's submission review agent started as a prompt agent with a GPT-class model, instructions about what underwriters look for, the Foundry IQ knowledge base and a code interpreter tool for reading tables in inspection reports. Prompt agents are the quickest to build and the easiest to govern.

Workflows combine agents and other steps into a defined process, which lesson 2 introduced. They are built on a visual canvas or in YAML, use typed variables and Power Fx expressions, and come with templates for sequential, human-in-the-loop and group chat patterns. Every save creates an immutable version, which helps release management.

Hosted agents run your own code, written with the Microsoft Agent Framework or another agent framework, in a container that Foundry hosts and scales. At Build 2026, Microsoft said hosted agents would reach general availability within about a month, with each session running in its own sandbox. Hosted agents suit logic that does not fit a declarative definition: custom parsing, complex state, or orchestration written in code.

KindDefined byChoose when
Prompt agentConfiguration: model, instructions, tools, knowledgeOne agent's behavior can be described in instructions and tools
WorkflowCanvas or YAML: steps, variables, conditionsSeveral agents and steps must run in a defined process
Hosted agentYour code in a containerYou need custom logic, a specific framework or code-level orchestration

Ngozika's team considered moving the submission review agent to a hosted agent, because they wanted custom code to split long inspection PDFs into sections before searching. Bram asked whether the same result could come from improving the knowledge base's ingestion instead. It could: Foundry IQ's indexing handled the sections well once the reports were converted consistently. The agent stayed a prompt agent, which kept it simpler to secure and cheaper to run. Hosted agents remain an option if the team later needs logic that configuration cannot express.

Tools and knowledge

A Foundry agent's power comes from its tools. The catalog changes often, but the categories are stable.

Knowledge. Foundry IQ provides knowledge bases that agents search, built on Azure AI Search, with permission-aware retrieval where the source supports it. Agents can also ground answers in web search and in files.

Actions. Agents can call APIs described with OpenAPI, Azure Functions, and MCP servers. At Build 2026 Foundry previewed toolboxes, which package a curated set of tools behind a single MCP endpoint so that an approved toolbox can be shared across agents, and tool search, which helps an agent pick from many tools without loading all their descriptions at once.

Other agents. An A2A tool lets a Foundry agent call remote agents over Agent2Agent, and an incoming A2A endpoint, in public preview at Build 2026, lets other platforms call a Foundry agent.

Code and computer. A code interpreter runs code in a sandbox to analyze data or files. Computer Use, listed among the AB-100 skills, lets an agent operate a graphical interface by seeing the screen and acting on it, which can reach systems with no API. It is powerful and risky; use it only in isolated environments, with narrow tasks and human oversight.

Models and the model router

Foundry gives access to a large catalog of models from Microsoft, OpenAI and other providers. Each agent uses a model deployment, and the choice affects quality, speed and cost. In a multi-agent system, the right model can differ by agent: a small, fast model may classify an email perfectly well, while drafting a persuasive submission or reasoning about a complex risk may need a larger one.

Foundry's model router is a deployment that chooses, for each request, which underlying model to use, aiming to keep quality while reducing cost and latency. The AB-100 study guide lists the model router among the things an architect should be able to design with. It suits agents whose requests vary widely in difficulty. It makes behavior less predictable, because different requests may be answered by different models, so evaluate with the router in place, not with a single model, before relying on it.

Memory

Foundry previewed agent memory at Build 2026, with three kinds: procedural memory of how to do things, user memory of facts and preferences about a person, and session memory within a conversation. Memory lets an agent improve and personalize over time, but it also raises questions that lesson 7 covers in detail: what is remembered, for how long, who can see it, and how it is corrected or deleted. Quillfield decided not to enable user memory for the submission review agent, because what it would learn about account executives' preferences was less valuable than the governance burden of storing it.

Identity and governance

Every agent that acts in a system needs an identity. Foundry agents can use Microsoft Entra Agent ID, which gives agents their own identities in Entra with sponsors (people accountable for the agent), lifecycle controls and Conditional Access policies. This matters in a multi-agent design because each agent should run with its own identity and only the permissions its job needs, rather than sharing one powerful service account.

At Build 2026, Microsoft also previewed autopilot agents in Foundry: agents that run continuously and act on their own, using Entra Agent ID and governed through Microsoft Agent 365. Agent 365 provides the registry, map of agent relationships and governance controls that let an organization see and manage agents across platforms. Bram's Quillfield rule applies here too: no Foundry agent joins the Submission Desk until it is in the registry with an owner and a sponsor.

For the submission review agent, the identity design had two layers. When an account executive's request reached the agent, searches of the inspection report knowledge base were trimmed to reports that account executive's team was allowed to see. The agent's own identity, sponsored by Ngozika, had read access to the knowledge base and nothing else: no access to BrokerDesk, no ability to send email. Anything that needed to happen in BrokerDesk was done by other parts of the solution.

Publishing and integration

A Foundry agent can reach users in several ways. Publishing to Microsoft 365 Copilot and Teams became generally available at Build 2026. A Foundry agent can be called from Copilot Studio as a connected agent, which is how the Policy Service Assistant reaches the submission review agent. It can be exposed over A2A to other platforms, and called directly through the Foundry API by applications.

For the Submission Desk, Bram chose to keep the account executive's experience in Copilot Studio, published to Teams, and to call Foundry where Foundry was the better home. The workflow that runs the submission steps lives in Foundry, because it needed parallel steps, typed variables and a human-in-the-loop pause that waits for hours, and because Ngozika's team would own it. The front door stays in Copilot Studio because Yusra's team maintains it and it already follows the contact center's channel and data policy rules.

Crossing the boundary between Copilot Studio and Foundry

When a Copilot Studio agent calls a Foundry agent, three things cross the boundary: the request, the user's identity and the result. Each needs a deliberate design.

The request. The parent agent's planner decides when to call the Foundry agent from its description, and composes the request from the conversation. That request is the only context the Foundry agent receives unless you pass more. Bram asked Yusra to write the description of the submission review agent in the parent as carefully as any tool description: what it does, the inputs it expects (a BrokerDesk submission number and the client's business type), and when *not* to call it, such as for personal lines policies, which have no inspection reports.

The identity. The account executive's identity must reach the knowledge base search so that results are trimmed to what that person may see. Where the call runs under the agent's own identity instead, the agent sees everything its identity can reach, and trimming must be done some other way. Ngozika's team tested this explicitly: they asked the same question as an account executive in the Omaha head office and as one in a branch office and confirmed that each saw only their own team's clients' reports.

The result. The Foundry agent returns text, and the parent treats it as content to include in its answer. For the Submission Desk workflow, Bram wanted more than text: a structured list of findings, each with a severity, the report it came from and the date, so that the brief writer and the account executive could check every claim against its source. The agent's instructions were changed to return that structure, and a contract test checks it on every release.

Networks and data residency

Foundry resources live in Azure regions, and many organizations put them behind private networking so that traffic between agents, models, knowledge stores and tools never crosses the public internet. When agents on different platforms must talk, the network path has to be planned: a Copilot Studio agent calling a Foundry agent behind a private endpoint needs a route to reach it, and a Foundry agent calling an MCP server inside the corporate network needs one too. Quillfield's Foundry projects are in a US Azure region, matching where BrokerDesk data is stored, and the inspection report knowledge base was kept in the same region on Wendell's advice. Data residency questions are easier to answer when every agent that touches client data runs in the same geography, and much harder when a convenient model deployment in another region is chosen without anyone noticing.

Lifecycle management

The AB-100 study guide includes application lifecycle management for Foundry agents, and it is easy to underestimate. A multi-agent system has several components that change independently, and a change to one can break another.

Quillfield set up three Foundry projects, for development, test and production, mirroring the Power Platform environments the Copilot Studio agents use. Agent definitions, workflow YAML and knowledge base configuration are kept in source control, and deployments to test and production run through a pipeline. The pipeline runs evaluations against a test set before promotion: for the submission review agent, a set of 60 historical submissions with the issues underwriters actually raised. A release that lowers the share of issues found is blocked.

Two practices proved especially useful. First, version pinning across boundaries: the Submission Desk workflow references a specific version of the submission review agent, so Ngozika's team can release a new version to test without changing production behavior until the workflow is updated. Second, contract tests: each agent that another depends on has a small set of tests that check the shape of its inputs and outputs, so that a change to the hand-off format is caught before release rather than in production.

Worked problem

Placing the pieces of the Submission Desk

Bram must decide where each part of the Submission Desk lives: the front-door conversation, the submission workflow, the submission review agent, the appetite checks and the brief writer.

Show solution
  1. Front door: Copilot Studio, published to Teams, maintained by Yusra's team, governed by existing data policies.
  2. Submission workflow: Foundry workflow, because it needs parallel steps, typed variables, long human pauses and versioning.
  3. Submission review agent: stays a Foundry prompt agent owned by Ngozika's team, with its own Entra Agent ID.
  4. Appetite checks: a small Foundry prompt agent that calls carrier MCP servers through an approved toolbox.
  5. Brief writer: a Foundry prompt agent with a larger model, because drafting quality matters most here.

Answer: One Copilot Studio front door and four Foundry components, each with its own identity and owner, connected by versioned contracts and registered in Agent 365.

Common mistakes

  • MistakeStarting with a hosted agent because code feels more flexible.

    InsteadStart with a prompt agent and move to hosted only when configuration cannot express the logic.

  • MistakeGiving all Foundry agents one shared service identity.

    InsteadGive each agent its own identity with only the permissions its job needs.

  • MistakeEvaluating with one model and deploying behind the model router.

    InsteadEvaluate with the router in place, because different requests may use different models.

  • MistakeLetting a dependent workflow always call the latest agent version.

    InsteadPin versions across boundaries and promote changes deliberately.

  • MistakeEnabling memory by default.

    InsteadEnable memory only where its value outweighs the governance of what it stores.

Summary and key terms

  • Foundry Agent Service runs prompt agents, workflows and hosted agents inside projects.
  • Tools include knowledge through Foundry IQ, OpenAPI, MCP, A2A, code interpreter and Computer Use; toolboxes and tool search were in preview at Build 2026.
  • The model router chooses a model per request; evaluate with it in place.
  • Entra Agent ID gives each agent its own identity and sponsor; Agent 365 governs agents across platforms.
  • Lifecycle management needs separate projects, source control, evaluation gates, version pinning and contract tests.
Microsoft Foundry
Microsoft's platform for building AI applications and agents, formerly Azure AI Foundry.
Prompt agent
A Foundry agent defined by configuration: model, instructions, tools and knowledge.
Hosted agent
A Foundry agent that runs your own code in a container Foundry hosts.
Model router
A deployment that chooses which model answers each request to balance quality and cost.
Toolbox
A curated set of tools exposed through a single MCP endpoint (preview at Build 2026).
Contract test
A test that checks the shape of an agent's inputs and outputs so hand-off changes are caught early.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. When should you choose a hosted agent over a prompt agent?

    Show answer

    When you need custom logic, a specific framework or code-level orchestration that configuration cannot express.

  2. Why pin the version of an agent that a workflow calls?

    Show answer

    So the owning team can release new versions to test without changing production behavior until the workflow is updated.

  3. Name the three kinds of memory Foundry previewed at Build 2026.

    Show answer

    Procedural, user and session memory.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz