AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

microsoft-foundry

Build, deploy, evaluate, optimize, fine-tune, and manage Microsoft Foundry agents, models, and resources end to end. USE FOR: foundry, azd ai agent, azd provision/deploy, hosted agent scaffold/develop/run/deploy/troubleshoot, prompt agent, managed harness agent, Copilot harness, voice agent, create/update/invoke/evaluate agent, add tool to agent, agent insights, batch/continuous eval, continuous monitoring, agent CI/CD, optimize/improve prompt, optimize agent instructions, Agent Optimizer, dataset curation from traces, deploy model, model fine-tuning (SFT/DPO/RFT), Foundry project, RBAC, role assignment, permissions, quota, capacity, region, deployment failure, AI Services, create Foundry resource, knowledge index, customize deployment, onboard, availability, training-data, grader, distillation, large file upload. DO NOT USE FOR: Azure Functions, App Service, general Azure deploy (use azure-deploy), general Azure prep (use azure-prepare).

Original source
microsoft
License
MIT
Pinned revision
3f5b461b2314e01c400564051e92469114c5b68f

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

This skill also requires local files or dependencies. Remote reading alone may not be enough.

Ask your assistant

Use Agentic Memory skills to read microsoft--microsoft-foundry at revision 3f5b461b2314e01c400564051e92469114c5b68f, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 151

foundry-agent/agent-optimizer/references/optimize-workflow.md

Optimize Workflow

Use this after azd setup and scaffold review are complete.

1. Prepare context

  1. Resolve the hosted agent with azd Setup.
  2. If SDK wiring or .agent_configs/baseline/ is missing, run Scaffold Workflow first.
  3. If scaffolding changed files, stop and ask the user to review before optimization.
  4. Ensure eval.yaml exists using eval.yaml Guidance, generate it with azd ai agent eval generate, or ask whether to use built-in optimize defaults.
  5. Before setting --optimize-model or options.optimization_model, verify the project has an existing deployment from the allowed optimizer list: GPT-5, GPT-5.1, GPT-5.2, GPT-5.4, GPT-5.5, DeepSeek-V4-Pro, or DeepSeek-V-3.2.

When evaluation inputs are not already selected, generate them from a reviewed seed dataset or regenerate defaults:

azd ai agent eval generate --dataset <path-to-jsonl>
azd ai agent eval generate --reset-defaults

2. Run optimize

Run from the azd project/agent root:

azd ai agent optimize --optimize-model <allowed-optimizer-model-deployment-name>

If multiple services are detected, let azd prompt or ask the user which service to use. If eval.yaml exists or was generated, use it when it matches the selected agent; otherwise ask before regenerating or ignoring it.

3. Monitor

Use these when the job is long-running or the user asks:

azd ai agent optimize status <operation-id> --watch
azd ai agent optimize list
azd ai agent optimize cancel <operation-id>

Capture the operation ID, portal URL, scores, and candidate IDs from output.

4. Apply locally

Recommend the best candidate, then ask before applying:

azd ai agent optimize apply --candidate <candidate-id>

After apply, show the source diff and summarize changed files, prompts, model/temperature, tools, and skills.

5. Deploy after review

In azd environments, prefer local apply plus:

azd deploy

Do not use azd ai agent optimize deploy --candidate <candidate-id> unless the user explicitly requests it. Local apply keeps optimized changes visible for source control review.