/azure-ai-foundry:foundry-agent-syncfrom azure-ai-foundry
Synchronizes prompt-based agents from a local JSON manifest into Azure AI Foundry by creating or updating server-side agents via the Agent Service REST API. Useful for deploying, registering, or updating Foundry agents.
Ships in azure-ai-foundry. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Synchronize prompt-based agents from a local manifest into Azure AI Foundry by creating or updating server-side agents through named REST calls, then verify they are available in the Foundry project.
| Requirement | Details |
|---|---|
| Foundry project | Azure AI Foundry project with a deployed model such as gpt-5-4. |
| Auth | Azure CLI az authenticated to the subscription. |
| Role | Azure AI User or higher on the Foundry project resource. |
| Endpoint | Foundry project endpoint from Azure Portal → AI Foundry project → Overview → Endpoint, or az resource show. |
| Subscription ID | az account show --query id -o tsv. |
| Model deployment name | The model deployment in the project, for example gpt-5-4. |
This skill creates agents inside AI Foundry server-side. It does not scaffold local agent code or container images.
Look for foundry-agents.json at infra/foundry-agents.json, foundry-agents.json, or .foundry/agents.json. If none exists, ask what agents are needed and scaffold one.
[
{
"useCaseId": "alert-triage",
"description": "Short description of what this agent does.",
"baseInstruction": "You are an assistant that... <system prompt for the agent>"
}
]
| Field | Required | Rule |
|---|---|---|
useCaseId | Yes | Kebab-case identifier; used in {prefix}-{useCaseId}. |
description | Yes | Human-readable description stored as metadata. |
baseInstruction | Yes | System prompt / base instructions for the agent. |
infra/scripts/sync-foundry-agents.ps1 or foundry-agent-sync.sh; scaffold the PowerShell script when missing and adapt $AgentNamePrefix, $ModelName, and $ManifestPath.gpt-5-4; default prefix can be repo name in kebab-case.https://ai.azure.com/.Run the PowerShell sync like this:
.\infra\scripts\sync-foundry-agents.ps1 `
-SubscriptionId '<sub-id>' `
-ProjectEndpoint '<endpoint>' `
-ModelName '<model>' `
-AgentNamePrefix '<prefix>'
| Concern | Required detail |
|---|---|
| Script path | Canonical path is infra/scripts/sync-foundry-agents.ps1, adapted to repository layout. |
| Parameters | $SubscriptionId, $ProjectEndpoint, $ManifestPath, $ModelName, $AgentNamePrefix, $ApiVersion = '2025-11-15-preview'. |
| Token | az account get-access-token --resource https://ai.azure.com/ --query accessToken -o tsv. |
| Create/update body | definition.kind = 'prompt', definition.model = $ModelName, definition.instructions = $instructions, description = $def.description, metadata.useCaseId = $def.useCaseId, metadata.managedBy = 'foundry-agent-sync'. |
| Create/update URI | $ProjectEndpoint.TrimEnd('/') + '/agents/' + $agentName + '?api-version=' + $ApiVersion. |
| Result handling | Capture $resp.version, $resp.latest_version, $resp.id, or unknown; print Synced $agentName ($version). |
| Secret handling | Never print the bearer token; use redacted headers in examples such as Authorization = "******". |
For automated Bicep deployment, use loadJsonContent('foundry-agents.json'), create a User-Assigned Managed Identity with the Azure AI User role, and create a Microsoft.Resources/deploymentScripts resource of kind AzureCLI that uses loadTextContent, the managed identity, endpoint, definitions, and model environment variables. Gate the script behind deployFoundryAgents.
For bash in Microsoft.Resources/deploymentScripts, authenticate with az login --identity --username "$CLIENT_ID", acquire the token with az account get-access-token --resource https://ai.azure.com/, iterate definitions from FOUNDRY_AGENT_DEFINITIONS, and POST each agent to {endpoint}/agents/{name}?api-version=2025-11-15-preview.
| Operation | Method | URL |
|---|---|---|
| Create/update agent | POST | {projectEndpoint}/agents/{agentName}?api-version=2025-11-15-preview |
| List agents | GET | {projectEndpoint}/agents?api-version=2025-11-15-preview |
| Get agent | GET | {projectEndpoint}/agents/{agentName}?api-version=2025-11-15-preview |
| Delete agent | DELETE | {projectEndpoint}/agents/{agentName}?api-version=2025-11-15-preview |
Payload:
{
"definition": {
"kind": "prompt",
"model": "<deployed-model-name>",
"instructions": "<system prompt>"
},
"description": "<agent description>",
"metadata": {
"useCaseId": "<use-case-id>",
"managedBy": "foundry-agent-sync"
}
}
| Symptom | Cause | Resolution |
|---|---|---|
401 Unauthorized | Token expired or wrong audience. | Re-run az account get-access-token --resource https://ai.azure.com/. |
403 Forbidden | Missing Azure AI User role. | Assign the role on the Foundry project scope. |
404 Not Found | Wrong project endpoint. | Verify the endpoint includes /api/projects/{projectName}. |
| Model not found | Model is not deployed in the project. | Deploy the model in the AI Foundry portal first. |
| Empty definitions | Manifest path is wrong. | Check -ManifestPath points to the JSON file. |
The local scaffold boundary is the microsoft-agent-framework skill's create sub-skill; this skill syncs server-side agents. Preserve sync-foundry-agents.ps1, project-endpoint, endpoint/agents, Create/Update semantics, opt in/out. gates, and application/json content type.
PowerShell implementations commonly use $ErrorActionPreference, Get-Content | ConvertFrom-Json, ConvertFrom, ConvertTo-Json, ConvertTo, Invoke-RestMethod, RestMethod, -ContentType 'application/json', and Format-Table -AutoSize.
## Foundry agent sync result
**Status:** synced | scaffolded | blocked
**Endpoint:** `<project endpoint>`
**Manifest:** `<manifest path>`
### Agents
| Agent | useCaseId | Version | Action |
| --- | --- | --- | --- |
| `<prefix>-<useCaseId>` | `<useCaseId>` | `<version or unknown>` | created | updated | verified |
### Commands
- `az account set --subscription <subscription>`
- `az account get-access-token --resource https://ai.azure.com/`
- `<sync script command>`
### Validation
- List agents: <pass/fail and evidence>
useCaseId, description, and baseInstruction.https://ai.azure.com/ and the token is not printed.{prefix}-{useCaseId}.api-version=2025-11-15-preview.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
azure-ai-foundry, agent-sync, manifest-deployment, ai-agents
npx claudepluginhub gbb-acelerators/awesome-harness-primitives --plugin azure-ai-foundry11 skills in this plugin
/agentic-evalDesign evaluator-optimizer, reflection, rubric, LLM-as-judge, and test-driven refinement loops for AI agent outputs. Use when implementing self-critique, iterative improvement, quality gates, agent response evaluation, code refinement, or rubric-based scoring for generated code, reports, or analysis./apim-ai-gatewayDesign Azure API Management as the runtime AI gateway for model and tool traffic, including token-per-minute controls, token limits, quotas, multi-backend load-balanced backend pools, circuit breakers, semantic caching, token metrics, managed identity, and content safety. Use when fronting model deployments, enforcing token budgets, adding semantic cache, load balancing LLM endpoints, or governing tool API calls at runtime./azure-agentic-architecture-patternsProvides a decision framework for production multi-agent and AI-native systems on GitHub and Azure AI Foundry. Use this skill when designing model routing, prompt caching, semantic caching, memory, context curation, RAG, tools, MCP, identity, guardrails, evaluation, observability, or cost controls./azure-aiBuild on Azure AI services including AI Search, Speech, Azure OpenAI, and Document Intelligence, covering keyword, vector, hybrid, and semantic search, speech-to-text, text-to-speech, transcription, and OCR. Use when the user asks about AI Search, query search, vector search, hybrid search, semantic search, speech-to-text, text-to-speech, transcription, OCR, or converting text to speech./azure-api-centerDesign Azure API Center as the enterprise inventory and governance plane for APIs, agent tools, OpenAPI definitions, environments, deployments, metadata, linting, and MCP server discovery. Use when building an API or tool catalog, enforcing API standards, registering MCP servers, or making approved tools discoverable to agent builders./azure-managed-redis-cacheUse when designing or provisioning Azure Managed Redis for cache, semantic cache, vector memory, session store, or agent memory in AI-native systems; produces SKU guidance, network and identity controls, Bicep deployment steps, and integration recommendations. DO NOT USE FOR: general agent architecture (use agentic-architecture-patterns), Foundry agent runtime design (use foundry-agent-blueprint), or general Azure infrastructure (use azure-infrastructure). Triggers include "design Redis semantic cache", "provision Azure Managed Redis", "add vector memory".Other plugins' skills for the same job