All skills
microsoft avatar

/microsoft-foundry

@04110d9
by microsoftmicrosoft/skills3.1k stars
351

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 create, create agent, update agent, add tool to agent, invoke agent, agent.yaml, agent insights, pull agent insights, evaluate agent, batch eval, continuous eval, continuous monitoring, agent CI/CD, optimize prompt, improve prompt, prompt optimizer, optimize agent instructions, Agent Optimizer scaffold, 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).

Use this Skill: https://skilld.dev/gh/microsoft/skills/microsoft-foundry

This session only. Nothing lands on disk.

quotareferencesworkflows.md

≈1.8k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Detailed Workflows: Quota Management

Table of Contents: Workflow 1: View Current Quota Usage · Workflow 2: Find Best Region for Model Deployment · Workflow 3: Check Quota Before Deployment · Workflow 4: Monitor Quota Across Deployments · Quick Command Reference · MCP Tools Reference

Workflow 1: View Current Quota Usage - Detailed Steps

Step 1: Show Regional Quota Summary (REQUIRED APPROACH)

CRITICAL AGENT INSTRUCTION:

  • When showing quota: Query REGIONAL quota summary, NOT individual resources
  • DO NOT run az cognitiveservices account list for quota queries
  • DO NOT filter resources by username or name patterns
  • ONLY check specific resource deployments if user provides resource name
  • Quotas are managed at SUBSCRIPTION + REGION level, NOT per-resource

Show Regional Quota Summary:

# Get subscription ID
subId=$(az account show --query id -o tsv)

# Check quota for key regions
regions=("eastus" "eastus2" "westus" "westus2")
for region in "${regions[@]}"; do
  echo "=== Region: $region ==="
  az rest --method get \
    --url "https://management.azure.com/subscriptions/$subId/providers/Microsoft.CognitiveServices/locations/$region/usages?api-version=2023-05-01" \
    --query "value[?contains(name.value,'OpenAI.Standard')].{Model:name.value, Used:currentValue, Limit:limit, Available:(limit-currentValue)}" \
    --output table
  echo ""
done

Step 2: If User Asks for Specific Resource (ONLY IF EXPLICITLY REQUESTED)

# User must provide resource name
az cognitiveservices account deployment list \
  --name <user-provided-resource-name> \
  --resource-group <user-provided-rg> \
  --query '[].{Name:name, Model:properties.model.name, Capacity:sku.capacity, SKU:sku.name}' \
  --output table

Alternative - Use MCP Tools (Optional Wrappers):

foundry_models_deployments_list(
  resource-group="<rg>",
  azure-ai-services="<resource-name>"
)

Note: MCP tools are convenience wrappers around the same control plane APIs shown above.

Interpreting Results:

  • Used (currentValue): Currently allocated quota
  • Limit: Maximum quota available in region
  • Available: Calculated as limit - currentValue

Workflow 2: Find Best Region for Model Deployment - Detailed Steps

Step 1: Check Single Region

# Get subscription ID
subId=$(az account show --query id -o tsv)

# Check quota for GPT-4o Standard in a specific region
region="eastus"  # Change to your target region
az rest --method get \
  --url "https://management.azure.com/subscriptions/$subId/providers/Microsoft.CognitiveServices/locations/$region/usages?api-version=2023-05-01" \
  --query "value[?name.value=='OpenAI.Standard.gpt-4o'].{Model:name.value, Used:currentValue, Limit:limit, Available:(limit-currentValue)}" \
  -o table

Step 2: Check Multiple Regions (Common Regions)

Check these regions in sequence by changing the region variable:

  • eastus, eastus2 - US East Coast
  • westus, westus2, westus3 - US West Coast
  • swedencentral - Europe (Sweden)
  • canadacentral - Canada
  • uksouth - UK
  • japaneast - Asia Pacific

Alternative - Use MCP Tool:

model_quota_list(region="eastus")

Repeat for each target region.

Key Points:

  • Query returns currentValue (used), limit (max), and calculated Available
  • Standard SKU format: OpenAI.Standard.<model-name>
  • For PTU: OpenAI.ProvisionedManaged.<model-name>
  • Focus on 2-3 regions relevant to your location rather than checking all regions

Workflow 3: Check Quota Before Deployment - Detailed Steps

Steps:

  1. Check current usage (workflow #1)
  2. Calculate available: limit - currentValue
  3. Compare: available >= required_capacity
  4. If insufficient: Use workflow #2 to find region with capacity, or request increase

Workflow 4: Monitor Quota Across Deployments - Detailed Steps

Recommended Approach - Regional Quota Overview:

Show quota by region (better than listing all resources):

subId=$(az account show --query id -o tsv)
regions=("eastus" "eastus2" "westus" "westus2" "swedencentral")

for region in "${regions[@]}"; do
  echo "=== Region: $region ==="
  az rest --method get \
    --url "https://management.azure.com/subscriptions/$subId/providers/Microsoft.CognitiveServices/locations/$region/usages?api-version=2023-05-01" \
    --query "value[?contains(name.value,'OpenAI')].{Model:name.value, Used:currentValue, Limit:limit, Available:(limit-currentValue)}" \
    --output table
  echo ""
done

Alternative - Check Specific Resource:

If user wants to monitor a specific resource, ask for resource name first:

# List deployments for specific resource
az cognitiveservices account deployment list \
  --name <resource-name> \
  --resource-group <rg> \
  --query '[].{Name:name, Model:properties.model.name, Capacity:sku.capacity}' \
  --output table

Note: Don't automatically iterate through all resources in the subscription. Show regional quota summary or ask for specific resource name.

Quick Command Reference

# View quota for specific model using REST API
subId=$(az account show --query id -o tsv)
region="eastus"  # Change to your region
az rest --method get \
  --url "https://management.azure.com/subscriptions/$subId/providers/Microsoft.CognitiveServices/locations/$region/usages?api-version=2023-05-01" \
  --query "value[?contains(name.value,'gpt-4')].{Name:name.value, Used:currentValue, Limit:limit, Available:(limit-currentValue)}" \
  --output table

# List all deployments with capacity
az cognitiveservices account deployment list \
  --name <resource-name> \
  --resource-group <rg> \
  --query '[].{Name:name, Model:properties.model.name, Capacity:sku.capacity}' \
  --output table

# Delete deployment to free quota
az cognitiveservices account deployment delete \
  --name <resource-name> \
  --resource-group <rg> \
  --deployment-name <deployment-name>

MCP Tools Reference (Optional Wrappers)

Note: All quota operations are control plane (management) operations. MCP tools are optional convenience wrappers around Azure CLI commands.

Tool Purpose Equivalent Azure CLI
foundry_models_deployments_list List all deployments with capacity az cognitiveservices account deployment list
model_quota_list List quota and usage across regions az rest (Management API)
model_catalog_list List available models from catalog az rest (Management API)
foundry_resource_get Get resource details and endpoint az cognitiveservices account show

Recommended: Use Azure CLI commands directly for control plane operations.

Source: SKILL.md on GitHub

2 warnings3d4 checks · Risk SAFE
  • Gen Agent Trust Hub3d

    This skill provides a comprehensive environment for managing the end-to-end lifecycle of AI agents, models, and infrastructure on Microsoft Foundry. It includes sub-skills for deployment, evaluation, fine-tuning, and troubleshooting. The skill utilizes dynamic code execution and shell command wrappers, which are used within the context of local development and cloud orchestration. All external resources and dependencies originate from trusted organizations and well-known services.

  • Socket3d

    2 alerts: gptSecurity, gptAnomaly

  • Snyk3d

    Risk: LOW · No issues

  • Runlayer7mo

    36/36 files flagged

Signed by skilld at 04110d9. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 20 hours ago.

Activeupdated last week
metadata
{
  "author": "Microsoft",
  "version": "1.2.26"
}

README badge

README badge for microsoft/skills/microsoft-foundry