deploying-scalable-agents
Ce qu’il fait
Cette compétence guide le passage d'un agent IA du prototype à un déploiement en production. Elle s'adresse aux équipes qui veulent que leur agent tourne de façon fiable, qu'il soit surveillé et testé avant chaque version.
Quand l’utiliser
- ✓Quand vous voulez déployer un agent fonctionnel sur Microsoft Foundry comme service hébergé et versionné.
- ✓Lorsque vous avez besoin d'étapes d'approbation, de mise en cache ou de contrôles d'évaluation avant la mise en ligne d'une nouvelle version d'agent.
- ✓Lorsque vous voulez ajouter le traçage et la surveillance à un agent en production.
Lien du skill
https://github.com/microsoft/ai-agents-for-beginners/blob/main/.agents/skills/deploying-scalable-agents/SKILL.mdCopiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.
Comment l’utiliser
Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.
Message prêt à coller
Pour Claude Code, Codex ou Cursor : lancez-la dans le dossier du projet et le skill est installé.
Téléchargez le SKILL.md et placez-le dans le dossier de skills de votre agent.
Exemple de demande à votre IA
“Aide-moi à transformer mon prototype d'agent en déploiement sur Microsoft Foundry avec surveillance.”
5 nouveaux skills par semaine. 1 minute de lecture.
Comment ça marche
L'agent examine votre prototype et propose un modèle de déploiement. Il ajoute ensuite des éléments comme le routage des modèles, les étapes d'approbation, la surveillance et les tests de fumée après déploiement.
Contenu technique (SKILL.md original)
Texte original de l’auteur, en anglais, directement depuis GitHub.
Deploying Scalable Agents with Microsoft Foundry
Companion skill for Lesson 16 – Deploying Scalable Agents. Use it to help a learner move an agent from prototype to a scalable, observable production deployment. Ground every recommendation in the lesson content and the runnable notebook; do not invent Foundry APIs.
Triggers
Activate this skill when a learner wants to:
- Deploy an agent to Microsoft Foundry as a hosted agent and make it versioned/observable.
- Choose between client-hosted, hosted-agent, and agent-workflow deployment patterns.
- Add model routing, response caching, or bounded concurrency to control latency and cost.
- Add an evaluation gate so a bad agent version cannot ship.
- Add a human-in-the-loop approval step for high-risk actions.
- Instrument an agent with OpenTelemetry tracing for production observability.
- Smoke-test a deployed agent as a fast post-deploy gate.
Core mental model
A production agent is mostly the operational skeleton around the model (~80%), not the model itself. Map every recommendation to one of these concerns:
| Concern | Prototype → Production |
|---|---|
| Hosting | notebook → versioned hosted service |
| Identity | your az login → managed identity + scoped RBAC |
| State | in-memory → externalised thread/memory store |
| Failure | traceback → retries, fallbacks, alerts |
| Cost | "a few cents" → tracked, routed, cached, budgeted |
| Quality | eyeballing → automated evaluation gate |
| Trust | you approve → policy + human-in-the-loop |
Deployment patterns (pick one, or combine)
- Client-hosted — the reasoning loop runs in your process. Max control; you own scaling/state.
- Hosted agent (Foundry Agent Service) — Foundry hosts the loop, stores threads, enforces RBAC/content safety, shows the agent in the portal. Less control, far less operational surface.
- Agent workflow — multiple agents/tools composed into a graph with branching, approval nodes, and durable checkpoints.
Lifecycle (the loop that ships an agent)
create → version → evaluate (gate) → deploy hosted → observe online → collect failures → repeat.
Offline evaluation is a gate, not an afterthought — a version does not ship
unless it clears the threshold. Online observability feeds real failures back
into the offline test set.
Scaling and cost levers (in priority order)
- Right-size the model — use the smallest model that passes the evaluation gate.
- Route by complexity — small/fast model for simple requests, large model for real reasoning (DIY classifier or Foundry Model Router).
- Cache — serve near-duplicate requests without a model call.
- Stateless design + bounded concurrency — externalise state; retry with backoff.
Key patterns to reproduce
Point the learner at these from the notebook
16-python-agent-framework.ipynb:
- Request handler: cache → route by complexity → trace span → run → cache.
- Evaluation gate: score an offline test set; return
pass_rate >= thresholdand only deploy if true. - Human approval:
@tool(approval_mode="always_require")for actions like large refunds. - Tracing: wrap each request in
tracer.start_as_current_span(...)and set attributes likerouted.model,customer.id.
Smoke-testing a deployed agent
After deploy, verify the endpoint actually answers (a green deploy can still be
silent). Use the AI Smoke Test
action via .github/workflows/smoke-test.yml
with the catalog in tests/. The runner POSTs each
prompt to POST {project_endpoint}/agents/{agent_name}/endpoint/protocols/openai/responses
and asserts on the reply text. The identity needs the Azure AI User role at
Foundry project scope; the token audience must be https://ai.azure.com/.
Layer the gates: smoke test (reachable/responding, every deploy) → offline evaluation (good enough to ship, before promotion) → online evaluation (how is it doing in the wild, continuous).
Enterprise controls
- RBAC: give each hosted agent a managed identity with least privilege.
- MCP in production: treat every MCP server as an untrusted boundary — pin the version, scope its i
Questions fréquentes
Quelles options de déploiement sont couvertes ?
Elle couvre les agents hébergés côté client, les agents hébergés et les flux de travail d'agents.
Comment aide-t-elle à maîtriser les coûts ?
Elle traite du routage des modèles, de la mise en cache des réponses et des limites du nombre de requêtes simultanées.
Ajoute-t-elle une validation humaine ?
Oui. Elle couvre une étape d'approbation pour les actions à haut risque.
Détails
Description originale de l’auteur
Take a working agent prototype to a scalable, observable production deployment on Microsoft Foundry. Covers deployment patterns (client-hosted, hosted agents, agent workflows), the agent lifecycle, model routing, response caching, evaluation gates, human-in-the-loop approval, observability with OpenTelemetry, cost optimisation, and smoke-testing deployed agents with the AI Smoke Test action. Based on Lesson 16 of AI Agents for Beginners. USE FOR: deploy an agent to production, scale an agent, Microsoft Foundry hosted agent, Foundry Agent Service, model routing, response caching, evaluation gat
Popularité
- Étoiles GitHub
- 79k
- Position au classement
- #1724
- Licence
- MIT
- Mis à jour
- 02/11/2026
Commentaires
- …
Autres skills de ce dépôt
azure-openai-to-responses
79kAide votre agent à faire migrer une application Python d'Azure OpenAI, des Chat Completions vers la nouvelle API Responses, étape par étape.
jupyter-notebook
79kAide votre agent à créer ou ranger des notebooks Jupyter pour des expériences ou des tutoriels pas à pas, à l'aide de modèles prêts à l'emploi.
local-ai-agents
79kApprend à votre agent à construire des assistants IA qui fonctionnent entièrement sur votre ordinateur, avec des modèles et outils locaux, sans nuage.
Skills similaires
add-model-provider
394kPermet à votre agent de connecter un nouveau fournisseur de modèles IA à OpenClaw par des commandes sûres, sans clé en clair, puis de lancer un test.
acp-router
394kAide votre agent à envoyer une tâche à un assistant de code comme Claude Code ou Cursor via OpenClaw, afin que le travail s'exécute dans cet outil.
browser-automation
394kApprend à votre agent à piloter des pages web étape par étape, y compris les connexions, les onglets et la reprise lorsqu'une page ne répond plus.