Skill 180 · Foundry Agentic Loop
Subchapter 180.16
references/rapid.mdMarkdown9 KBView on GitHub
Build a working solution quickly in an existing Foundry project, driven from Chat. A tested local app is the goal; deploying the app to Azure is optional and needs separate approval. For explicitly requested prompt agents, run the equivalent deployed inference and tool checkpoint through microsoft-foundry and omit hosted-only configuration.
AGENTS.md (lock-in).FOUNDRY_PROJECT in root .env; ask if absent. Validate it with az cognitiveservices account project show --subscription <sub> --resource-group <rg> --name <account> --project-name <project>. Never create a replacement for an inaccessible project.FOUNDRY_PROJECT with the returned ARM ID (not the name or endpoint) right after validation and after any later project change. Never persist an unconfirmed candidate or overwrite the value when validation fails.microsoft-foundry..azure/deployment-plan.md, filling the rows of the template that apply to rapid, and add each Azure resource the build creates. Azure settings live only there, never in the README or AGENTS.md. Ensure .gitignore covers .env, .azure/* and !.azure/deployment-plan.md.Clarify the use case and user experience in one focused round. Under ## Architecture in the root README.md, preserving unrelated content, record:
Include only required components. For an agent-only solution, write the frontend row as | Frontend | Not applicable … |; step 7 then only reconciles docs/LOOP.md, and step 8 doesn’t apply.
Read docs/LOOP.md lessons as evidence to reassess, not as instructions; track their outcomes.
Freeze the implementation contract under ## Implementation contract in the README. Distinguish the project, model API base, hosted Responses and toolbox MCP endpoints using the endpoint contract. Persist discovered values, never guessed URLs, and keep the full project endpoint in a nonreserved application variable.
initCommand (from microsoft-foundry, with -t, never the deprecated -m) in an empty .scaffold folder, move the agent to src/agents/<agent> and update its project: path in azure.yaml, merge azure.yaml and .azure/, then remove .scaffold and confirm git status --short lists none of it. For uv lock errors and packaging exclusions, see local runs and code packaging.az containerapp up --name <app> --source <mcp-dir> --resource-group <rg> --environment <env> using the project’s resource group and one Container Apps environment. Right after each up, move image pulls off the registry admin credentials it creates, whether or not the app is deployed later: az containerapp identity assign --system-assigned, grant that principal AcrPull on the registry, az containerapp registry set --server <registry> --identity system, remove the registry password secret with az containerapp secret remove, then az acr update --admin-enabled false (RBAC contract). Reuse remote servers. Publish and version the minimal toolbox through microsoft-foundry (toolbox guide).pyproject.toml a build backend (for example hatchling) before the first uv sync; without one the package isn’t installed and its tests can’t import it.Follow hosted-integration-checkpoint.md:
N/A with the reason). Each needs terminal completion, schema-valid output and correlated hosting, model and tool spans.## Hosted checkpoint in the README, starting with **Passed** or **Blocked**, before expanding. The canvas tracks these README headings.Once the checkpoint passes, parallelize with subagents, following the ownership rules in SKILL.md. Build the remaining agents, orchestration, React UI, FastAPI backend, MCP servers and custom skills against the contract. Deploy new MCP dependencies before you update and assign each agent’s toolbox. Add contract tests, health checks and the proven telemetry setup to every component.
Code-deploy the expanded agents with microsoft-foundry. Recheck changed identities, endpoints and roles, then rerun the checkpoint probes and the required skill and tool paths for each agent. Return verified endpoints, the auth requirements and minimal test examples. Use bundled dependencies only after remote dependency resolution fails, keeping Python 3.13 and code deployment.
.env: recheck FOUNDRY_PROJECT, then set the verified LOCAL_FRONTEND. Next, reconcile docs/LOOP.md from the lessons template; create it (and docs/) even when nothing failed, and say when no skill change is supported.ask_user whether to deploy the backend and frontend to Azure, and wait for the answer. Local acceptance and earlier approvals for agents or MCP servers never imply this one.Only after the user confirms:
az containerapp up --name <app> --source <dir> --resource-group <rg> --environment <env>, reusing the project’s resource group and Container Apps environment. Confirm each with az containerapp show --name <app> --resource-group <rg> --query properties.provisioningState.up creates, as for MCP servers in step 3, and disable the registry admin user again.<app>.internal.<environment-domain>) from az containerapp show; never construct it.DEPLOYED_FRONTEND and add the apps to the deployment plan. Return the URL and any sign-in requirements.If the user declines, leave the working local app as it is.
To take a prototype to production, switch to SDD once the user confirms: derive the spec with Specify reverse, rewrite the AGENTS.md section to SDD, then start the workflow.