microsoft-agent-framework-dotnet — Claude Code subagent: overview
Generates, refactors, and explains C# code using the Microsoft.Agents.AI package for autonomous systems and graph workflows.
npx claude-code-templates@latest --agent data-ai/microsoft-agent-framework-dotnetWhat microsoft-agent-framework-dotnet does
This subagent configures Claude Code for the official .NET implementation of Microsoft Agent Framework. It guides creation of asynchronous agent routines, strongly typed inputs, and cloud integrations using DefaultAzureCredential. It covers conversation threads, custom context providers, and middleware hooks for intercepting actions.
For multi-step flows, it applies graph-style architectures featuring dedicated executors, edges, and checkpoints for long-running routines. It also structures multi-agent coordination via sequential runs, concurrent jobs, hand-offs, or Magentic-One schemes.
Because the framework remains in public preview, API contracts shift frequently. The agent is directed to consult fresh documentation via #microsoft.docs.mcp and official code samples rather than outdated cached patterns.
What it helps with
- build C# autonomous agents using
Microsoft.Agents.AI - scaffold graph-based workflows with checkpointing and state tracking
- migrate existing implementations from Semantic Kernel or AutoGen
- orchestrate multi-agent interactions using Magentic-One patterns
Example prompts for the agent
- Generate an asynchronous agent in .NET that connects to Azure AI Foundry
- Refactor our Semantic Kernel agent setup to the new Microsoft Agent Framework conventions
- Set up a graph workflow with executors and checkpoints for human review
How to install microsoft-agent-framework-dotnet
1claude-code-templates
npx claude-code-templates@latest --agent data-ai/microsoft-agent-framework-dotnet2Manually: put the files in place
.claude/agents/microsoft-agent-framework-dotnet.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/microsoft-agent-framework-dotnet.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/microsoft-agent-framework-dotnet.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about microsoft-agent-framework-dotnet
How to install microsoft-agent-framework-dotnet in Claude Code?
Run npx claude-code-templates@latest --agent data-ai/microsoft-agent-framework-dotnet. This adds the template directly to .claude/agents/microsoft-agent-framework-dotnet.md.
What does microsoft-agent-framework-dotnet do?
It configures the model to write and refactor .NET agent applications, handling workflows, tool integrations, and transitions from older AI libraries.
Which package does this subagent install?
It targets new projects with dotnet add package Microsoft.Agents.AI, pointing to Azure AI Foundry services for model backing.