From 648ccccc77dab8ff84b11b23b222d57e2e1822b3 Mon Sep 17 00:00:00 2001 From: Frank Migacz <111800314+queuedecay@users.noreply.github.com> Date: Thu, 26 Mar 2026 10:08:43 -0500 Subject: [PATCH 1/3] Update prompts to reference GitHub Copilot Updated mentions of AI-powered development tools from 'Cursor IDE' to 'GitHub Copilot'. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ad91f096..1d337cb4 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ This repository contains sample agents and prompts for building with the Microsoft Agent 365 SDK. The Microsoft Agent 365 SDK extends the Microsoft 365 Agents SDK with enterprise-grade capabilities for building sophisticated agents. It provides comprehensive tooling for observability, notifications, runtime utilities, and development tools that help developers create production-ready agents for platforms including M365, Teams, Copilot Studio, and Webchat. - **Sample agents** are available in C# (.NET), Python, and Node.js/TypeScript -- **Prompts** to help you get started with AI-powered development tools like Cursor IDE +- **Prompts** to help you get started with AI-powered development tools like GitHub Copilot ## E2E Test Status @@ -38,7 +38,7 @@ Please help improve the Microsoft Agent 365 SDK and CLI by taking our survey: [A This samples repository is currently in active development and contains: - **Sample Agents**: Production-ready examples in C#/.NET, Python, and Node.js/TypeScript demonstrating observability, notifications, tooling, and hosting patterns -- **Prompts**: Guides for using AI-powered development tools (e.g., Cursor IDE) to accelerate agent development +- **Prompts**: Guides for using AI-powered development tools (e.g., GitHub Copilot) to accelerate agent development ## Documentation From 5ad246b0fda90bc264c3e602301ff21aa841cd0f Mon Sep 17 00:00:00 2001 From: Frank Migacz Date: Thu, 26 Mar 2026 10:45:36 -0500 Subject: [PATCH 2/3] Add GitHub Copilot prompt guide Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- prompts/GitHub Copilot.md | 95 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 prompts/GitHub Copilot.md diff --git a/prompts/GitHub Copilot.md b/prompts/GitHub Copilot.md new file mode 100644 index 00000000..bc99f2f3 --- /dev/null +++ b/prompts/GitHub Copilot.md @@ -0,0 +1,95 @@ +# GitHub Copilot Prompt Guide + +## 1. Introduction +This guide explains how to use GitHub Copilot in Visual Studio Code to create a Microsoft Agent 365 agent by providing a natural language prompt. For illustration, we use **TypeScript with OpenAI GPT-5.4 as the model** and an **email management use case**, but the same approach works for other languages, models, and scenarios (calendar management, document search, etc.). + +You will: +- Reference Microsoft Learn documentation URLs that describe Agent 365 concepts, tooling, and integration patterns. +- Send one concise prompt to GitHub Copilot (including documentation URLs) so it scaffolds the project for you. +- Know where to look for the generated README files and next steps. + +## 2. Prerequisites +Before you begin, make sure you have: +- **[Visual Studio Code](https://code.visualstudio.com/)** installed. +- **[GitHub Copilot](https://github.com/features/copilot)** enabled for your GitHub account and available in VS Code. +- **[Node.js 18+](https://nodejs.org/)** installed (for running the TypeScript project Copilot will generate). Verify with `node --version`. +- API credentials for the model provider you plan to use (for example, OpenAI or Azure OpenAI), if required by the generated sample. +- An idea of the use case you want the agent to support—in this example, summarizing and replying to unread emails. + +## 3. Gather References +GitHub Copilot works best when you reference Microsoft Learn documentation directly in your prompt. You'll include these URLs in your prompt (Section 4) so Copilot can use them as implementation guidance while generating the project. + +When crafting your prompt, reference these Microsoft Learn pages by URL: + +- **Agent 365 Developer Overview**: https://learn.microsoft.com/en-us/microsoft-agent-365/developer/?tabs=nodejs +- **Notifications**: https://learn.microsoft.com/en-us/microsoft-agent-365/developer/notification?tabs=nodejs +- **Tooling (MCP)**: https://learn.microsoft.com/en-us/microsoft-agent-365/developer/tooling?tabs=nodejs +- **Observability**: https://learn.microsoft.com/en-us/microsoft-agent-365/developer/observability?tabs=nodejs + + +## 4. Prompting GitHub Copilot +Open GitHub Copilot Chat in VS Code and paste a prompt like this, including the Microsoft Learn documentation URLs: + +``` +Using these documentations: +https://learn.microsoft.com/en-us/microsoft-agent-365/developer/?tabs=nodejs +https://learn.microsoft.com/en-us/microsoft-agent-365/developer/notification?tabs=nodejs +https://learn.microsoft.com/en-us/microsoft-agent-365/developer/tooling?tabs=nodejs +https://learn.microsoft.com/en-us/microsoft-agent-365/developer/observability?tabs=nodejs + + +Create a Microsoft Agent 365 agent in TypeScript using OpenAI GPT-5.4 that can summarize unread emails and draft helpful email responses. The agent must: +- Receive a user message +- Forward it to GPT-5.4 +- Return the model's response +- Add basic inbound/outbound observability traces +- Integrate tooling support (specifically MailTools for email operations) +Produce the code, config files, and README needed to run it with Node.js/TypeScript. +``` + +**Note:** You can adapt this prompt for other use cases—replace "summarize unread emails" with "manage calendar events," "search SharePoint documents," or other Microsoft 365 operations. Just mention the relevant tools (CalendarTools, SharePointTools, etc.) in the requirements. If it misses something—like tooling registration or observability—send a quick follow-up instruction to regenerate the affected files. + +### 4.1 Using Ask Mode and Agent Mode +If you want GitHub Copilot to think through the work before making edits, start in **Ask** mode and request a plan for the files it intends to create or update. Once the plan looks right, switch to **Agent** mode (or use the edit workflow available in your version of VS Code) and ask Copilot to generate the project files in your workspace. + +Agent mode is the best fit when you want Copilot to create multiple files, update configuration, and wire the project together from a single prompt. Review the proposed edits before accepting them. + +## 5. Running the Prompt in VS Code +1. Open VS Code and create a new workspace (or use your existing project folder). +2. Open the GitHub Copilot Chat panel. +3. If available, switch to **Agent** mode for multi-file generation. Otherwise, use chat/edit mode and let Copilot apply the changes step by step. +4. Paste the prompt from Section 4 (including the documentation URLs) and submit. +5. Review the generated TypeScript files. Copilot will show proposed edits so you can confirm the structure looks right before accepting them. +6. If you need tweaks, send a follow-up instruction (for example, "Regenerate `src/agent.ts` with more logging" or "Include a Node.js Express server entry point"). +7. Accept the changes into your workspace when they match your expectations. + +## 6. After Prompt Generation +1. **Read the generated README:** Copilot should create a README with prerequisites, configuration, and run commands specific to your agent. +2. **Configure environment variables:** + - Look for `.env.example`, `.env.template`, or configuration instructions in the README. + - Copy to `.env` and fill in required values (API keys, endpoints, etc.). +3. **Open a terminal in VS Code:** + - Menu: Terminal -> New Terminal + - Navigate to your project folder +4. **Install dependencies and run:** + ```bash + npm install # Install dependencies + npm run build # Build TypeScript (if needed) + npm start # Start the agent + ``` +5. **Test the agent:** Follow testing instructions in the generated README. + +## 7. Adapting the Prompt +- **Different use case:** This is the most common customization. Replace "summarize unread emails" with your desired functionality: + - **Calendar management:** "manage calendar events, schedule meetings, and find available time slots" (use CalendarTools) + - **Document search:** "search SharePoint documents and summarize findings" (use SharePointTools) + - Mention the relevant tools in the requirements (for example, "specifically CalendarTools for calendar operations"). +- **Different model:** Replace "OpenAI GPT-5.4" with your preferred model or provider and adjust any configuration instructions accordingly. +- **Different language:** If you want Python, C#, etc., adjust the prompt and documentation URLs accordingly (change `?tabs=nodejs` to `?tabs=python` or `?tabs=dotnet`). The rest of this guide still applies, but ensure your environment is aligned with that stack. +- **More or less guidance:** Add a sentence if you need something specific (for example, "Use Express server hosting" or "Skip observability"). + +By combining Microsoft Learn documentation with this minimal prompt, GitHub Copilot can scaffold a Microsoft Agent 365 project quickly in VS Code. + +## Learn More +- **GitHub Copilot for VS Code**: +- **GitHub Copilot Chat**: From 333dcf17e9eb619f18cd2738c16b00a445bc1884 Mon Sep 17 00:00:00 2001 From: Frank Migacz Date: Thu, 26 Mar 2026 11:14:01 -0500 Subject: [PATCH 3/3] Rename GitHub Copilot prompt file Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- prompts/{GitHub Copilot.md => github-copilot.md} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename prompts/{GitHub Copilot.md => github-copilot.md} (99%) diff --git a/prompts/GitHub Copilot.md b/prompts/github-copilot.md similarity index 99% rename from prompts/GitHub Copilot.md rename to prompts/github-copilot.md index bc99f2f3..25eb4e8c 100644 --- a/prompts/GitHub Copilot.md +++ b/prompts/github-copilot.md @@ -31,7 +31,7 @@ When crafting your prompt, reference these Microsoft Learn pages by URL: Open GitHub Copilot Chat in VS Code and paste a prompt like this, including the Microsoft Learn documentation URLs: ``` -Using these documentations: +Using these documentation articles: https://learn.microsoft.com/en-us/microsoft-agent-365/developer/?tabs=nodejs https://learn.microsoft.com/en-us/microsoft-agent-365/developer/notification?tabs=nodejs https://learn.microsoft.com/en-us/microsoft-agent-365/developer/tooling?tabs=nodejs