Last updated: October 29, 2026
The Microsoft Copilot harness, opened to developers on October 28, 2026, is the agent runtime behind GitHub Copilot and other Microsoft Copilot products. It is now a public preview option for prompt agents in Microsoft Foundry Agent Service, where Microsoft runs the agent loop and sandbox while you supply instructions, skills, tools and the model.
Microsoft says the same harness powers Copilot Studio, the GitHub Copilot app, the Copilot CLI and VS Code, and supports more than 20 frontier models plus bring your own key across those surfaces (Official Microsoft Blog announcement). This guide covers what the Foundry preview includes, how to set it up, and the limits to plan around.
Contents
- What’s new
- Which Foundry agent type to choose
- How to create a harness agent
- Harness tools and skills
- Regions and preview limits
- Pricing
- Frequently asked questions
What’s new in the Microsoft Copilot harness
A harness is everything around the model: instructions, context, the execution environment, tool calls and controls. Microsoft describes the Copilot harness as GitHub’s multi-model harness, adopted company-wide and recently ported to Rust to cut session overhead and time to first token.
According to the Microsoft Foundry Blog post, the Foundry public preview brings four building blocks:
- Reusable skills: package instructions, scripts and supporting files into procedures an agent can apply across tasks.
- Connected tools: attach supported Foundry and Model Context Protocol (MCP) tools with explicit authentication and approvals.
- Execution and delegation: let agents work with files and code, and hand bounded tasks to built-in subagents.
- Source-controlled agent definitions: build in the Foundry portal or keep the definition in your repository next to application code.
Microsoft also announced general availability of long-running resilience for hosted agents the same week. Foundry detects interruptions and restarts work with its original input, while your code saves checkpoints so the agent can resume.
For GitHub’s own multi-model routing feature built on the same foundation, see our GitHub Copilot Fusion power-user guide.
Which Foundry agent type to choose
Foundry now offers three levels of control. This table summarizes Microsoft’s guidance:
| Approach | Choose it when | Who runs the loop | Status |
|---|---|---|---|
| Prompt agent, default runtime | Instructions and supported tools are enough | Microsoft | Existing option |
| Prompt agent with Copilot harness | You want skills, files, shell, subagents and multi-step tool work without owning the runtime | Microsoft (agent loop and sandbox) | Public preview |
| Hosted agent | You need your own framework, agent loop, middleware or dependencies | You, with Foundry-managed hosting | Long-running resilience is GA |
The harness does not change the resource type. It remains a prompt agent, and applications still call it through the Responses API with Foundry roles, agent identity and policies controlling access.
How to create a Copilot harness agent
Microsoft’s Copilot harness how-to on Microsoft Learn lists the prerequisites and steps. The command-line path with the Azure Developer CLI (azd) looks like this:
- Pick a supported region and model. Use a Foundry project in a harness region and a model that supports reasoning and tool calling.
- Check roles and tooling. You need the Foundry User role on the project, azd 1.37.0 or later, and the azure.ai.agents extension 1.0.0-beta.22 or later.
- Turn on the preview flag in each shell or CI job:
export AZD_ALPHA_ENABLE_AGENTS_MANAGED_HARNESS=true. - Initialize a new prompt agent with
azd ai agent init, using--kind promptand your model. - Select the harness by adding
harness: type: microsoft_copilot_previewto the agent service inazure.yaml. - Deploy and verify with
azd up, then runazd ai agent show --output jsonand confirmkind: promptand the harness type. - Invoke it with
azd ai agent invoke --new-conversationor the Responses API.
services:
my-agent:
host: azure.ai.agent
kind: prompt
harness:
type: microsoft_copilot_preview
model: ${MODEL_DEPLOYMENT_NAME}
skills:
- research-brief-skill
tools:
- type: web_search
name: public-research
In the portal, open a project with the New Foundry toggle on, choose Create an agent, and select Use the Microsoft Copilot harness. Python users can instead pass harness=MicrosoftCopilotHarness() in a PromptAgentDefinition with azure-ai-projects 2.9.0 or later.
Every request must include a conversation. Omit store or set it to true, and continue a thread by sending the next response in the same conversation rather than using previous_response_id.
Harness tools, skills and prompt patterns
New harness agents get five built-in tools, all on by default: file system read, file system write, shell, web fetch and subagents. You can turn them off in the portal or with one microsoft_copilot_toolset_preview block in azure.yaml.
tools:
- type: microsoft_copilot_toolset_preview
defaultConfig:
enabled: false
configs:
- name: filesystem_read
enabled: true
- name: web
enabled: true
Practical patterns for power users:
- Allow-list rather than block-list. Microsoft warns that shell is the broadest tool, so disabling file or web tools while leaving shell on is not a strict security boundary.
- Put method in skills, goals in instructions. Microsoft’s example keeps the research procedure in a
SKILL.mdfile and uses short agent instructions that point to it. - Separate search from fetch. Foundry web search finds pages without a project connection; the web harness tool only fetches a given URL.
- Save outputs durably. Each conversation gets its own workspace, but Microsoft says to store important results in Foundry Files or another durable service.
Skills follow the same SKILL.md pattern used by other agent tools; compare our Claude Code power-user guide and our Cursor Agent SDK guide.
Regions and preview limits
Microsoft’s Foundry limits, quotas and regions page lists these preview constraints:
- Regions: Australia East, Canada Central, Central US, Germany West Central, Japan East, Sweden Central, UK South, West Europe and West US.
- Skills: up to 50 top-level skill references, with lowercase names of at most 64 characters.
- Not supported: bring your own model, Foundry Memory,
strict: truefunction schemas, audio input, WebSocket requests and deleting individual responses. - Harness-managed settings: do not send
temperature,top_p,tool_choice,max_output_tokens,parallel_tool_callsorservice_tier. - Fixed runtime: sandbox CPU, memory and lifecycle settings are managed by Foundry and not configurable.
Microsoft Copilot harness pricing
Harness runtime usage is free until December 1, 2026. After that, Microsoft lists consumption pricing for the sandbox, which may vary by region and agreement (Microsoft Foundry Blog):
- Sandbox compute: $0.0994 per vCPU-hour.
- Sandbox memory: $0.0118 per GiB-hour.
- Model inference and separately billed tools: charged at their normal rates, before and after December 1.
If you want the same agent runtime inside your own app instead of Foundry, the open source GitHub Copilot SDK offers packages for Python, TypeScript, Go, .NET, Java and Rust and supports bring your own key from providers such as OpenAI, Microsoft Foundry and Anthropic.
For model choices you might deploy behind the harness, see our GPT-6.1 Terra guide and Mistral Large 4 guide.
Frequently asked questions
What is the Microsoft Copilot harness?
It is the agent runtime that GitHub built and Microsoft now uses across Copilot products. It handles the agent loop, context, tools, files and sandbox around a model. Since October 28, 2026, developers can use it for prompt agents in Microsoft Foundry Agent Service.
Is the Copilot harness in Foundry generally available?
No. The Copilot harness in Foundry Agent Service is in public preview, which Microsoft says comes without a service-level agreement and is not recommended for production workloads. Long-running resilience for hosted agents is generally available.
How much does the Microsoft Copilot harness cost?
Harness runtime usage is free until December 1, 2026. From that date, sandbox compute is billed at $0.0994 per vCPU-hour and memory at $0.0118 per GiB-hour. Model inference and separately billed tools are charged as usual.
Can I add the Copilot harness to an existing Foundry agent?
No. During the initial public preview you select the harness only when you create a new prompt agent. Existing agents are unchanged, and switching an agent’s harness after creation is not supported yet.
Which models work with the Copilot harness?
Microsoft requires a model that supports reasoning and tool calling and is available to prompt agents in your project region. Bring your own model (BYOM) is not supported with the harness during the preview.
How is the Copilot harness different from the GitHub Copilot SDK?
The Foundry harness is a managed cloud runtime where Microsoft runs the agent loop and sandbox. The open source GitHub Copilot SDK lets you embed Copilot’s agent workflows in your own app, in Python, TypeScript, Go, .NET, Java or Rust, and supports bring your own key.
Sources
- Official Microsoft Blog: Introducing the Microsoft Copilot harness (October 28, 2026)
- Microsoft Foundry Blog: Introducing the Microsoft Copilot harness in Foundry Agent Service
- Microsoft Learn: Use the Microsoft Copilot harness with prompt agents
- Microsoft Learn: Foundry Agent Service limits, quotas and regions
- GitHub: github/copilot-sdk repository
Image: Microsoft logo, public domain, via Wikimedia Commons. Microsoft is a trademark of Microsoft Corporation.