AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

microsoft-foundry

Build, deploy, evaluate, optimize, fine-tune, and manage Microsoft Foundry agents, models, and resources end to end. USE FOR: foundry, azd ai agent, azd provision/deploy, hosted agent scaffold/develop/run/deploy/troubleshoot, prompt agent, managed harness agent, Copilot harness, voice agent, create/update/invoke/evaluate agent, add tool to agent, agent insights, batch/continuous eval, continuous monitoring, agent CI/CD, optimize/improve prompt, optimize agent instructions, Agent Optimizer, dataset curation from traces, deploy model, model fine-tuning (SFT/DPO/RFT), Foundry project, RBAC, role assignment, permissions, quota, capacity, region, deployment failure, AI Services, create Foundry resource, knowledge index, customize deployment, onboard, availability, training-data, grader, distillation, large file upload. DO NOT USE FOR: Azure Functions, App Service, general Azure deploy (use azure-deploy), general Azure prep (use azure-prepare).

Original source
microsoft
License
MIT
Pinned revision
3f5b461b2314e01c400564051e92469114c5b68f

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

This skill also requires local files or dependencies. Remote reading alone may not be enough.

Ask your assistant

Use Agentic Memory skills to read microsoft--microsoft-foundry at revision 3f5b461b2314e01c400564051e92469114c5b68f, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 151

foundry-agent/create/references/re-host.md

Re-host an Existing Agent from other platforms

Step 1: Collect information

Resolve two independent choices before initialization or edits:

  1. Model -- keep the existing model or use a Foundry model.
  2. Agent framework -- keep the existing framework or migrate it.

Infer these choices from the user's request and current code. Ask only for information that remains unclear; skip questions when the intent is explicit or evident, such as an existing Foundry model integration. Do not switch or deploy a model, or migrate the framework, without user intent.

Step 2: Initialize and adapt

To scaffold a Foundry agent project with existing agent codes, run:

azd ai agent init --no-prompt \
  --src ./src/my-agent \
  --agent-name my-agent \
  --deploy-mode code \
  --runtime python_3_13 \
  --entry-point <entry-point>

Use --deploy-mode code by default. --runtime and --entry-point are required with --deploy-mode code --no-prompt. Use the existing executable entry point, or a new adapter file only when one is intentionally added. Runtimes: python_3_13, python_3_14, dotnet_10. --deploy-mode container builds from Dockerfile. For an existing Foundry project, add --project-id "<resourceId>".

After scaffolding, you must use azd ai agent sample list --language <language> --output json and follow the azd Sample Selection Guidance to find the closest relevant samples for adapter, protocol, and deployment guidance. Treat samples as boundary patterns, not replacement applications. Browse the relevant samples as code references.

For reference, here are some awesome samples for re-hosting scenarios:

  1. Re-host agents built with the OpenAI Agents SDK: https://github.com/microsoft-foundry/foundry-samples/tree/main/samples/python/hosted-agents/bring-your-own/responses/openai-agents-sdk
  2. Re-host agents built with the Claude Agent SDK: https://github.com/microsoft-foundry/foundry-samples/tree/main/samples/python/hosted-agents/bring-your-own/invocations/claude-agent-sdk

If users use a Foundry model, you must wire the Foundry model to the agent.

Set startupCommand in azure.yaml.

Once the agent is configured as a Foundry hosted agent, make the requested changes, return to create-hosted, and continue with Step 5.

Step 3: Set azd env

azd env set AZURE_SUBSCRIPTION_ID "<id>"
azd env set AZURE_LOCATION "<region>"
azd env set AZURE_AI_MODEL_DEPLOYMENT_NAME "<model name>"

Foundry Model Reference

Read Foundry Model Reference and follow the steps in it when you want to query model related data.