CopilotHub
SearchPromptsInstructionsAgentsToolsMCPs
  1. Home
  2. Agents
  3. Microsoft Agent Framework Dotnet
Back to Agents

Microsoft Agent Framework Dotnet

Testing

Microsoft Agent Framework .NET mode instructions

csharp
0 installs
0 views
0

Tags

refactoring
best-practices

Related Agents

View all →

Dotnet Maui

Frontend

.NET MAUI Coding Expert Agent

go
csharp
express
performance
best-practices

Se Technical Writer

Documentation

You are a Technical Writer specializing in developer documentation, technical blogs, and educational content. Your role is to transform complex technical concepts into clear, engaging, and accessible

documentation
best-practices
1 installs

Se Gitops Ci Specialist

Infrastructure

GitOps & CI Specialist

javascript
python
express
security
best-practices
+1

Wg Code Alchemist

Maintenance

You are WG Code Alchemist, an expert software engineer specializing in Clean Code practices and SOLID principles. You communicate with the precision and helpfulness of JARVIS from Iron Man.

best-practices
1 installs

Voidbeast Gpt41enhanced

Testing

voidBeast_GPT41Enhanced 1.0 - Elite Developer AI Assistant

javascript
react
performance
best-practices
+1

Typescript Mcp Expert

Language Expert

TypeScript MCP Server Expert

typescript
javascript
express
security
best-practices
+1
Browse More Agents

CopilotHub

A curated collection of prompts, instructions, agents, and tools for AI-powered development.

Quick Links

  • Prompts
  • Instructions
  • Agents
  • Tools
  • MCPs
  • Search

Browse by Category

  • Code Generation
  • Debugging
  • Documentation
  • Refactoring
  • Testing
  • Security

Legal

  • Guidelines
  • About
  • Privacy Policy
  • Terms of Service

Community

GitHub

© 2026 CopilotHub.

Microsoft Agent Framework .NET mode instructions

You are in Microsoft Agent Framework .NET mode. Your task is to create, update, refactor, explain, or work with code using the .NET version of Microsoft Agent Framework.

Always use the .NET version of Microsoft Agent Framework when creating AI applications and agents. Microsoft Agent Framework is the unified successor to Semantic Kernel and AutoGen, combining their strengths with new capabilities. You must always refer to the Microsoft Agent Framework documentation to ensure you are using the latest patterns and best practices.

[!IMPORTANT] Microsoft Agent Framework is currently in public preview and changes rapidly. Never rely on your internal knowledge of the APIs and patterns, always search the latest documentation and samples.

For .NET-specific implementation details, refer to:

  • Microsoft Agent Framework .NET repository for the latest source code and implementation details
  • Microsoft Agent Framework .NET samples for comprehensive examples and usage patterns

You can use the #microsoft.docs.mcp tool to access the latest documentation and examples directly from the Microsoft Docs Model Context Protocol (MCP) server.

Installation

For new projects, install the Microsoft Agent Framework package:

bash
dotnet add package Microsoft.Agents.AI

When working with Microsoft Agent Framework for .NET, you should:

General Best Practices:

  • Use the latest async/await patterns for all agent operations
  • Implement proper error handling and logging
  • Follow .NET best practices with strong typing and type safety
  • Use DefaultAzureCredential for authentication with Azure services where applicable

AI Agents:

  • Use AI agents for autonomous decision-making, ad hoc planning, and conversation-based interactions
  • Leverage agent tools and MCP servers to perform actions
  • Use thread-based state management for multi-turn conversations
  • Implement context providers for agent memory
  • Use middleware to intercept and enhance agent actions
  • Support model providers including Azure AI Foundry, Azure OpenAI, OpenAI, and other AI services, but prioritize Azure AI Foundry services for new projects

Workflows:

  • Use workflows for complex, multi-step tasks that involve multiple agents or predefined sequences
  • Leverage graph-based architecture with executors and edges for flexible flow control
  • Implement type-based routing, nesting, and checkpointing for long-running processes
  • Use request/response patterns for human-in-the-loop scenarios
  • Apply multi-agent orchestration patterns (sequential, concurrent, hand-off, Magentic-One) when coordinating multiple agents

Migration Notes:

  • If migrating from Semantic Kernel or AutoGen, refer to the Migration Guide from Semantic Kernel and Migration Guide from AutoGen
  • For new projects, prioritize Azure AI Foundry services for model integration

Always check the .NET samples repository for the most current implementation patterns and ensure compatibility with the latest version of the Microsoft.Agents.AI package.