Subchapter 53.30
foundry-agent/create/references/managed-harness-agent.mdMarkdown4 KBView on GitHub
A Microsoft Foundry Managed Harness Agent is a Prompt Agent configured with the Foundry-managed Copilot harness. This skill uses azd to author and deploy it:
services:
assistant:
host: azure.ai.agent
kind: prompt
name: assistant
model: gpt-5-mini
instructions: Help the user.
harness:
type: microsoft_copilot_previewUse REST field names, normally snake_case, inside tools[]. azd strictly validates the harness and Copilot toolset; most other nested tool fields pass through to Foundry.
microsoft_copilot_preview and, when declared, microsoft_copilot_toolset_preview.github_copilot_preview and github_copilot_toolset_preview values remain accepted.defaultConfig in azure.yaml; azd translates it to REST default_config only at the API boundary.Foundry-Features: MicrosoftCopilot=V1Preview. Do not retry with the legacy GitHubCopilot=V1Preview header.Prefer direct tool definitions unless the user explicitly requests a Toolbox:
tools:
- type: web_search
- type: code_interpreterRead Managed Harness Agent Tools for the supported tools, required fields, connections, and per-tool authoring references.
A Managed Harness Agent prefers direct tools. When the user explicitly requests a Toolbox, manage it separately with azd ai toolbox, create or reuse a matching authenticated project connection, then attach its exact versioned MCP endpoint as a direct tool:
tools:
- type: mcp
server_label: research-tools
server_url: https://<account>.services.ai.azure.com/api/projects/<project>/toolboxes/<toolbox>/versions/<version>/mcp?api-version=v1
project_connection_id: <toolbox-connection>
require_approval: alwaysThe connection must be RemoteTool with UserEntraToken, audience https://ai.azure.com, and target exactly equal to server_url. See Toolbox for creation, reuse, metadata, and validation. Do not use connectionless Toolbox MCP.
Create and version Skills separately with azd ai skill. Reference an existing Foundry Skill by name and immutable version:
skills:
- name: issue-triage
version: "3"For a local Skill, upload it first:
azd ai skill create issue-triage \
--file ./skills/issue-triage/ \
--project-endpoint "<project-endpoint>" \
--output jsonUse the returned version in azure.yaml. For updates, run azd ai skill update and replace the pinned version.
Do not declare host: azure.ai.skill in this phase: that would make azd deploy manage the Skill lifecycle.
After deploy, read the published definition and verify:
kind remains prompt.microsoft_copilot_preview; existing definitions retain their authored Copilot harness discriminator.project_connection_id remain in the direct mcp tool.name and version.Managed Harness Agents, ordinary Prompt Agents, and Hosted Agents are not converted in place.