deploying-scalable-agents
Fungsinya
Skill ini memandu pemindahan agent AI dari prototipe ke deployment produksi. Skill ini untuk tim yang ingin agent mereka berjalan andal, dipantau, dan diuji sebelum setiap rilis.
Kapan dipakai
- βSaat Anda ingin men-deploy agent yang sudah bekerja ke Microsoft Foundry sebagai layanan hosted yang diberi versi.
- βSaat Anda memerlukan langkah persetujuan, caching, atau pemeriksaan evaluasi sebelum versi agent baru dirilis.
- βSaat Anda ingin menambahkan tracing dan pemantauan untuk agent yang berjalan di produksi.
Link skill
https://github.com/microsoft/ai-agents-for-beginners/blob/main/.agents/skills/deploying-scalable-agents/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βBantu saya mengambil prototipe agent saya dan men-deploy-nya ke Microsoft Foundry dengan pemantauan.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent meninjau prototipe Anda dan menyarankan pola deployment. Setelah itu agent menambahkan bagian seperti perutean model, langkah persetujuan, pemantauan, dan smoke test setelah deployment.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
Pertanyaan umum
Opsi deployment apa saja yang dibahas?
Skill mencakup agent yang di-host klien, agent hosted, dan alur kerja agent.
Bagaimana skill membantu mengendalikan biaya?
Skill membahas perutean model, caching respons, dan batas jumlah permintaan yang berjalan bersamaan.
Apakah ia menambahkan persetujuan manusia?
Ya. Skill mencakup langkah persetujuan untuk tindakan berisiko tinggi.
Detail
Deskripsi asli dari pembuat
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
Popularitas
- Bintang GitHub
- 79k
- Peringkat
- #1724
- Lisensi
- MIT
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
azure-openai-to-responses
79kMembantu agent Anda memindahkan aplikasi Python dari Azure OpenAI Chat Completions ke Responses API yang lebih baru, langkah demi langkah.
jupyter-notebook
79kMembantu agent Anda membuat atau merapikan notebook Jupyter untuk eksperimen atau tutorial langkah demi langkah, dengan memakai templat siap pakai.
local-ai-agents
79kMengajari agent Anda membangun asisten AI yang berjalan sepenuhnya di komputer sendiri dengan model dan alat lokal, tanpa perlu cloud.
Skill serupa
add-model-provider
394kMemungkinkan agent Anda menghubungkan penyedia model AI baru ke OpenClaw dengan perintah pengaturan yang aman, menjaga kunci API tetap di luar teks biasa, dan menjalankan uji langsung.
acp-router
394kMembantu agent Anda mengirim tugas ke asisten pemrograman seperti Claude Code atau Cursor lewat OpenClaw, sehingga pekerjaan dijalankan di alat tersebut.
browser-automation
394kMengajari agent Anda mengendalikan halaman web langkah demi langkah, termasuk login, tab, dan pemulihan saat halaman berhenti merespons.