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/agent-optimizer.md

Agent Optimizer in Foundry — Scaffold Python Agent

Prepare an existing Python hosted agent for Agent Optimizer in Foundry, then run optimization, apply the selected candidate locally, and deploy through azd after review.

When to Use This Skill

USE FOR: make my Python agent optimizable with Agent Optimizer in Foundry, scaffold optimizer config, add load_config, prepare .agent_configs, configure eval.yaml, run azd ai agent optimize, apply optimizer candidate, deploy optimized agent.

DO NOT USE FOR: non-Python agents, prompt agents, running standalone batch evaluations, prompt optimization of an already deployed agent, or general Foundry deployment. For normal deployment, use deploy. For eval analysis loops, use observe.

Quick Reference

| Property | Value | | -------- | ----- | | Phase | Scaffold, optimize, apply locally, deploy | | Supported language | Python | | Required runtime | azd project with hosted agent | | Required package | azure-ai-agentserver-optimization | | Required import | from azure.ai.agentserver.optimization import load_config | | Required baseline | .agent_configs/baseline/ in the agent's service source directory | | Supported targets | instruction, model, skill folder, function tool definitions | | azd setup | azd Setup | | Detailed scaffold steps | Scaffold Workflow | | Python/file patterns | Python Patterns | | Eval config | eval.yaml Guidance | | Optimize flow | Optimize Workflow |

High-Level Lifecycle

  1. Prepare azd: Verify azd, login, and azure.ai.agents extension with azd Setup.
  2. Scaffold: Follow Scaffold Workflow when SDK wiring or .agent_configs/baseline/ is missing; stop for review if files changed.
  3. Configure eval: Create or update eval.yaml using eval.yaml Guidance.
  4. Optimize: Run and monitor azd ai agent optimize with Optimize Workflow.
  5. Apply and deploy: Apply the selected candidate locally, review the diff, then deploy with azd deploy.

Workflow

  1. Resolve the target agent root and confirm it is a Python hosted agent.
  2. Read azd Setup, then Scaffold Workflow if scaffolding is needed.
  3. Read eval.yaml Guidance and configure optimization inputs from known dataset/evaluator context.
  4. Read Optimize Workflow, run optimization, and ask before applying a candidate.
  5. After local review and approval, deploy with azd deploy, then invoke via invoke.

Guardrails

  • Target hosted Python agents only.
  • Preserve existing frameworks, tools, hosting adapters, protocols, and entrypoints.
  • Do not use one global scaffold across multi-agent roles unless the architecture already has one global prompt/model or the user approves.
  • Keep edits scoped to the selected agent root.
  • Do not apply candidates or deploy automatically; stop for review first.
  • Prefer azd ai agent optimize apply --candidate plus azd deploy over direct optimize deploy so source changes are reviewable.