Chapter 6 of 6 · Validation and operations

Governed Microsoft Foundry agent baseline

Governed foundation 2.5 hours in a non-production POC

Chapter 6 of 6

Confirm the result#

Send one synthetic request for policy POL-001 through the stable endpoint:

PowerShell

$config = Get-Content .\artifacts\agents\policy-assistant\agent.json -Raw |
  ConvertFrom-Json
$token = az account get-access-token `
  --scope https://ai.azure.com/.default `
  --query accessToken `
  --output tsv `
  --only-show-errors
$uri = "https://$foundryAccount.services.ai.azure.com/api/projects/$projectName/agents/$($config.agentName)/endpoint/protocols/openai/responses"
$body = @{
  input = "Use get_policy to read synthetic policy POL-001. Return only its approved fields."
} | ConvertTo-Json

$result = Invoke-RestMethod `
  -Method POST `
  -Uri $uri `
  -Headers @{ Authorization = "Bearer $token" } `
  -ContentType "application/json" `
  -Body $body

$result.output

Bash

agent_name=$(python3 -c 'import json, pathlib; print(json.loads(pathlib.Path("artifacts/agents/policy-assistant/agent.json").read_text())["agentName"])')
token=$(az account get-access-token --scope https://ai.azure.com/.default --query accessToken --output tsv --only-show-errors)
uri="https://${foundry_account}.services.ai.azure.com/api/projects/${project_name}/agents/${agent_name}/endpoint/protocols/openai/responses"

export session04_URI="$uri"
export session04_TOKEN="$token"
python3 - <<'PY'
import json
import os
import urllib.request

body = json.dumps({
    "input": "Use get_policy to read synthetic policy POL-001. Return only its approved fields."
}).encode()
request = urllib.request.Request(
    os.environ["session04_URI"],
    data=body,
    headers={
        "Authorization": f"Bearer {os.environ['session04_TOKEN']}",
        "Content-Type": "application/json",
    },
    method="POST",
)
with urllib.request.urlopen(request) as response:
    payload = json.load(response)
print(payload.get("output"))
PY
unset session04_URI session04_TOKEN

The expected record must contain only approved fields, and get_policy must be the only tool call. Confirm that the downstream API authorized the Foundry project managed identity without a signed-in human token. Stop on any other result. Do not retain the response or export the trace.

After implementation#

What remainsOwner
Agent behavior and pinned releaseAI product owner
Endpoint access, Entra Agent Identity, and downstream authorizationPlatform and identity owner
RAI policySafety owner
OpenAPI definition and human-approved write routeAPI and policy owner
Trace access, retention, and costOperations owner
Implementation files and deployment scriptsAI engineering

Keep the marked agent, its pinned endpoint, unique identity, and Application Insights connection in operation. Production release and write-capable tools require the approved change process.

To remove this baseline, the product, platform, identity, and operations owners first confirm that no approved consumer uses the endpoint. Through the approved Foundry change path, remove only the agent whose name matches agent.json and whose live agent card contains implementationSession=04-governed-agent-baseline. This removes its versions, identity, and stable endpoint. It leaves the Foundry project, model deployment, read API, RAI policy, Application Insights resource, and repository definitions in place.

Session 04

Governed Microsoft Foundry agent baseline slide deck