Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Builds .NET AI agents, harnesses, and multi-agent workflows with Microsoft Agent Framework, covering sessions, tools, and hosting.
36% 95%+59 ptsof test cases passed
Passed 21 of 22 test cases with the skill, and 8 of 22 without it.
3 of 3 safety checks passed
Use this reference when a .NET task needs the packaged long-running agent runtime rather than a narrow AIAgent or an explicit Workflow.
Official source: Agent harnesses
The core HarnessAgent and AsHarnessAgent APIs graduated in dotnet-1.14.0, but the Microsoft.Agents.AI.Harness package remains prerelease and advanced options can remain experimental. Pin and review the package version instead of treating every Harness capability as production-stable.
Choose HarnessAgent when the same agent needs several of these capabilities together:
Use a normal ChatClientAgent when one agent with a few tools is enough. Use a typed Workflow when execution order, branches, checkpoints, or human requests must stay explicit and testable.
dotnet add package Microsoft.Agents.AI.Harness --prerelease
Create the harness from any IChatClient and keep the session across turns:
using Microsoft.Agents.AI;
using Microsoft.Extensions.AI;
AIAgent agent = chatClient.AsHarnessAgent(new HarnessAgentOptions
{
Name = "repository-maintainer",
MaxContextWindowTokens = 128_000,
MaxOutputTokens = 16_384,
DisableWebSearch = true,
Next to this one in the catalogue, plus more from the same author.