Microsoft conceptsDesigning and Implementing Multi-Agent AI SolutionsMicrosoft Foundry
AI-500 secure, govern and deploy multi-agent solutions
Study notes for this AI-500 domain: guardrails set per agent, why a guardrail can fail open, and how to release and roll back hosted agent versions.
3 min read
A mock question shows a hosted agent that deployed cleanly, and the answer looks obvious: the guardrail is attached, so prompts get filtered. An agent that references a policy that doesn't exist can still report active while no filtering is applied. And an agent that leaves out rai_config runs with no content safety guardrail at all.
01 What does the secure, govern and deploy domain cover?
The domain's name hands you three jobs. Securing starts with Foundry guardrails, which apply controls at user input, tool calls, tool responses and output.
Check those controls too. Microsoft recommends red-team testing and measuring again after you update guardrails. Releases run through development, test and production jobs.
Three topics to study in this domain
- GuardrailsControls chosen for each agent's scenario.
- TestingRed-team, then measure again after changes.
- ReleasesPromote through separate projects, then canary and roll back.
Study guardrails, checking them, and safe releases as three topics.
02 How do you pick guardrails for each agent?
Start with what the agent does. Choosing public users in guided set-up applies stricter filtering and jailbreak protections than choosing internal teams.
If the agent calls external tools, Foundry enables tool response validation and spotlighting against prompt injection.
So two agents on one model can need different guardrails, and Microsoft recommends running set-up for each.
Guardrails follow the agent's scenario, not its model.
03 How do you know a guardrail is really working?
The trap from that mock question has a second form. On the invocations protocol, a policy attached without invocations_moderation screens nothing, yet the agent still returns HTTP 200.
Request bodies larger than 2 MB also skip input screening.
So test. Use a non-production agent, because assigning a guardrail changes behavior immediately. After every change, measure again.
An HTTP 200 doesn't prove anything was screened.
04 How do you release and roll back a new agent version?
Once guardrails hold, you ship. Bind each environment to its own Foundry project, because names alone don't isolate resources.
Promoting a hosted agent from development to production
- DevelopmentIts own Foundry project
- TestSame commit, regression tests
- ApproveProtection rules gate production
- CanarySmall traffic share to candidate
- Roll backStable version back at 100%
If a canary check fails, set the stable version back to 100%. That changes routing without redeploying code.
Rollback has limits elsewhere. On Azure Functions, re-running a deployment doesn't restore Key Vault secret values.
Roll back a canary with traffic rules, not a redeploy.
Summary
- Set up guardrails per agent.
- Without invocations_moderation, requests go unscreened.
- Test on a non-production agent.
- Roll back a canary to the stable version.
- Re-runs don't restore Key Vault secrets.
Sources
- Configure guided guardrail set-up for an agent - Azure AI services | Microsoft Learn (opens in a new tab)
- Add guardrails to a hosted agent - Microsoft Foundry | Microsoft Learn (opens in a new tab)
- Promote hosted agents to production with the Azure Developer CLI - Microsoft Foundry | Microsoft Learn (opens in a new tab)
- How to configure guardrails and controls in Microsoft Foundry - Microsoft Foundry | Microsoft Learn (opens in a new tab)
- Recover a deployment to a Flex Consumption plan in Azure Functions | Microsoft Learn (opens in a new tab)