# Deploying Scalable Agents

Moves an agent prototype to a scalable, observable deployment on Microsoft Foundry.

- Repository: https://github.com/microsoft/ai-agents-for-beginners (78611 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-10-31
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add microsoft/ai-agents-for-beginners --skill deploying-scalable-agents -g -a claude-code -y`
Codex: `npx skills add microsoft/ai-agents-for-beginners --skill deploying-scalable-agents -g -a codex -y`
Cursor: `npx skills add microsoft/ai-agents-for-beginners --skill deploying-scalable-agents -g -a cursor -y`
Gemini CLI: `npx skills add microsoft/ai-agents-for-beginners --skill deploying-scalable-agents -g -a gemini-cli -y`

## Description

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 gate, release gate, human approval workflow, agent observability, agent tracing, agent cost optimisation, smoke test a hosted agent, production customer support agent. DO NOT USE FOR: building your first agent (start with Lesson 01), running agents locally on-device (use local-ai-agents / Lesson 17), Azure infrastructure provisioning unrelated to agents, non-Foundry deployment targets.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Deploying Scalable Agents with Microsoft Foundry

> Companion skill for [Lesson 16, Deploying Scalable Agents](../../../16-deploying-scalable-agents/README.md).
> 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)

The rest: https://github.com/microsoft/ai-agents-for-beginners/blob/HEAD/.agents/skills/deploying-scalable-agents/SKILL.md
