agentleFS
MicrosoftKnown publishermicrosoft/Building-AI-Agents-From-Zero-To-Production/.github/skills/hosted-agent-deployment/SKILL.md

hosted-agent-deployment

Skill188 starsChanged 5 months agoMITView on GitHub

Help a learner deploy an agent to production as a Microsoft Foundry Hosted Agent, and decide when Capability Hosts are needed. Use for Lessons 4–5: hosted deployment, thread/memory persistence, bring-your-own storage, and enterprise governance.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Start from lesson-4-agentdeployment/ for the deploy + ChatKit front end, then lesson-5-hosted-agents-production/ for enterprise/BYO-storage …

    line 37
  2. Distinctive:

    Before recommending Capability Hosts, ask whether the learner actually needs customer-owned storage/networking — if not, keep the basic …

    line 39

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Hosted agent deployment

Guidance for taking an agent to production (Lessons 4–5).

Guardrails (always apply)

  • Terminology: Hosted Agents, Capability Hosts, Microsoft Foundry Agent Service.
  • Deploy with the current SDK/Responses API; models gpt-5.1 (chat) / gpt-5-codex (coding).
  • Config and secrets via .env / managed identity — never hardcode endpoints or keys.

The key distinction (teach this clearly)

  • Hosted Agents provide the Microsoft-managed execution environment: compute, scaling, identity, observability and session management. You do not need a Capability Host just to run a Hosted Agent.
  • Capability Hosts are only required when you want Agent Service to use customer-owned resources instead of Microsoft-managed storage.
    • Happy with default Microsoft-managed storage, vector search and conversation persistence? No Capability Host configuration is required.
    • Need data sovereignty, private networking, compliance controls, or storage in your own Azure Cosmos DB, Azure Storage Account and Azure AI Search? Configure Capability Hosts to connect Agent Service to those resources.

Concepts a learner should grasp

  1. Basic vs standard setup: basic = Microsoft-managed; standard = bring-your-own resources via Capability Hosts + connections.
  2. Persistence: hosted agents persist threads and memory server-side (long-running conversations).
  3. Governance: identity, private networking, Hosted MCP approval workflows, cost controls.

How to help

  • Start from lesson-4-agentdeployment/ for the deploy + ChatKit front end, then lesson-5-hosted-agents-production/ for enterprise/BYO-storage and governance.
  • Before recommending Capability Hosts, ask whether the learner actually needs customer-owned storage/networking — if not, keep the basic setup.
  • Remind them of cost & cleanup: delete the resource group when finished.

Validate

  • python -m py_compile on any deploy scripts.
  • CI smoke test: .github/workflows/smoke-test-hosted-agent.yml (workflow_dispatch, OIDC) exercises a deployed hosted agent.

References

  • lesson-4-agentdeployment/README.md, lesson-5-hosted-agents-production/README.md

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.