Skill 180 · Foundry Agentic Loop
Subchapter 180.6
references/deploy.mdMarkdown4 KBView on GitHub
Ship the verified solution to the target in .azure/deployment-plan.md. Apply the skill defaults and use microsoft-foundry for platform operations. Run azd from the workspace root, with AZURE_DEV_USER_AGENT=microsoft_foundry_skill set inline.
Run these checks read-only and report every gap at once.
az, azd and bicep work. azd ext list meets requiredVersions in azure.yaml. azd auth login --check-status succeeds. If az is signed in but azd is not, run azd config set auth.useAzCliAuth true.azd env get-values matches the deployment plan’s subscription, resource group, region and environment. Stop on any mismatch.uv.lock or pinned requirements, never the agent-framework meta-package..agentignore; containers have .dockerignore..gitattributes).Inside a workflow run, the approve-deploy-v1 (or a later approve-deploy-r<n>[-a<k>]-v1) approval covers this section only for the fingerprint it recorded: first confirm azd env get-values and az account show match the approved environment, subscription, location, resource group and Foundry account, project and resource group, and if any differs, change nothing and report blocked. Report each health and E2E check as an evidence item. Otherwise ask first, summarizing the resources, cost, security and region impact for the named environment and subscription.
When the infrastructure changed, run azd provision --preview <layer> --no-prompt for each infra.layers name (a plain --preview fails on multiple layers) and review deletions and replacements. Stop on surprises.
Run azd up --no-prompt, or azd deploy --no-prompt when the infrastructure is unchanged. Wait for it to finish, record the exit code, and read back the grants after deploy.
Read the endpoints from azd env get-values (SERVICE_<NAME>_URI, AGENT_<NAME>_RESPONSES_ENDPOINT). Confirm each container app has an active, healthy revision (az containerapp revision list).
For each agent, run:
azd ai agent show <agent> to get the endpoint and playground URL;azd ai agent invoke <agent> "<scenario>";azd ai agent monitor <agent> --session-id <id>, with the ID from the invoke’s Session: line, to read its logs.Retry 424 session_not_ready or 502 warm-up responses with backoff for up to 5 minutes.
Rerun the E2E suite against the deployed frontend at the concurrency recorded in docs/verify.md, plus every check it defers to Deploy.
| Symptom | Fix |
|---|---|
QuotaExceeded, InsufficientQuota | Rerun the placement check in another approved region, or lower capacity |
Conflict (name taken), soft-deleted account | Add a suffix to the environment, or purge with approval |
ImagePullBackOff | Check ACR push, AcrPull for the app identity and AZURE_CONTAINER_REGISTRY_ENDPOINT |
InvalidTemplate, InvalidResourceName | Run az bicep build; check AVM versions and name limits |
AuthorizationFailed | Run the RBAC preflight and hand the owner the grant block |
Hosted agents can only be called through the agent endpoint | Call {project}/agents/{agent}/endpoint/protocols/openai with the https://ai.azure.com/.default scope |
| Agent dependency resolution fails | Pin sub-packages and their transitive imports |
Hook fails with missing AZURE_TENANT_ID or an AGENT_* variable | Export it from azd env get-values in the hook; order hooks after deploy |
DEPLOYED_FRONTEND in .env.docs/deploy.md with:
azd deploy of the previous version) and teardown (azd down --purge, then the Entra app registrations from docs/implementation.md, only with approval).README.md with the overview, architecture, how to run and deploy, and links to all docs/.Pass only when:
Report status, summary, artifacts, assumptions, issues, lessons, and endpoints as {name, url}.