Deploying Scalable Agents with Microsoft Foundry
Companion skill for Lesson 16 – Deploying Scalable Agents.
Use am to help learner move agent from prototype go scalable, observable
production deployment. Ground every recommendation inside lesson content and
the runnable notebook; no make you invent Foundry APIs.
Triggers
Activate dis skill when learner wan:
- Deploy agent to Microsoft Foundry as hosted agent and make am 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 evaluation gate so bad agent version no fit ship.
- Add human-in-the-loop approval step for high-risk actions.
- Instrument agent wit OpenTelemetry tracing for production observability.
- Smoke-test deployed agent as quick post-deploy gate.
Core mental model
Production agent na mostly operational skeleton around di model (~80%),
no be di model itself. Map every recommendation to one of dis 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 | "small small 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 — di reasoning loop dey run inside your process. Max control; you dey own scaling/state.
- Hosted agent (Foundry Agent Service) — Foundry dey host the loop, dey store threads, dey enforce RBAC/content safety, dey show di agent for portal. Less control, far less operational wahala.
- Agent workflow — multiple agents/tools join body as graph wit branching, approval nodes, and durable checkpoints.
Lifecycle (di loop wey dey deliver agent)
create → version → evaluate (gate) → deploy hosted → observe online → collect failures → repeat.
Offline evaluation na gate, no be afterthought — version no go ship
unless e clear di threshold. Online observability dey feed real failures back
enter di offline test set.
Scaling and cost levers (priority order)
- Right-size di model — use di smallest model wey fit pass di evaluation gate.
- Route by complexity — small/fast model for simple requests, big model for real reasoning (DIY classifier or Foundry Model Router).
- Cache — serve near-duplicate requests without model call.
- Stateless design + bounded concurrency — externalise state; retry wit backoff.
Key patterns wey dem suppose reproduce
Point learner to these from di notebook