Take one working agent prototype go scalable, observable production deployment for Microsoft Foundry. E cover deployment patterns (client-hosted, hosted agents,
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-deploying-scalable-agents-542532ceb76c ,按照其中的说明把「deploying-scalable-agents」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
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.
Activate dis skill when learner wan:
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 |
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.
Point learner to these from di notebook
16-python-agent-framework.ipynb:
pass_rate >= threshold and only deploy if true.@tool(approval_mode="always_require") for actions like large refunds.tracer.start_as_current_span(...) and set attributes like routed.model, customer.id.After deploy, make sure say endpoint really dey answer (green deploy fit still dey
silent). Use AI Smoke Test
action via .github/workflows/smoke-test.yml
with catalog for tests/. Runner dey POST each
prompt to POST {project_endpoint}/agents/{agent_name}/endpoint/protocols/openai/responses
and e dey check the reply text. Identity need Azure AI User role at
Foundry project scope; token audience must be https://ai.azure.com/.
Combine di gates: smoke test (make sure e dey respond, every deploy) → offline evaluation (good enough to ship before promotion) → online evaluation (how e dey perform for real life, continuous).
FoundryChatClient(...) + provider.as_agent(...) pattern wey dem dey use for di whole course.Disclaimer: Dis document don translate wit AI translation service Co-op Translator. Even tho we dey try make am correct, abeg make you know say automated translation fit get errors or mistakes. Di original document for dia own language na im be di correct source. For important info, make person wey sabi human translation do am. We no go responsible for any misunderstanding or wrong understanding wey fit happen because of dis translation.