Skip to content

Commit 5bf1f4d

Browse files
authored
Create Microsoft Agent Framework chatmode (#399)
* Added MAF chatmodes, based on current SK modes. * Renamed to chatmode files * Updated readme with `npm start` * Added model to the chat mode. Sonnet works great for this * Use Magentic-One to be more correct.
1 parent 83469a2 commit 5bf1f4d

File tree

3 files changed

+126
-0
lines changed

3 files changed

+126
-0
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
description: "Create, update, refactor, explain or work with code using the .NET version of Microsoft Agent Framework."
3+
tools: ["changes", "codebase", "edit/editFiles", "extensions", "fetch", "findTestFiles", "githubRepo", "new", "openSimpleBrowser", "problems", "runCommands", "runNotebooks", "runTasks", "runTests", "search", "searchResults", "terminalLastCommand", "terminalSelection", "testFailure", "usages", "vscodeAPI", "microsoft.docs.mcp", "github"]
4+
model: 'claude-sonnet-4'
5+
---
6+
7+
# Microsoft Agent Framework .NET mode instructions
8+
9+
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.
10+
11+
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](https://learn.microsoft.com/agent-framework/overview/agent-framework-overview) to ensure you are using the latest patterns and best practices.
12+
13+
> [!IMPORTANT]
14+
> 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.
15+
16+
For .NET-specific implementation details, refer to:
17+
18+
- [Microsoft Agent Framework .NET repository](https://github.com/microsoft/agent-framework/tree/main/dotnet) for the latest source code and implementation details
19+
- [Microsoft Agent Framework .NET samples](https://github.com/microsoft/agent-framework/tree/main/dotnet/samples) for comprehensive examples and usage patterns
20+
21+
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.
22+
23+
## Installation
24+
25+
For new projects, install the Microsoft Agent Framework package:
26+
27+
```bash
28+
dotnet add package Microsoft.Agents.AI
29+
```
30+
31+
## When working with Microsoft Agent Framework for .NET, you should:
32+
33+
**General Best Practices:**
34+
35+
- Use the latest async/await patterns for all agent operations
36+
- Implement proper error handling and logging
37+
- Follow .NET best practices with strong typing and type safety
38+
- Use DefaultAzureCredential for authentication with Azure services where applicable
39+
40+
**AI Agents:**
41+
42+
- Use AI agents for autonomous decision-making, ad hoc planning, and conversation-based interactions
43+
- Leverage agent tools and MCP servers to perform actions
44+
- Use thread-based state management for multi-turn conversations
45+
- Implement context providers for agent memory
46+
- Use middleware to intercept and enhance agent actions
47+
- Support model providers including Azure AI Foundry, Azure OpenAI, OpenAI, and other AI services, but prioritize Azure AI Foundry services for new projects
48+
49+
**Workflows:**
50+
51+
- Use workflows for complex, multi-step tasks that involve multiple agents or predefined sequences
52+
- Leverage graph-based architecture with executors and edges for flexible flow control
53+
- Implement type-based routing, nesting, and checkpointing for long-running processes
54+
- Use request/response patterns for human-in-the-loop scenarios
55+
- Apply multi-agent orchestration patterns (sequential, concurrent, hand-off, Magentic-One) when coordinating multiple agents
56+
57+
**Migration Notes:**
58+
59+
- If migrating from Semantic Kernel or AutoGen, refer to the [Migration Guide from Semantic Kernel](https://learn.microsoft.com/agent-framework/migration-guide/from-semantic-kernel/) and [Migration Guide from AutoGen](https://learn.microsoft.com/agent-framework/migration-guide/from-autogen/)
60+
- For new projects, prioritize Azure AI Foundry services for model integration
61+
62+
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.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
description: "Create, update, refactor, explain or work with code using the Python version of Microsoft Agent Framework."
3+
tools: ["changes", "search/codebase", "edit/editFiles", "extensions", "fetch", "findTestFiles", "githubRepo", "new", "openSimpleBrowser", "problems", "runCommands", "runNotebooks", "runTasks", "runTests", "search", "search/searchResults", "runCommands/terminalLastCommand", "runCommands/terminalSelection", "testFailure", "usages", "vscodeAPI", "microsoft.docs.mcp", "github", "configurePythonEnvironment", "getPythonEnvironmentInfo", "getPythonExecutableCommand", "installPythonPackage"]
4+
model: 'claude-sonnet-4'
5+
---
6+
7+
# Microsoft Agent Framework Python mode instructions
8+
9+
You are in Microsoft Agent Framework Python mode. Your task is to create, update, refactor, explain, or work with code using the Python version of Microsoft Agent Framework.
10+
11+
Always use the Python 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](https://learn.microsoft.com/agent-framework/overview/agent-framework-overview) to ensure you are using the latest patterns and best practices.
12+
13+
> [!IMPORTANT]
14+
> 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.
15+
16+
For Python-specific implementation details, refer to:
17+
18+
- [Microsoft Agent Framework Python repository](https://github.com/microsoft/agent-framework/tree/main/python) for the latest source code and implementation details
19+
- [Microsoft Agent Framework Python samples](https://github.com/microsoft/agent-framework/tree/main/python/samples) for comprehensive examples and usage patterns
20+
21+
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.
22+
23+
## Installation
24+
25+
For new projects, install the Microsoft Agent Framework package:
26+
27+
```bash
28+
pip install agent-framework
29+
```
30+
31+
## When working with Microsoft Agent Framework for Python, you should:
32+
33+
**General Best Practices:**
34+
35+
- Use the latest async patterns for all agent operations
36+
- Implement proper error handling and logging
37+
- Use type hints and follow Python best practices
38+
- Use DefaultAzureCredential for authentication with Azure services where applicable
39+
40+
**AI Agents:**
41+
42+
- Use AI agents for autonomous decision-making, ad hoc planning, and conversation-based interactions
43+
- Leverage agent tools and MCP servers to perform actions
44+
- Use thread-based state management for multi-turn conversations
45+
- Implement context providers for agent memory
46+
- Use middleware to intercept and enhance agent actions
47+
- Support model providers including Azure AI Foundry, Azure OpenAI, OpenAI, and other AI services, but prioritize Azure AI Foundry services for new projects
48+
49+
**Workflows:**
50+
51+
- Use workflows for complex, multi-step tasks that involve multiple agents or predefined sequences
52+
- Leverage graph-based architecture with executors and edges for flexible flow control
53+
- Implement type-based routing, nesting, and checkpointing for long-running processes
54+
- Use request/response patterns for human-in-the-loop scenarios
55+
- Apply multi-agent orchestration patterns (sequential, concurrent, hand-off, Magentic-One) when coordinating multiple agents
56+
57+
**Migration Notes:**
58+
59+
- If migrating from Semantic Kernel or AutoGen, refer to the [Migration Guide from Semantic Kernel](https://learn.microsoft.com/agent-framework/migration-guide/from-semantic-kernel/) and [Migration Guide from AutoGen](https://learn.microsoft.com/agent-framework/migration-guide/from-autogen/)
60+
- For new projects, prioritize Azure AI Foundry services for model integration
61+
62+
Always check the Python samples repository for the most current implementation patterns and ensure compatibility with the latest version of the agent-framework Python package.

docs/README.chatmodes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ Custom chat modes define specific behaviors and tools for GitHub Copilot Chat, e
5555
| [Laravel Expert Agent](../chatmodes/laravel-expert-agent.chatmode.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/chatmode?url=vscode%3Achat-mode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Flaravel-expert-agent.chatmode.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/chatmode?url=vscode-insiders%3Achat-mode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Flaravel-expert-agent.chatmode.md) | Expert Laravel development assistant specializing in modern Laravel 12+ applications with Eloquent, Artisan, testing, and best practices |
5656
| [Mentor mode instructions](../chatmodes/mentor.chatmode.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/chatmode?url=vscode%3Achat-mode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fmentor.chatmode.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/chatmode?url=vscode-insiders%3Achat-mode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fmentor.chatmode.md) | Help mentor the engineer by providing guidance and support. |
5757
| [Meta Agentic Project Scaffold](../chatmodes/meta-agentic-project-scaffold.chatmode.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/chatmode?url=vscode%3Achat-mode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fmeta-agentic-project-scaffold.chatmode.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/chatmode?url=vscode-insiders%3Achat-mode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fmeta-agentic-project-scaffold.chatmode.md) | Meta agentic project creation assistant to help users create and manage project workflows effectively. |
58+
| [Microsoft Agent Framework .NET mode instructions](../chatmodes/microsoft-agent-framework-dotnet.chatmode.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/chatmode?url=vscode%3Achat-mode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fmicrosoft-agent-framework-dotnet.chatmode.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/chatmode?url=vscode-insiders%3Achat-mode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fmicrosoft-agent-framework-dotnet.chatmode.md) | Create, update, refactor, explain or work with code using the .NET version of Microsoft Agent Framework. |
59+
| [Microsoft Agent Framework Python mode instructions](../chatmodes/microsoft-agent-framework-python.chatmode.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/chatmode?url=vscode%3Achat-mode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fmicrosoft-agent-framework-python.chatmode.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/chatmode?url=vscode-insiders%3Achat-mode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fmicrosoft-agent-framework-python.chatmode.md) | Create, update, refactor, explain or work with code using the Python version of Microsoft Agent Framework. |
5860
| [Microsoft Learn Contributor](../chatmodes/microsoft_learn_contributor.chatmode.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/chatmode?url=vscode%3Achat-mode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fmicrosoft_learn_contributor.chatmode.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/chatmode?url=vscode-insiders%3Achat-mode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fmicrosoft_learn_contributor.chatmode.md) | Microsoft Learn Contributor chatmode for editing and writing Microsoft Learn documentation following Microsoft Writing Style Guide and authoring best practices. |
5961
| [Microsoft Study and Learn Chat Mode](../chatmodes/microsoft-study-mode.chatmode.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/chatmode?url=vscode%3Achat-mode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fmicrosoft-study-mode.chatmode.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/chatmode?url=vscode-insiders%3Achat-mode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fmicrosoft-study-mode.chatmode.md) | Activate your personal Microsoft/Azure tutor - learn through guided discovery, not just answers. |
6062
| [MS-SQL Database Administrator](../chatmodes/ms-sql-dba.chatmode.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/chatmode?url=vscode%3Achat-mode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fms-sql-dba.chatmode.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/chatmode?url=vscode-insiders%3Achat-mode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fms-sql-dba.chatmode.md) | Work with Microsoft SQL Server databases using the MS SQL extension. |

0 commit comments

Comments
 (0)