The same platform on Microsoft Foundry
Microsoft Foundry (formerly Azure AI Foundry) is Microsoft's platform for building and running AI applications and agents. This build keeps the contracts from the overall design and maps each part onto a Foundry or Azure service. It covers only the language-model copilot: the matcher and the privacy gate run on edge appliances and are not in Foundry.
| Design part | In Microsoft Foundry |
|---|---|
| Copilot agent | A Foundry agent in a project, with instructions and draft-only tools. A thin service in front handles the workflow |
| Models | Model deployments in the project, reached through the enterprise AI gateway for scanning and budgets |
| Policy index | Azure AI Search index (now presented as Foundry IQ) with a knowledge tool on the agent, filtered by jurisdiction and date |
| Tool gateway | The retail API (Application Programming Interface) as an OpenAPI tool, or the gateway attached as an MCP (Model Context Protocol) tool, exposing reads and drafts only |
| Identity | Microsoft Entra ID, managed identities and role-based access control; no keys in code |
| Safety | Foundry content filters and guardrails, in addition to Prisma AIRS at the gateway |
| Tracing and evaluation | OpenTelemetry traces to Application Insights, and Foundry evaluators for agents |
Build steps
1 · Create the project
One Foundry project per environment, with a managed identity and role assignments for search, storage and the retail API.
2 · Deploy models
Deploy the small and reasoning models and point the project at the enterprise gateway so every call is scanned and budgeted.
3 · Build the policy index
Load policies and notices into Azure AI Search with jurisdiction, version and effective-date fields, and attach it as the agent's knowledge tool.
4 · Register tools
Describe the read and draft operations as an OpenAPI tool. No tool signs, sends, files or deletes anything; those are acts of a named person or of the consent register.
5 · Create the agent
Write instructions, attach tools and run a thread per case.
6 · Trace and evaluate
Turn on tracing, run agent evaluators on the shared evaluation set and gate releases on the result.
Creating the agent
A sketch with the Azure AI Projects SDK (Software Development Kit). The SDK changes quickly, so confirm the current class and method names. The important points are the identity, the draft-only tool set and the thread per case.
from azure.identity import DefaultAzureCredential
from azure.ai.projects import AIProjectClient
project = AIProjectClient(
endpoint=os.environ["FOUNDRY_PROJECT_ENDPOINT"],
credential=DefaultAzureCredential(), # managed identity in Azure, your login locally
)
agent = project.agents.create_agent(
model="rf-reasoner", # deployment name, routed through the gateway
name="privacy-copilot",
instructions=open("prompts/privacy_copilot.md").read(),
tools=[SEARCH_POLICIES_TOOL, RETAIL_OPENAPI_TOOL], # policies from AI Search; draft-only tools via OpenAPI
)
def draft_for_case(thread_id: str | None, structured_facts: str):
thread = project.agents.threads.get(thread_id) if thread_id else project.agents.threads.create()
project.agents.messages.create(thread_id=thread.id, role="user", content=structured_facts)
run = project.agents.runs.create_and_process(thread_id=thread.id, agent_id=agent.id)
return thread.id, runThe agent drafts. Only a person's signature allows sending, and no tool can supply it.
Keeping members safe
- The copilot can read aggregates and statuses and draft. Approving, sending, filing and deleting are acts of a named person or the consent register and are not available as tools.
- The retail API authorises by the acting person and the signed content hash, not by anything in the prompt.
- No tool and no credential in the project can reach the cameras, the edge appliances, the vault or the privacy gate.
- The Prisma AIRS profile from the previous page is attached at the gateway, so Foundry's own filters are a second layer.
- Tool outputs are structured; free-text notes are not fed back to the model.
Evaluation in Foundry
| What is measured | Evaluator | Threshold |
|---|---|---|
| Did the agent understand the request | Intent resolution | At least 0.9 on the set |
| Did it call the right tool with the right arguments | Tool call accuracy | At least 0.95 |
| Did it follow its instructions and policies | Task adherence | At least 0.95 |
| Are statements supported by the facts and the policy | Groundedness | At least 0.95 |
| Is anything unsafe, leaked or beyond a draft | Safety evaluators and a custom check | Zero failures |
Thresholds are illustrative. Set them from your own baseline and review them as the set grows.
When to choose it
| Choose Foundry when | Choose another build when |
|---|---|
| The retailer standardises on Azure, Entra ID and Application Insights | You need to control the workflow graph and its checkpoints in code |
| Managed hosting of agent threads and tools is a benefit | Data residency rules rule out a hosted agent service |
| Security and operations teams already work in Azure tools | Your evaluation and tracing tools are built around another stack |
Build this for your business
This example is speculative and not a recommendation to deploy, but the same pattern, consent first, a deterministic privacy gate, a governed gateway, runtime security, advisory-only AI and measured fairness, fits any service that handles sensitive personal data. We can scope a pilot on your own systems.
Book a discovery call