diff --git a/samples/da-smart-router-multiagent/.gitignore b/samples/da-smart-router-multiagent/.gitignore new file mode 100644 index 000000000..9660f7513 --- /dev/null +++ b/samples/da-smart-router-multiagent/.gitignore @@ -0,0 +1,13 @@ +# Microsoft 365 Agents Toolkit files +env/.env.*.user +env/.env.local +.localConfigs +appPackage/build + +# dependencies +node_modules/ + +# misc +.env +.deployment +.DS_Store diff --git a/samples/da-smart-router-multiagent/README.md b/samples/da-smart-router-multiagent/README.md new file mode 100644 index 000000000..f6eb88826 --- /dev/null +++ b/samples/da-smart-router-multiagent/README.md @@ -0,0 +1,152 @@ +# Smart Router - Multi-agent orchestration for sales teams + +## Summary + +Smart Router is a multi-agent pattern for Microsoft 365 Copilot built entirely from declarative agents. An orchestrator agent detects the intent behind each request and routes it to one of six specialised worker agents, so sellers can ask for a proposal, a policy answer, meeting prep, a briefing note, a content review, or a pitch deck without having to pick the right agent themselves. + +The orchestrator connects to its workers through the `worker_agents` property in its declarative agent definition. Each of the seven agents is a self-contained Microsoft 365 Agents Toolkit project, so they can be provisioned and updated independently. + +The orchestrator describing what the set of agents can do: + +![Smart Router capability overview](assets/smart-router-capabilities.png) + +Routing in action. The user asks a sales question, and the orchestrator hands it to the worker agent that owns that intent: + +![Smart Router routing a request to a worker agent](assets/smart-router-routing.png) + +> The screenshots come from the original recording of this scenario, in which the agents still carried their development names (`IOrchestrator` and `Finalchildcoforge3`). They are named **Smart Router** and **Sales FAQ** in this sample. + +https://github.com/user-attachments/assets/e1af6920-f25c-4065-aca0-47cc36ec7462 + +## Contributors + +* [Keshav Keshari](https://github.com/keshavk-msft) + +## Version history + +Version|Date|Comments +-------|----|-------- +1.0|August 24, 2026|Initial release + +## Prerequisites + +* [Microsoft 365 Copilot license](https://learn.microsoft.com/microsoft-365-copilot/extensibility/prerequisites#prerequisites) +* A [Microsoft 365 account for development](https://learn.microsoft.com/microsoftteams/platform/toolkit/accounts) +* [Microsoft 365 Agents Toolkit for Visual Studio Code](https://aka.ms/teams-toolkit) or [Microsoft 365 Agents Toolkit CLI](https://aka.ms/teamsfx-toolkit-cli) + +## Minimal path to awesome + +* Clone this repository (or [download this solution as a .ZIP file](https://pnp.github.io/download-partial/?url=https://github.com/pnp/copilot-pro-dev-samples/tree/main/samples/da-smart-router-multiagent) then unzip it) + +Deploy the six worker agents **before** the orchestrator, because the orchestrator has to reference their agent IDs. + +* For each folder under `workers`, in turn: + * Open the worker folder in Visual Studio Code + * Select the Microsoft 365 Agents Toolkit icon on the left in the VS Code toolbar + * In the **Accounts** section, sign in with your [Microsoft 365 account](https://learn.microsoft.com/microsoftteams/platform/toolkit/accounts) if you haven't already + * Select **Provision** in the **Lifecycle** section + * Once provisioning finishes, note the **title ID** that was created. A title ID is a single letter, an underscore, and a GUID, for example `U_1e0e57ab-2c86-4e70-8dc7-9a4f1a4d0c62`. It is shown in the output of the **Provision** command, and can also be found in the agent metadata section of the [developer mode](https://learn.microsoft.com/microsoft-365-copilot/extensibility/debugging-agents-copilot-studio) card + +* Wire the workers into the orchestrator: + * Open `orchestrator/appPackage/declarativeAgent.json` + * Replace each `U_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` placeholder in `worker_agents` with one of the title IDs you collected + * Remove any entries you don't need if you deployed fewer than six workers + +* Deploy the orchestrator: + * Open the `orchestrator` folder in Visual Studio Code + * Select **Provision** in the **Lifecycle** section + * Select `Preview in Copilot (Edge)` or `Preview in Copilot (Chrome)` from the launch configuration dropdown + * Once the Copilot app is loaded in the browser, select the "..." menu and select **Copilot chats**. You will see **Smart Router** on the right rail. Selecting it will change the experience to showcase the agent + * Ask the agent for a proposal, a sales policy answer, or meeting prep, and it will route the request to the matching worker agent + +## Features + +Using this sample you can extend Microsoft 365 Copilot with a set of agents that: + +* Route a request to a specialised agent based on detected intent, rather than making the user choose +* Generate client proposals as formatted Word documents +* Answer common sales process and policy questions +* Summarise client context, recent interactions, and talking points before a meeting +* Format meeting notes into a fixed meeting brief template +* Review content for clarity, structure, tone, consistency, and completeness +* Build pitch decks by reusing existing case studies and service descriptions + +### Architecture + +``` + ┌─────────────────────┐ + │ User │ + └──────────┬──────────┘ + │ + ▼ + ┌─────────────────────┐ + │ Smart Router │ + │ (Intent Router) │ + └──────────┬──────────┘ + │ + ┌────────────┬───────────┼───────────┬────────────┬────────────┐ + ▼ ▼ ▼ ▼ ▼ ▼ + ┌────────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ + │ Proposal │ │ Sales │ │ Meeting │ │Briefing │ │ Content │ │Proactive│ + │ Generator │ │ FAQ │ │ Preparer│ │Formatter│ │ Checker │ │Proposal │ + └────────────┘ └─────────┘ └─────────┘ └─────────┘ └─────────┘ └─────────┘ +``` + +### Agents + +| Agent | Purpose | Capabilities | +|-------|---------|--------------| +| **Smart Router** | Detects intent and routes the request to the right worker agent | OneDriveAndSharePoint, CodeInterpreter | +| Proposal Generator | Creates client proposals as Word documents | OneDriveAndSharePoint, CodeInterpreter | +| Sales FAQ | Answers common sales process and policy questions | None | +| Client Meeting Preparer | Summarises client context and talking points | Meetings | +| Briefing Note Formatter | Formats meeting notes into a fixed template | None | +| Content Quality Checker | Reviews content quality and returns prioritised feedback | OneDriveAndSharePoint, CodeInterpreter | +| Proactive Proposal | Builds pitch decks from existing content | OneDriveAndSharePoint, CodeInterpreter | + +### Connecting worker agents + +The orchestrator references its workers by title ID in `orchestrator/appPackage/declarativeAgent.json`, using the `worker_agents` property introduced in declarative agent schema v1.6: + +```json +"worker_agents": [ + { "id": "U_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" }, + { "id": "U_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" } +] +``` + +These IDs only exist once a worker has been provisioned, which is why the workers are deployed first. Users must also install each worker agent before the orchestrator can route to it. + +Copilot chooses which worker to route to based on each worker's `name`, `description`, and `conversation_starters` — not on the orchestrator's instructions alone. If routing sends a request to the wrong agent, sharpen the worker `description` values first, then refine the routing rules in `orchestrator/appPackage/instruction.txt`. + +Connected agents exchange text only. Workers can't return files, images, or adaptive cards to the orchestrator, so the Proposal Generator and Proactive Proposal agents are best used directly when a document or deck is the deliverable. + +### Project structure + +| Folder/File | Contents | +|-------------|----------| +| `orchestrator` | Microsoft 365 Agents Toolkit project for the routing agent | +| `workers` | One Microsoft 365 Agents Toolkit project per specialised worker agent | +| `/.vscode` | VS Code files for debugging | +| `/appPackage` | Templates for the Teams application manifest and the declarative agent definition | +| `/appPackage/declarativeAgent.json` | Defines the behaviour and configuration of the declarative agent | +| `/appPackage/instruction.txt` | Agent instructions | +| `/appPackage/manifest.json` | Teams application manifest that defines metadata for the declarative agent | +| `/env` | Environment files | +| `/m365agents.yml` | Main Microsoft 365 Agents Toolkit project file with provision and publish lifecycle definitions | + +## Help + +We do not support samples, but this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues. + +You can try looking at [issues related to this sample](https://github.com/pnp/copilot-pro-dev-samples/issues?q=label%3A%22sample%3A%20da-smart-router-multiagent%22) to see if anybody else is having the same issues. + +If you encounter any issues using this sample, [create a new issue](https://github.com/pnp/copilot-pro-dev-samples/issues/new). + +Finally, if you have an idea for improvement, [make a suggestion](https://github.com/pnp/copilot-pro-dev-samples/issues/new). + +## Disclaimer + +**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.** + +![](https://m365-visitor-stats.azurewebsites.net/copilot-pro-dev-samples/samples/da-smart-router-multiagent) diff --git a/samples/da-smart-router-multiagent/assets/sample.json b/samples/da-smart-router-multiagent/assets/sample.json new file mode 100644 index 000000000..a956387d4 --- /dev/null +++ b/samples/da-smart-router-multiagent/assets/sample.json @@ -0,0 +1,69 @@ +[ + { + "name": "pnp-copilot-pro-dev-da-smart-router-multiagent", + "source": "pnp", + "title": "Smart Router - Multi-agent orchestration for sales teams", + "shortDescription": "An orchestrator declarative agent that detects intent and routes sales requests to one of six specialised worker agents.", + "url": "https://github.com/pnp/copilot-pro-dev-samples/tree/main/samples/da-smart-router-multiagent", + "downloadUrl": "https://pnp.github.io/download-partial/?url=https://github.com/pnp/copilot-pro-dev-samples/tree/main/samples/da-smart-router-multiagent", + "longDescription": [ + "A multi-agent orchestration pattern for sales teams built entirely from declarative agents. An orchestrator agent detects the intent behind each request and routes it to one of six specialised worker agents that handle proposal generation, sales FAQs, client meeting preparation, briefing note formatting, content quality review, and proactive pitch decks. The orchestrator connects to its workers through the worker_agents property in its declarative agent definition." + ], + "creationDateTime": "2026-08-24", + "updateDateTime": "2026-08-24", + "products": [ + "Microsoft 365 Copilot" + ], + "metadata": [ + { + "key": "PLATFORM", + "value": "Node.js" + }, + { + "key": "LANGUAGE", + "value": "Declarative Agent" + }, + { + "key": "API-PLUGIN", + "value": "No" + }, + { + "key": "GRAPH-CONNECTOR", + "value": "No" + } + ], + "thumbnails": [ + { + "type": "image", + "order": 100, + "url": "https://github.com/pnp/copilot-pro-dev-samples/raw/main/samples/da-smart-router-multiagent/assets/smart-router-capabilities.png", + "alt": "Smart Router describing the capabilities of the agent set" + }, + { + "type": "image", + "order": 101, + "url": "https://github.com/pnp/copilot-pro-dev-samples/raw/main/samples/da-smart-router-multiagent/assets/smart-router-routing.png", + "alt": "Smart Router routing a sales question to a worker agent" + } + ], + "authors": [ + { + "gitHubAccount": "keshavk-msft", + "pictureUrl": "https://github.com/keshavk-msft.png", + "name": "Keshav Keshari" + } + ], + "references": [ + { + "name": "Microsoft 365 Copilot extensibility", + "description": "Learn more about what Microsoft 365 Copilot and how you can extend it.", + "url": "https://learn.microsoft.com/microsoft-365-copilot/extensibility/" + }, + { + "name": "Declarative agents for Microsoft 365 Copilot", + "description": "Learn how to build declarative agents for Microsoft 365 Copilot.", + "url": "https://aka.ms/teams-toolkit-declarative-agent" + } + ] + } +] diff --git a/samples/da-smart-router-multiagent/assets/smart-router-capabilities.png b/samples/da-smart-router-multiagent/assets/smart-router-capabilities.png new file mode 100644 index 000000000..4023319c9 Binary files /dev/null and b/samples/da-smart-router-multiagent/assets/smart-router-capabilities.png differ diff --git a/samples/da-smart-router-multiagent/assets/smart-router-routing.png b/samples/da-smart-router-multiagent/assets/smart-router-routing.png new file mode 100644 index 000000000..463cb7c49 Binary files /dev/null and b/samples/da-smart-router-multiagent/assets/smart-router-routing.png differ diff --git a/samples/da-smart-router-multiagent/orchestrator/.vscode/extensions.json b/samples/da-smart-router-multiagent/orchestrator/.vscode/extensions.json new file mode 100644 index 000000000..aac0a6e34 --- /dev/null +++ b/samples/da-smart-router-multiagent/orchestrator/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "TeamsDevApp.ms-teams-vscode-extension" + ] +} diff --git a/samples/da-smart-router-multiagent/orchestrator/.vscode/launch.json b/samples/da-smart-router-multiagent/orchestrator/.vscode/launch.json new file mode 100644 index 000000000..de1b02ec6 --- /dev/null +++ b/samples/da-smart-router-multiagent/orchestrator/.vscode/launch.json @@ -0,0 +1,27 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Preview in Copilot (Edge)", + "type": "msedge", + "request": "launch", + "url": "https://www.office.com/chat?auth=2", + "presentation": { + "group": "remote", + "order": 1 + }, + "internalConsoleOptions": "neverOpen" + }, + { + "name": "Preview in Copilot (Chrome)", + "type": "chrome", + "request": "launch", + "url": "https://www.office.com/chat?auth=2", + "presentation": { + "group": "remote", + "order": 2 + }, + "internalConsoleOptions": "neverOpen" + } + ] +} diff --git a/samples/da-smart-router-multiagent/orchestrator/.vscode/settings.json b/samples/da-smart-router-multiagent/orchestrator/.vscode/settings.json new file mode 100644 index 000000000..429962025 --- /dev/null +++ b/samples/da-smart-router-multiagent/orchestrator/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + "debug.onTaskErrors": "abort", + "json.schemas": [ + { + "fileMatch": [ + "/aad.*.json" + ], + "schema": {} + } + ] +} diff --git a/samples/da-smart-router-multiagent/orchestrator/appPackage/color.png b/samples/da-smart-router-multiagent/orchestrator/appPackage/color.png new file mode 100644 index 000000000..11e255fa0 Binary files /dev/null and b/samples/da-smart-router-multiagent/orchestrator/appPackage/color.png differ diff --git a/samples/da-smart-router-multiagent/orchestrator/appPackage/declarativeAgent.json b/samples/da-smart-router-multiagent/orchestrator/appPackage/declarativeAgent.json new file mode 100644 index 000000000..7cdbb2908 --- /dev/null +++ b/samples/da-smart-router-multiagent/orchestrator/appPackage/declarativeAgent.json @@ -0,0 +1,61 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/copilot/declarative-agent/v1.8/schema.json", + "version": "v1.8", + "name": "Smart Router", + "description": "Acts as a smart router that identifies user intent and activates the appropriate task-specific agent, ensuring accurate and efficient handling of proposal creation, sales FAQs, meeting preparation, briefing notes, content review, and pitch decks.", + "instructions": "$[file('instruction.txt')]", + "capabilities": [ + { + "name": "OneDriveAndSharePoint" + }, + { + "name": "CodeInterpreter" + } + ], + "conversation_starters": [ + { + "title": "Generate a proposal", + "text": "Create a proposal for Contoso covering a 12-week data platform migration, and return it as a Word document." + }, + { + "title": "Ask a sales question", + "text": "What is our discount approval process for deals above $250,000?" + }, + { + "title": "Prepare for a client meeting", + "text": "I have a meeting with the Contoso account team next week. Summarise the client, recent interactions, and key talking points." + }, + { + "title": "Format a briefing note", + "text": "Format these meeting notes into our standard meeting brief template." + }, + { + "title": "Review content quality", + "text": "Review this proposal draft for clarity, structure, tone, and consistency, and list the changes you recommend." + }, + { + "title": "Build a pitch deck", + "text": "Turn our existing case studies and service descriptions into a proactive pitch deck for a retail client." + } + ], + "worker_agents": [ + { + "id": "U_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + }, + { + "id": "U_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + }, + { + "id": "U_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + }, + { + "id": "U_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + }, + { + "id": "U_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + }, + { + "id": "U_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + } + ] +} diff --git a/samples/da-smart-router-multiagent/orchestrator/appPackage/instruction.txt b/samples/da-smart-router-multiagent/orchestrator/appPackage/instruction.txt new file mode 100644 index 000000000..31675b687 --- /dev/null +++ b/samples/da-smart-router-multiagent/orchestrator/appPackage/instruction.txt @@ -0,0 +1,42 @@ +You are the Smart Router for a sales team. Analyse every user request, detect the +intent behind it, and forward the request to the worker agent that is best able to +answer it. Do not answer specialised requests yourself when a worker agent covers +the intent. + +Use the following routing rules. + +Proposal Generator +Route here when the user asks to create, draft, write, or update a client proposal, +statement of work, or pricing document, or asks for a proposal as a Word document. + +Sales FAQ +Route here when the user asks a short factual question about sales process or +policy, such as discount approval, quote validity, contract terms, commission, or +escalation paths. + +Client Meeting Preparer +Route here when the user asks to prepare for an upcoming client meeting, or asks +for a client overview, engagement history, recent interactions, or talking points. + +Briefing Note Formatter +Route here when the user asks to format, structure, or lay out meeting notes into a +briefing note or meeting brief template. + +Content Quality Checker +Route here when the user asks to review, proofread, critique, or quality-check +existing content for clarity, structure, tone, or consistency. + +Proactive Proposal +Route here when the user asks to build a pitch deck, presentation, or proactive RFP +response by reusing existing case studies, proposals, or service descriptions. + +Routing behaviour +Pick exactly one worker agent per request. If a request spans more than one intent, +route to the agent that covers the primary deliverable the user asked for, then tell +the user which other agent can help with the remainder. + +If no rule clearly applies, ask one short clarifying question before routing. If the +request is general conversation or a greeting, respond directly and briefly describe +the six specialised agents available. + +Always tell the user which agent you routed the request to. diff --git a/samples/da-smart-router-multiagent/orchestrator/appPackage/manifest.json b/samples/da-smart-router-multiagent/orchestrator/appPackage/manifest.json new file mode 100644 index 000000000..6ff820ded --- /dev/null +++ b/samples/da-smart-router-multiagent/orchestrator/appPackage/manifest.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/teams/v1.30/MicrosoftTeams.schema.json", + "manifestVersion": "1.30", + "version": "1.0.0", + "id": "${{TEAMS_APP_ID}}", + "developer": { + "name": "Contoso", + "websiteUrl": "https://www.example.com", + "privacyUrl": "https://www.example.com/privacy", + "termsOfUseUrl": "https://www.example.com/termsofuse" + }, + "icons": { + "color": "color.png", + "outline": "outline.png" + }, + "name": { + "short": "Smart Router", + "full": "Smart Router - Sales multi-agent orchestrator" + }, + "description": { + "short": "Routes sales requests to the specialised agent that can best answer them.", + "full": "Smart Router is an orchestrator agent for sales teams. It detects the intent behind a request and forwards it to one of six specialised worker agents that handle proposal generation, sales FAQs, meeting preparation, briefing note formatting, content quality review, and pitch deck creation." + }, + "accentColor": "#FFFFFF", + "copilotAgents": { + "declarativeAgents": [ + { + "id": "declarativeAgent", + "file": "declarativeAgent.json" + } + ] + }, + "permissions": [ + "identity", + "messageTeamMembers" + ], + "validDomains": [] +} diff --git a/samples/da-smart-router-multiagent/orchestrator/appPackage/outline.png b/samples/da-smart-router-multiagent/orchestrator/appPackage/outline.png new file mode 100644 index 000000000..f7a4c8644 Binary files /dev/null and b/samples/da-smart-router-multiagent/orchestrator/appPackage/outline.png differ diff --git a/samples/da-smart-router-multiagent/orchestrator/env/.env.dev b/samples/da-smart-router-multiagent/orchestrator/env/.env.dev new file mode 100644 index 000000000..8d47b877c --- /dev/null +++ b/samples/da-smart-router-multiagent/orchestrator/env/.env.dev @@ -0,0 +1,8 @@ +# This file includes environment variables that will be committed to git by default. + +# Built-in environment variables +TEAMSFX_ENV=dev +APP_NAME_SUFFIX=dev + +# Generated during provision, you can also add your own variables. +TEAMS_APP_ID= diff --git a/samples/da-smart-router-multiagent/orchestrator/m365agents.yml b/samples/da-smart-router-multiagent/orchestrator/m365agents.yml new file mode 100644 index 000000000..61154e07a --- /dev/null +++ b/samples/da-smart-router-multiagent/orchestrator/m365agents.yml @@ -0,0 +1,83 @@ +# yaml-language-server: $schema=https://aka.ms/teams-toolkit/v1.8/yaml.schema.json +# Visit https://aka.ms/teamsfx-v5.0-guide for details on this file +# Visit https://aka.ms/teamsfx-actions for details on actions +version: v1.8 + +additionalMetadata: + sampleTag: pnp-copilot-pro-dev:da-smart-router-multiagent + +environmentFolderPath: ./env + +# Triggered when 'teamsapp provision' is executed +provision: + # Creates a Teams app + - uses: teamsApp/create + with: + # Teams app name + name: Smart Router${{APP_NAME_SUFFIX}} + # Write the information of created resources into environment file for + # the specified environment variable(s). + writeToEnvironmentFile: + teamsAppId: TEAMS_APP_ID + + # Build Teams app package with latest env value + - uses: teamsApp/zipAppPackage + with: + # Path to manifest template + manifestPath: ./appPackage/manifest.json + outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + outputFolder: ./appPackage/build + # Validate app package using validation rules + - uses: teamsApp/validateAppPackage + with: + # Relative path to this file. This is the path for built zip file. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Apply the Teams app manifest to an existing Teams app in + # Teams Developer Portal. + # Will use the app id in manifest file to determine which Teams app to update. + - uses: teamsApp/update + with: + # Relative path to this file. This is the path for built zip file. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Extend your Teams app to Outlook and the Microsoft 365 app + - uses: teamsApp/extendToM365 + with: + # Relative path to the build app package. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Write the information of created resources into environment file for + # the specified environment variable(s). + writeToEnvironmentFile: + titleId: M365_TITLE_ID + appId: M365_APP_ID + +# Triggered when 'teamsapp publish' is executed +publish: + # Build Teams app package with latest env value + - uses: teamsApp/zipAppPackage + with: + # Path to manifest template + manifestPath: ./appPackage/manifest.json + outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + outputFolder: ./appPackage/build + # Validate app package using validation rules + - uses: teamsApp/validateAppPackage + with: + # Relative path to this file. This is the path for built zip file. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Apply the Teams app manifest to an existing Teams app in + # Teams Developer Portal. + # Will use the app id in manifest file to determine which Teams app to update. + - uses: teamsApp/update + with: + # Relative path to this file. This is the path for built zip file. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Publish the app to + # Teams Admin Center (https://admin.teams.microsoft.com/policies/manage-apps) + # for review and approval + - uses: teamsApp/publishAppPackage + with: + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Write the information of created resources into environment file for + # the specified environment variable(s). + writeToEnvironmentFile: + publishedAppId: TEAMS_APP_PUBLISHED_APP_ID diff --git a/samples/da-smart-router-multiagent/workers/briefing-note-formatter/.vscode/extensions.json b/samples/da-smart-router-multiagent/workers/briefing-note-formatter/.vscode/extensions.json new file mode 100644 index 000000000..aac0a6e34 --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/briefing-note-formatter/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "TeamsDevApp.ms-teams-vscode-extension" + ] +} diff --git a/samples/da-smart-router-multiagent/workers/briefing-note-formatter/.vscode/launch.json b/samples/da-smart-router-multiagent/workers/briefing-note-formatter/.vscode/launch.json new file mode 100644 index 000000000..de1b02ec6 --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/briefing-note-formatter/.vscode/launch.json @@ -0,0 +1,27 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Preview in Copilot (Edge)", + "type": "msedge", + "request": "launch", + "url": "https://www.office.com/chat?auth=2", + "presentation": { + "group": "remote", + "order": 1 + }, + "internalConsoleOptions": "neverOpen" + }, + { + "name": "Preview in Copilot (Chrome)", + "type": "chrome", + "request": "launch", + "url": "https://www.office.com/chat?auth=2", + "presentation": { + "group": "remote", + "order": 2 + }, + "internalConsoleOptions": "neverOpen" + } + ] +} diff --git a/samples/da-smart-router-multiagent/workers/briefing-note-formatter/.vscode/settings.json b/samples/da-smart-router-multiagent/workers/briefing-note-formatter/.vscode/settings.json new file mode 100644 index 000000000..429962025 --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/briefing-note-formatter/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + "debug.onTaskErrors": "abort", + "json.schemas": [ + { + "fileMatch": [ + "/aad.*.json" + ], + "schema": {} + } + ] +} diff --git a/samples/da-smart-router-multiagent/workers/briefing-note-formatter/appPackage/color.png b/samples/da-smart-router-multiagent/workers/briefing-note-formatter/appPackage/color.png new file mode 100644 index 000000000..11e255fa0 Binary files /dev/null and b/samples/da-smart-router-multiagent/workers/briefing-note-formatter/appPackage/color.png differ diff --git a/samples/da-smart-router-multiagent/workers/briefing-note-formatter/appPackage/declarativeAgent.json b/samples/da-smart-router-multiagent/workers/briefing-note-formatter/appPackage/declarativeAgent.json new file mode 100644 index 000000000..fa87849cc --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/briefing-note-formatter/appPackage/declarativeAgent.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/copilot/declarative-agent/v1.8/schema.json", + "version": "v1.8", + "name": "Briefing Note Formatter", + "description": "Organises and formats key information into a professional meeting brief, ensuring clear communication of important facts, objectives, and next steps.", + "instructions": "$[file('instruction.txt')]", + "conversation_starters": [ + { + "title": "Format meeting notes", + "text": "Format these meeting notes into our standard meeting brief template." + }, + { + "title": "Build a meeting brief", + "text": "Create a meeting brief for the Contoso review on 15th October 2024, 2pm EST at their Seattle office." + } + ] +} diff --git a/samples/da-smart-router-multiagent/workers/briefing-note-formatter/appPackage/instruction.txt b/samples/da-smart-router-multiagent/workers/briefing-note-formatter/appPackage/instruction.txt new file mode 100644 index 000000000..98d128ef6 --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/briefing-note-formatter/appPackage/instruction.txt @@ -0,0 +1,33 @@ +Produce a Meeting Brief using the exact template below, rendered as a table. + +Keep the section headers exactly as written. Use bullet points where indicated. If +something is unknown, write TBD. Date/Time must include the locale, for example +15th October 2024, 2pm EST. + +Output template: + +Date/Time: + +Location: . Arrival instructions: + +Agenda: + + + + +Meeting Objectives for Contoso: + + + +Objectives for customer (their ask of us): + + + +Next Steps: + ; Assignee: ; Due: + ; Assignee: ; Due: + +If the user asks for machine-readable output instead, return the same content as JSON +using the keys date_time, location.address, location.arrival_instructions, agenda, +meeting_objectives_for_contoso, objectives_for_customer, and next_steps, where each +entry in next_steps has action, assignee, and due_date. diff --git a/samples/da-smart-router-multiagent/workers/briefing-note-formatter/appPackage/manifest.json b/samples/da-smart-router-multiagent/workers/briefing-note-formatter/appPackage/manifest.json new file mode 100644 index 000000000..a4069ee7a --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/briefing-note-formatter/appPackage/manifest.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/teams/v1.30/MicrosoftTeams.schema.json", + "manifestVersion": "1.30", + "version": "1.0.0", + "id": "${{TEAMS_APP_ID}}", + "developer": { + "name": "Contoso", + "websiteUrl": "https://www.example.com", + "privacyUrl": "https://www.example.com/privacy", + "termsOfUseUrl": "https://www.example.com/termsofuse" + }, + "icons": { + "color": "color.png", + "outline": "outline.png" + }, + "name": { + "short": "Briefing Formatter", + "full": "Briefing Note Formatter - Smart Router worker agent" + }, + "description": { + "short": "Formats meeting notes into a standard meeting brief template.", + "full": "Worker agent for the Smart Router multi-agent sample. Organises meeting information into a fixed meeting brief template covering date and time, location, agenda, objectives for both sides, and next steps, rendered as a table or as JSON." + }, + "accentColor": "#FFFFFF", + "copilotAgents": { + "declarativeAgents": [ + { + "id": "declarativeAgent", + "file": "declarativeAgent.json" + } + ] + }, + "permissions": [ + "identity", + "messageTeamMembers" + ], + "validDomains": [] +} diff --git a/samples/da-smart-router-multiagent/workers/briefing-note-formatter/appPackage/outline.png b/samples/da-smart-router-multiagent/workers/briefing-note-formatter/appPackage/outline.png new file mode 100644 index 000000000..f7a4c8644 Binary files /dev/null and b/samples/da-smart-router-multiagent/workers/briefing-note-formatter/appPackage/outline.png differ diff --git a/samples/da-smart-router-multiagent/workers/briefing-note-formatter/env/.env.dev b/samples/da-smart-router-multiagent/workers/briefing-note-formatter/env/.env.dev new file mode 100644 index 000000000..8d47b877c --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/briefing-note-formatter/env/.env.dev @@ -0,0 +1,8 @@ +# This file includes environment variables that will be committed to git by default. + +# Built-in environment variables +TEAMSFX_ENV=dev +APP_NAME_SUFFIX=dev + +# Generated during provision, you can also add your own variables. +TEAMS_APP_ID= diff --git a/samples/da-smart-router-multiagent/workers/briefing-note-formatter/m365agents.yml b/samples/da-smart-router-multiagent/workers/briefing-note-formatter/m365agents.yml new file mode 100644 index 000000000..49ee965cc --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/briefing-note-formatter/m365agents.yml @@ -0,0 +1,83 @@ +# yaml-language-server: $schema=https://aka.ms/teams-toolkit/v1.8/yaml.schema.json +# Visit https://aka.ms/teamsfx-v5.0-guide for details on this file +# Visit https://aka.ms/teamsfx-actions for details on actions +version: v1.8 + +additionalMetadata: + sampleTag: pnp-copilot-pro-dev:da-smart-router-multiagent + +environmentFolderPath: ./env + +# Triggered when 'teamsapp provision' is executed +provision: + # Creates a Teams app + - uses: teamsApp/create + with: + # Teams app name + name: Briefing Note Formatter${{APP_NAME_SUFFIX}} + # Write the information of created resources into environment file for + # the specified environment variable(s). + writeToEnvironmentFile: + teamsAppId: TEAMS_APP_ID + + # Build Teams app package with latest env value + - uses: teamsApp/zipAppPackage + with: + # Path to manifest template + manifestPath: ./appPackage/manifest.json + outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + outputFolder: ./appPackage/build + # Validate app package using validation rules + - uses: teamsApp/validateAppPackage + with: + # Relative path to this file. This is the path for built zip file. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Apply the Teams app manifest to an existing Teams app in + # Teams Developer Portal. + # Will use the app id in manifest file to determine which Teams app to update. + - uses: teamsApp/update + with: + # Relative path to this file. This is the path for built zip file. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Extend your Teams app to Outlook and the Microsoft 365 app + - uses: teamsApp/extendToM365 + with: + # Relative path to the build app package. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Write the information of created resources into environment file for + # the specified environment variable(s). + writeToEnvironmentFile: + titleId: M365_TITLE_ID + appId: M365_APP_ID + +# Triggered when 'teamsapp publish' is executed +publish: + # Build Teams app package with latest env value + - uses: teamsApp/zipAppPackage + with: + # Path to manifest template + manifestPath: ./appPackage/manifest.json + outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + outputFolder: ./appPackage/build + # Validate app package using validation rules + - uses: teamsApp/validateAppPackage + with: + # Relative path to this file. This is the path for built zip file. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Apply the Teams app manifest to an existing Teams app in + # Teams Developer Portal. + # Will use the app id in manifest file to determine which Teams app to update. + - uses: teamsApp/update + with: + # Relative path to this file. This is the path for built zip file. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Publish the app to + # Teams Admin Center (https://admin.teams.microsoft.com/policies/manage-apps) + # for review and approval + - uses: teamsApp/publishAppPackage + with: + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Write the information of created resources into environment file for + # the specified environment variable(s). + writeToEnvironmentFile: + publishedAppId: TEAMS_APP_PUBLISHED_APP_ID diff --git a/samples/da-smart-router-multiagent/workers/client-meeting-preparer/.vscode/extensions.json b/samples/da-smart-router-multiagent/workers/client-meeting-preparer/.vscode/extensions.json new file mode 100644 index 000000000..aac0a6e34 --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/client-meeting-preparer/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "TeamsDevApp.ms-teams-vscode-extension" + ] +} diff --git a/samples/da-smart-router-multiagent/workers/client-meeting-preparer/.vscode/launch.json b/samples/da-smart-router-multiagent/workers/client-meeting-preparer/.vscode/launch.json new file mode 100644 index 000000000..de1b02ec6 --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/client-meeting-preparer/.vscode/launch.json @@ -0,0 +1,27 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Preview in Copilot (Edge)", + "type": "msedge", + "request": "launch", + "url": "https://www.office.com/chat?auth=2", + "presentation": { + "group": "remote", + "order": 1 + }, + "internalConsoleOptions": "neverOpen" + }, + { + "name": "Preview in Copilot (Chrome)", + "type": "chrome", + "request": "launch", + "url": "https://www.office.com/chat?auth=2", + "presentation": { + "group": "remote", + "order": 2 + }, + "internalConsoleOptions": "neverOpen" + } + ] +} diff --git a/samples/da-smart-router-multiagent/workers/client-meeting-preparer/.vscode/settings.json b/samples/da-smart-router-multiagent/workers/client-meeting-preparer/.vscode/settings.json new file mode 100644 index 000000000..429962025 --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/client-meeting-preparer/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + "debug.onTaskErrors": "abort", + "json.schemas": [ + { + "fileMatch": [ + "/aad.*.json" + ], + "schema": {} + } + ] +} diff --git a/samples/da-smart-router-multiagent/workers/client-meeting-preparer/appPackage/color.png b/samples/da-smart-router-multiagent/workers/client-meeting-preparer/appPackage/color.png new file mode 100644 index 000000000..11e255fa0 Binary files /dev/null and b/samples/da-smart-router-multiagent/workers/client-meeting-preparer/appPackage/color.png differ diff --git a/samples/da-smart-router-multiagent/workers/client-meeting-preparer/appPackage/declarativeAgent.json b/samples/da-smart-router-multiagent/workers/client-meeting-preparer/appPackage/declarativeAgent.json new file mode 100644 index 000000000..4482b222e --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/client-meeting-preparer/appPackage/declarativeAgent.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/copilot/declarative-agent/v1.8/schema.json", + "version": "v1.8", + "name": "Client Meeting Preparer", + "description": "Supports meeting readiness by providing concise client overviews, engagement history, and tailored talking points to enhance meeting effectiveness.", + "instructions": "$[file('instruction.txt')]", + "capabilities": [ + { + "name": "Meetings" + } + ], + "conversation_starters": [ + { + "title": "Prepare for a meeting", + "text": "I have a meeting with the Contoso account team next week. Summarise the client, recent interactions, and key talking points." + }, + { + "title": "Client overview", + "text": "Give me a one-page overview of our engagement history with Fabrikam." + } + ] +} diff --git a/samples/da-smart-router-multiagent/workers/client-meeting-preparer/appPackage/instruction.txt b/samples/da-smart-router-multiagent/workers/client-meeting-preparer/appPackage/instruction.txt new file mode 100644 index 000000000..0324cf995 --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/client-meeting-preparer/appPackage/instruction.txt @@ -0,0 +1,25 @@ +Gather and summarise the information a seller needs to walk into a client meeting +prepared. + +For each request, produce: + +Client overview +Who the client is, what they do, and the current state of the relationship. + +Recent interactions +The most recent meetings, emails, and commitments, newest first, with dates. + +Key insights +What has changed since the last conversation and what the client appears to care +about most right now. + +Talking points +Three to five specific points tailored to this meeting, phrased so they can be said +out loud. + +Open items +Anything outstanding from previous meetings, with the owner and due date where known. + +Keep the whole summary short enough to read in a few minutes. Where a fact comes from +a specific meeting or document, say which one. If information is missing, write TBD +rather than filling the gap with assumptions. diff --git a/samples/da-smart-router-multiagent/workers/client-meeting-preparer/appPackage/manifest.json b/samples/da-smart-router-multiagent/workers/client-meeting-preparer/appPackage/manifest.json new file mode 100644 index 000000000..3aeb2943b --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/client-meeting-preparer/appPackage/manifest.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/teams/v1.30/MicrosoftTeams.schema.json", + "manifestVersion": "1.30", + "version": "1.0.0", + "id": "${{TEAMS_APP_ID}}", + "developer": { + "name": "Contoso", + "websiteUrl": "https://www.example.com", + "privacyUrl": "https://www.example.com/privacy", + "termsOfUseUrl": "https://www.example.com/termsofuse" + }, + "icons": { + "color": "color.png", + "outline": "outline.png" + }, + "name": { + "short": "Client Meeting Prep", + "full": "Client Meeting Preparer - Smart Router worker agent" + }, + "description": { + "short": "Summarises client context and talking points ahead of a meeting.", + "full": "Worker agent for the Smart Router multi-agent sample. Gathers and summarises client overviews, recent interactions, key insights, and tailored talking points so sellers are prepared for upcoming client meetings." + }, + "accentColor": "#FFFFFF", + "copilotAgents": { + "declarativeAgents": [ + { + "id": "declarativeAgent", + "file": "declarativeAgent.json" + } + ] + }, + "permissions": [ + "identity", + "messageTeamMembers" + ], + "validDomains": [] +} diff --git a/samples/da-smart-router-multiagent/workers/client-meeting-preparer/appPackage/outline.png b/samples/da-smart-router-multiagent/workers/client-meeting-preparer/appPackage/outline.png new file mode 100644 index 000000000..f7a4c8644 Binary files /dev/null and b/samples/da-smart-router-multiagent/workers/client-meeting-preparer/appPackage/outline.png differ diff --git a/samples/da-smart-router-multiagent/workers/client-meeting-preparer/env/.env.dev b/samples/da-smart-router-multiagent/workers/client-meeting-preparer/env/.env.dev new file mode 100644 index 000000000..8d47b877c --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/client-meeting-preparer/env/.env.dev @@ -0,0 +1,8 @@ +# This file includes environment variables that will be committed to git by default. + +# Built-in environment variables +TEAMSFX_ENV=dev +APP_NAME_SUFFIX=dev + +# Generated during provision, you can also add your own variables. +TEAMS_APP_ID= diff --git a/samples/da-smart-router-multiagent/workers/client-meeting-preparer/m365agents.yml b/samples/da-smart-router-multiagent/workers/client-meeting-preparer/m365agents.yml new file mode 100644 index 000000000..8201e6726 --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/client-meeting-preparer/m365agents.yml @@ -0,0 +1,83 @@ +# yaml-language-server: $schema=https://aka.ms/teams-toolkit/v1.8/yaml.schema.json +# Visit https://aka.ms/teamsfx-v5.0-guide for details on this file +# Visit https://aka.ms/teamsfx-actions for details on actions +version: v1.8 + +additionalMetadata: + sampleTag: pnp-copilot-pro-dev:da-smart-router-multiagent + +environmentFolderPath: ./env + +# Triggered when 'teamsapp provision' is executed +provision: + # Creates a Teams app + - uses: teamsApp/create + with: + # Teams app name + name: Client Meeting Preparer${{APP_NAME_SUFFIX}} + # Write the information of created resources into environment file for + # the specified environment variable(s). + writeToEnvironmentFile: + teamsAppId: TEAMS_APP_ID + + # Build Teams app package with latest env value + - uses: teamsApp/zipAppPackage + with: + # Path to manifest template + manifestPath: ./appPackage/manifest.json + outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + outputFolder: ./appPackage/build + # Validate app package using validation rules + - uses: teamsApp/validateAppPackage + with: + # Relative path to this file. This is the path for built zip file. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Apply the Teams app manifest to an existing Teams app in + # Teams Developer Portal. + # Will use the app id in manifest file to determine which Teams app to update. + - uses: teamsApp/update + with: + # Relative path to this file. This is the path for built zip file. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Extend your Teams app to Outlook and the Microsoft 365 app + - uses: teamsApp/extendToM365 + with: + # Relative path to the build app package. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Write the information of created resources into environment file for + # the specified environment variable(s). + writeToEnvironmentFile: + titleId: M365_TITLE_ID + appId: M365_APP_ID + +# Triggered when 'teamsapp publish' is executed +publish: + # Build Teams app package with latest env value + - uses: teamsApp/zipAppPackage + with: + # Path to manifest template + manifestPath: ./appPackage/manifest.json + outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + outputFolder: ./appPackage/build + # Validate app package using validation rules + - uses: teamsApp/validateAppPackage + with: + # Relative path to this file. This is the path for built zip file. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Apply the Teams app manifest to an existing Teams app in + # Teams Developer Portal. + # Will use the app id in manifest file to determine which Teams app to update. + - uses: teamsApp/update + with: + # Relative path to this file. This is the path for built zip file. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Publish the app to + # Teams Admin Center (https://admin.teams.microsoft.com/policies/manage-apps) + # for review and approval + - uses: teamsApp/publishAppPackage + with: + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Write the information of created resources into environment file for + # the specified environment variable(s). + writeToEnvironmentFile: + publishedAppId: TEAMS_APP_PUBLISHED_APP_ID diff --git a/samples/da-smart-router-multiagent/workers/content-quality-checker/.vscode/extensions.json b/samples/da-smart-router-multiagent/workers/content-quality-checker/.vscode/extensions.json new file mode 100644 index 000000000..aac0a6e34 --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/content-quality-checker/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "TeamsDevApp.ms-teams-vscode-extension" + ] +} diff --git a/samples/da-smart-router-multiagent/workers/content-quality-checker/.vscode/launch.json b/samples/da-smart-router-multiagent/workers/content-quality-checker/.vscode/launch.json new file mode 100644 index 000000000..de1b02ec6 --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/content-quality-checker/.vscode/launch.json @@ -0,0 +1,27 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Preview in Copilot (Edge)", + "type": "msedge", + "request": "launch", + "url": "https://www.office.com/chat?auth=2", + "presentation": { + "group": "remote", + "order": 1 + }, + "internalConsoleOptions": "neverOpen" + }, + { + "name": "Preview in Copilot (Chrome)", + "type": "chrome", + "request": "launch", + "url": "https://www.office.com/chat?auth=2", + "presentation": { + "group": "remote", + "order": 2 + }, + "internalConsoleOptions": "neverOpen" + } + ] +} diff --git a/samples/da-smart-router-multiagent/workers/content-quality-checker/.vscode/settings.json b/samples/da-smart-router-multiagent/workers/content-quality-checker/.vscode/settings.json new file mode 100644 index 000000000..429962025 --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/content-quality-checker/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + "debug.onTaskErrors": "abort", + "json.schemas": [ + { + "fileMatch": [ + "/aad.*.json" + ], + "schema": {} + } + ] +} diff --git a/samples/da-smart-router-multiagent/workers/content-quality-checker/appPackage/color.png b/samples/da-smart-router-multiagent/workers/content-quality-checker/appPackage/color.png new file mode 100644 index 000000000..11e255fa0 Binary files /dev/null and b/samples/da-smart-router-multiagent/workers/content-quality-checker/appPackage/color.png differ diff --git a/samples/da-smart-router-multiagent/workers/content-quality-checker/appPackage/declarativeAgent.json b/samples/da-smart-router-multiagent/workers/content-quality-checker/appPackage/declarativeAgent.json new file mode 100644 index 000000000..4ffb72425 --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/content-quality-checker/appPackage/declarativeAgent.json @@ -0,0 +1,25 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/copilot/declarative-agent/v1.8/schema.json", + "version": "v1.8", + "name": "Content Quality Checker", + "description": "Reviews sales content for clarity, structure, tone, and consistency, and returns prioritised, actionable feedback.", + "instructions": "$[file('instruction.txt')]", + "capabilities": [ + { + "name": "OneDriveAndSharePoint" + }, + { + "name": "CodeInterpreter" + } + ], + "conversation_starters": [ + { + "title": "Review a proposal", + "text": "Review this proposal draft for clarity, structure, tone, and consistency, and list the changes you recommend." + }, + { + "title": "Check before sending", + "text": "I am about to send this to a client. What would you fix first?" + } + ] +} diff --git a/samples/da-smart-router-multiagent/workers/content-quality-checker/appPackage/instruction.txt b/samples/da-smart-router-multiagent/workers/content-quality-checker/appPackage/instruction.txt new file mode 100644 index 000000000..12c517039 --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/content-quality-checker/appPackage/instruction.txt @@ -0,0 +1,32 @@ +Review the content the user provides and report on its quality before it goes to a +client. + +Assess the content against these criteria: + +Clarity +Is the message easy to follow? Flag jargon, ambiguity, and overlong sentences. + +Structure +Does the document flow logically? Flag missing sections, duplicated content, and +headings that do not match the content beneath them. + +Tone +Is the register appropriate for the audience? Flag anything too casual, too dense, or +inconsistent with the rest of the document. + +Consistency +Flag inconsistent terminology, product names, capitalisation, date formats, number +formats, and currency. + +Completeness +Flag unresolved placeholders, TBDs, broken cross-references, and claims presented +without support. + +Return your findings as a table with the columns Severity, Location, Issue, and +Suggested fix. Use High, Medium, or Low for severity, and order rows from High to Low. + +Follow the table with a short summary naming the three changes that would improve the +content most. + +Quote the exact wording you would change so the user can act on your feedback directly. +Review the content as written; do not rewrite the whole document unless asked. diff --git a/samples/da-smart-router-multiagent/workers/content-quality-checker/appPackage/manifest.json b/samples/da-smart-router-multiagent/workers/content-quality-checker/appPackage/manifest.json new file mode 100644 index 000000000..4ee534d0c --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/content-quality-checker/appPackage/manifest.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/teams/v1.30/MicrosoftTeams.schema.json", + "manifestVersion": "1.30", + "version": "1.0.0", + "id": "${{TEAMS_APP_ID}}", + "developer": { + "name": "Contoso", + "websiteUrl": "https://www.example.com", + "privacyUrl": "https://www.example.com/privacy", + "termsOfUseUrl": "https://www.example.com/termsofuse" + }, + "icons": { + "color": "color.png", + "outline": "outline.png" + }, + "name": { + "short": "Content Quality", + "full": "Content Quality Checker - Smart Router worker agent" + }, + "description": { + "short": "Reviews content for clarity, structure, tone, and consistency.", + "full": "Worker agent for the Smart Router multi-agent sample. Reviews sales content before it reaches a client and returns prioritised, actionable feedback covering clarity, structure, tone, consistency, and completeness." + }, + "accentColor": "#FFFFFF", + "copilotAgents": { + "declarativeAgents": [ + { + "id": "declarativeAgent", + "file": "declarativeAgent.json" + } + ] + }, + "permissions": [ + "identity", + "messageTeamMembers" + ], + "validDomains": [] +} diff --git a/samples/da-smart-router-multiagent/workers/content-quality-checker/appPackage/outline.png b/samples/da-smart-router-multiagent/workers/content-quality-checker/appPackage/outline.png new file mode 100644 index 000000000..f7a4c8644 Binary files /dev/null and b/samples/da-smart-router-multiagent/workers/content-quality-checker/appPackage/outline.png differ diff --git a/samples/da-smart-router-multiagent/workers/content-quality-checker/env/.env.dev b/samples/da-smart-router-multiagent/workers/content-quality-checker/env/.env.dev new file mode 100644 index 000000000..8d47b877c --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/content-quality-checker/env/.env.dev @@ -0,0 +1,8 @@ +# This file includes environment variables that will be committed to git by default. + +# Built-in environment variables +TEAMSFX_ENV=dev +APP_NAME_SUFFIX=dev + +# Generated during provision, you can also add your own variables. +TEAMS_APP_ID= diff --git a/samples/da-smart-router-multiagent/workers/content-quality-checker/m365agents.yml b/samples/da-smart-router-multiagent/workers/content-quality-checker/m365agents.yml new file mode 100644 index 000000000..f054b9eed --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/content-quality-checker/m365agents.yml @@ -0,0 +1,83 @@ +# yaml-language-server: $schema=https://aka.ms/teams-toolkit/v1.8/yaml.schema.json +# Visit https://aka.ms/teamsfx-v5.0-guide for details on this file +# Visit https://aka.ms/teamsfx-actions for details on actions +version: v1.8 + +additionalMetadata: + sampleTag: pnp-copilot-pro-dev:da-smart-router-multiagent + +environmentFolderPath: ./env + +# Triggered when 'teamsapp provision' is executed +provision: + # Creates a Teams app + - uses: teamsApp/create + with: + # Teams app name + name: Content Quality Checker${{APP_NAME_SUFFIX}} + # Write the information of created resources into environment file for + # the specified environment variable(s). + writeToEnvironmentFile: + teamsAppId: TEAMS_APP_ID + + # Build Teams app package with latest env value + - uses: teamsApp/zipAppPackage + with: + # Path to manifest template + manifestPath: ./appPackage/manifest.json + outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + outputFolder: ./appPackage/build + # Validate app package using validation rules + - uses: teamsApp/validateAppPackage + with: + # Relative path to this file. This is the path for built zip file. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Apply the Teams app manifest to an existing Teams app in + # Teams Developer Portal. + # Will use the app id in manifest file to determine which Teams app to update. + - uses: teamsApp/update + with: + # Relative path to this file. This is the path for built zip file. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Extend your Teams app to Outlook and the Microsoft 365 app + - uses: teamsApp/extendToM365 + with: + # Relative path to the build app package. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Write the information of created resources into environment file for + # the specified environment variable(s). + writeToEnvironmentFile: + titleId: M365_TITLE_ID + appId: M365_APP_ID + +# Triggered when 'teamsapp publish' is executed +publish: + # Build Teams app package with latest env value + - uses: teamsApp/zipAppPackage + with: + # Path to manifest template + manifestPath: ./appPackage/manifest.json + outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + outputFolder: ./appPackage/build + # Validate app package using validation rules + - uses: teamsApp/validateAppPackage + with: + # Relative path to this file. This is the path for built zip file. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Apply the Teams app manifest to an existing Teams app in + # Teams Developer Portal. + # Will use the app id in manifest file to determine which Teams app to update. + - uses: teamsApp/update + with: + # Relative path to this file. This is the path for built zip file. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Publish the app to + # Teams Admin Center (https://admin.teams.microsoft.com/policies/manage-apps) + # for review and approval + - uses: teamsApp/publishAppPackage + with: + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Write the information of created resources into environment file for + # the specified environment variable(s). + writeToEnvironmentFile: + publishedAppId: TEAMS_APP_PUBLISHED_APP_ID diff --git a/samples/da-smart-router-multiagent/workers/proactive-proposal/.vscode/extensions.json b/samples/da-smart-router-multiagent/workers/proactive-proposal/.vscode/extensions.json new file mode 100644 index 000000000..aac0a6e34 --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/proactive-proposal/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "TeamsDevApp.ms-teams-vscode-extension" + ] +} diff --git a/samples/da-smart-router-multiagent/workers/proactive-proposal/.vscode/launch.json b/samples/da-smart-router-multiagent/workers/proactive-proposal/.vscode/launch.json new file mode 100644 index 000000000..de1b02ec6 --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/proactive-proposal/.vscode/launch.json @@ -0,0 +1,27 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Preview in Copilot (Edge)", + "type": "msedge", + "request": "launch", + "url": "https://www.office.com/chat?auth=2", + "presentation": { + "group": "remote", + "order": 1 + }, + "internalConsoleOptions": "neverOpen" + }, + { + "name": "Preview in Copilot (Chrome)", + "type": "chrome", + "request": "launch", + "url": "https://www.office.com/chat?auth=2", + "presentation": { + "group": "remote", + "order": 2 + }, + "internalConsoleOptions": "neverOpen" + } + ] +} diff --git a/samples/da-smart-router-multiagent/workers/proactive-proposal/.vscode/settings.json b/samples/da-smart-router-multiagent/workers/proactive-proposal/.vscode/settings.json new file mode 100644 index 000000000..429962025 --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/proactive-proposal/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + "debug.onTaskErrors": "abort", + "json.schemas": [ + { + "fileMatch": [ + "/aad.*.json" + ], + "schema": {} + } + ] +} diff --git a/samples/da-smart-router-multiagent/workers/proactive-proposal/appPackage/color.png b/samples/da-smart-router-multiagent/workers/proactive-proposal/appPackage/color.png new file mode 100644 index 000000000..11e255fa0 Binary files /dev/null and b/samples/da-smart-router-multiagent/workers/proactive-proposal/appPackage/color.png differ diff --git a/samples/da-smart-router-multiagent/workers/proactive-proposal/appPackage/declarativeAgent.json b/samples/da-smart-router-multiagent/workers/proactive-proposal/appPackage/declarativeAgent.json new file mode 100644 index 000000000..f86b7727c --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/proactive-proposal/appPackage/declarativeAgent.json @@ -0,0 +1,25 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/copilot/declarative-agent/v1.8/schema.json", + "version": "v1.8", + "name": "Proactive Proposal", + "description": "Creates tailored pitch decks and proactive RFP responses by reusing existing case studies, proposals, and service descriptions.", + "instructions": "$[file('instruction.txt')]", + "capabilities": [ + { + "name": "OneDriveAndSharePoint" + }, + { + "name": "CodeInterpreter" + } + ], + "conversation_starters": [ + { + "title": "Build a pitch deck", + "text": "Turn our existing case studies and service descriptions into a proactive pitch deck for a retail client." + }, + { + "title": "Reuse existing content", + "text": "We have three case studies and a services one-pager. Build a deck that positions them for a healthcare prospect." + } + ] +} diff --git a/samples/da-smart-router-multiagent/workers/proactive-proposal/appPackage/instruction.txt b/samples/da-smart-router-multiagent/workers/proactive-proposal/appPackage/instruction.txt new file mode 100644 index 000000000..40d8da3cc --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/proactive-proposal/appPackage/instruction.txt @@ -0,0 +1,23 @@ +Extract the key content from existing materials the user points you to, such as case +studies, past proposals, and product or service descriptions, and format it into a +professional pitch deck. + +Structure the deck around the client's needs rather than around the source documents. +A typical flow is: + +Title and positioning statement +The client's situation and challenges +Our understanding of their objectives +Proposed approach +Relevant proof points and case studies +Expected outcomes and value +Next steps + +Align the deck to whatever theme or narrative the user specifies. Keep formatting +consistent across slides, keep text on each slide short enough to be read from the +back of a room, and suggest where a visual, diagram, or chart would land better than +prose. + +Reuse the substance of the source material, but rewrite it so it speaks to this +client. Tell the user which source document each proof point came from, and flag +anything you could not substantiate from the material provided. diff --git a/samples/da-smart-router-multiagent/workers/proactive-proposal/appPackage/manifest.json b/samples/da-smart-router-multiagent/workers/proactive-proposal/appPackage/manifest.json new file mode 100644 index 000000000..6228c4aed --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/proactive-proposal/appPackage/manifest.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/teams/v1.30/MicrosoftTeams.schema.json", + "manifestVersion": "1.30", + "version": "1.0.0", + "id": "${{TEAMS_APP_ID}}", + "developer": { + "name": "Contoso", + "websiteUrl": "https://www.example.com", + "privacyUrl": "https://www.example.com/privacy", + "termsOfUseUrl": "https://www.example.com/termsofuse" + }, + "icons": { + "color": "color.png", + "outline": "outline.png" + }, + "name": { + "short": "Proactive Proposal", + "full": "Proactive Proposal - Smart Router worker agent" + }, + "description": { + "short": "Builds pitch decks by reusing existing sales content.", + "full": "Worker agent for the Smart Router multi-agent sample. Extracts key content from existing case studies, proposals, and service descriptions and formats it into a professional pitch deck structured around the client's needs." + }, + "accentColor": "#FFFFFF", + "copilotAgents": { + "declarativeAgents": [ + { + "id": "declarativeAgent", + "file": "declarativeAgent.json" + } + ] + }, + "permissions": [ + "identity", + "messageTeamMembers" + ], + "validDomains": [] +} diff --git a/samples/da-smart-router-multiagent/workers/proactive-proposal/appPackage/outline.png b/samples/da-smart-router-multiagent/workers/proactive-proposal/appPackage/outline.png new file mode 100644 index 000000000..f7a4c8644 Binary files /dev/null and b/samples/da-smart-router-multiagent/workers/proactive-proposal/appPackage/outline.png differ diff --git a/samples/da-smart-router-multiagent/workers/proactive-proposal/env/.env.dev b/samples/da-smart-router-multiagent/workers/proactive-proposal/env/.env.dev new file mode 100644 index 000000000..8d47b877c --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/proactive-proposal/env/.env.dev @@ -0,0 +1,8 @@ +# This file includes environment variables that will be committed to git by default. + +# Built-in environment variables +TEAMSFX_ENV=dev +APP_NAME_SUFFIX=dev + +# Generated during provision, you can also add your own variables. +TEAMS_APP_ID= diff --git a/samples/da-smart-router-multiagent/workers/proactive-proposal/m365agents.yml b/samples/da-smart-router-multiagent/workers/proactive-proposal/m365agents.yml new file mode 100644 index 000000000..731b5fb7b --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/proactive-proposal/m365agents.yml @@ -0,0 +1,83 @@ +# yaml-language-server: $schema=https://aka.ms/teams-toolkit/v1.8/yaml.schema.json +# Visit https://aka.ms/teamsfx-v5.0-guide for details on this file +# Visit https://aka.ms/teamsfx-actions for details on actions +version: v1.8 + +additionalMetadata: + sampleTag: pnp-copilot-pro-dev:da-smart-router-multiagent + +environmentFolderPath: ./env + +# Triggered when 'teamsapp provision' is executed +provision: + # Creates a Teams app + - uses: teamsApp/create + with: + # Teams app name + name: Proactive Proposal${{APP_NAME_SUFFIX}} + # Write the information of created resources into environment file for + # the specified environment variable(s). + writeToEnvironmentFile: + teamsAppId: TEAMS_APP_ID + + # Build Teams app package with latest env value + - uses: teamsApp/zipAppPackage + with: + # Path to manifest template + manifestPath: ./appPackage/manifest.json + outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + outputFolder: ./appPackage/build + # Validate app package using validation rules + - uses: teamsApp/validateAppPackage + with: + # Relative path to this file. This is the path for built zip file. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Apply the Teams app manifest to an existing Teams app in + # Teams Developer Portal. + # Will use the app id in manifest file to determine which Teams app to update. + - uses: teamsApp/update + with: + # Relative path to this file. This is the path for built zip file. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Extend your Teams app to Outlook and the Microsoft 365 app + - uses: teamsApp/extendToM365 + with: + # Relative path to the build app package. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Write the information of created resources into environment file for + # the specified environment variable(s). + writeToEnvironmentFile: + titleId: M365_TITLE_ID + appId: M365_APP_ID + +# Triggered when 'teamsapp publish' is executed +publish: + # Build Teams app package with latest env value + - uses: teamsApp/zipAppPackage + with: + # Path to manifest template + manifestPath: ./appPackage/manifest.json + outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + outputFolder: ./appPackage/build + # Validate app package using validation rules + - uses: teamsApp/validateAppPackage + with: + # Relative path to this file. This is the path for built zip file. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Apply the Teams app manifest to an existing Teams app in + # Teams Developer Portal. + # Will use the app id in manifest file to determine which Teams app to update. + - uses: teamsApp/update + with: + # Relative path to this file. This is the path for built zip file. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Publish the app to + # Teams Admin Center (https://admin.teams.microsoft.com/policies/manage-apps) + # for review and approval + - uses: teamsApp/publishAppPackage + with: + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Write the information of created resources into environment file for + # the specified environment variable(s). + writeToEnvironmentFile: + publishedAppId: TEAMS_APP_PUBLISHED_APP_ID diff --git a/samples/da-smart-router-multiagent/workers/proposal-generator/.vscode/extensions.json b/samples/da-smart-router-multiagent/workers/proposal-generator/.vscode/extensions.json new file mode 100644 index 000000000..aac0a6e34 --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/proposal-generator/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "TeamsDevApp.ms-teams-vscode-extension" + ] +} diff --git a/samples/da-smart-router-multiagent/workers/proposal-generator/.vscode/launch.json b/samples/da-smart-router-multiagent/workers/proposal-generator/.vscode/launch.json new file mode 100644 index 000000000..de1b02ec6 --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/proposal-generator/.vscode/launch.json @@ -0,0 +1,27 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Preview in Copilot (Edge)", + "type": "msedge", + "request": "launch", + "url": "https://www.office.com/chat?auth=2", + "presentation": { + "group": "remote", + "order": 1 + }, + "internalConsoleOptions": "neverOpen" + }, + { + "name": "Preview in Copilot (Chrome)", + "type": "chrome", + "request": "launch", + "url": "https://www.office.com/chat?auth=2", + "presentation": { + "group": "remote", + "order": 2 + }, + "internalConsoleOptions": "neverOpen" + } + ] +} diff --git a/samples/da-smart-router-multiagent/workers/proposal-generator/.vscode/settings.json b/samples/da-smart-router-multiagent/workers/proposal-generator/.vscode/settings.json new file mode 100644 index 000000000..429962025 --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/proposal-generator/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + "debug.onTaskErrors": "abort", + "json.schemas": [ + { + "fileMatch": [ + "/aad.*.json" + ], + "schema": {} + } + ] +} diff --git a/samples/da-smart-router-multiagent/workers/proposal-generator/appPackage/color.png b/samples/da-smart-router-multiagent/workers/proposal-generator/appPackage/color.png new file mode 100644 index 000000000..11e255fa0 Binary files /dev/null and b/samples/da-smart-router-multiagent/workers/proposal-generator/appPackage/color.png differ diff --git a/samples/da-smart-router-multiagent/workers/proposal-generator/appPackage/declarativeAgent.json b/samples/da-smart-router-multiagent/workers/proposal-generator/appPackage/declarativeAgent.json new file mode 100644 index 000000000..72245c398 --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/proposal-generator/appPackage/declarativeAgent.json @@ -0,0 +1,25 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/copilot/declarative-agent/v1.8/schema.json", + "version": "v1.8", + "name": "Proposal Generator", + "description": "Generates client-specific proposals from the requirements you provide and returns them as a professionally formatted Word document with proper headings and subheadings.", + "instructions": "$[file('instruction.txt')]", + "capabilities": [ + { + "name": "OneDriveAndSharePoint" + }, + { + "name": "CodeInterpreter" + } + ], + "conversation_starters": [ + { + "title": "Draft a proposal", + "text": "Create a proposal for Contoso covering a 12-week data platform migration, with a team of four and a fixed price." + }, + { + "title": "Proposal from requirements", + "text": "Here are the client requirements. Turn them into a structured proposal and return it as a Word document." + } + ] +} diff --git a/samples/da-smart-router-multiagent/workers/proposal-generator/appPackage/instruction.txt b/samples/da-smart-router-multiagent/workers/proposal-generator/appPackage/instruction.txt new file mode 100644 index 000000000..e73f30f64 --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/proposal-generator/appPackage/instruction.txt @@ -0,0 +1,17 @@ +Take the client details, project requirements, and any supporting context the user +provides, and generate a structured client proposal. + +Always include these sections, in this order, using clear section headings: + +Executive Summary +Objectives +Scope of Work +Timeline +Pricing + +Always return the finished proposal as a downloadable Word document with consistent +formatting, proper heading levels, and readable tables where they help. + +If the user has not supplied enough detail to complete a section, ask for the +missing information before generating the document. If the user asks you to proceed +anyway, write TBD in the affected section rather than inventing details. diff --git a/samples/da-smart-router-multiagent/workers/proposal-generator/appPackage/manifest.json b/samples/da-smart-router-multiagent/workers/proposal-generator/appPackage/manifest.json new file mode 100644 index 000000000..7ba798d9a --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/proposal-generator/appPackage/manifest.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/teams/v1.30/MicrosoftTeams.schema.json", + "manifestVersion": "1.30", + "version": "1.0.0", + "id": "${{TEAMS_APP_ID}}", + "developer": { + "name": "Contoso", + "websiteUrl": "https://www.example.com", + "privacyUrl": "https://www.example.com/privacy", + "termsOfUseUrl": "https://www.example.com/termsofuse" + }, + "icons": { + "color": "color.png", + "outline": "outline.png" + }, + "name": { + "short": "Proposal Generator", + "full": "Proposal Generator - Smart Router worker agent" + }, + "description": { + "short": "Generates client proposals and returns them as formatted Word documents.", + "full": "Worker agent for the Smart Router multi-agent sample. Takes client details and project requirements and generates a structured proposal covering executive summary, objectives, scope of work, timeline, and pricing, returned as a formatted Word document." + }, + "accentColor": "#FFFFFF", + "copilotAgents": { + "declarativeAgents": [ + { + "id": "declarativeAgent", + "file": "declarativeAgent.json" + } + ] + }, + "permissions": [ + "identity", + "messageTeamMembers" + ], + "validDomains": [] +} diff --git a/samples/da-smart-router-multiagent/workers/proposal-generator/appPackage/outline.png b/samples/da-smart-router-multiagent/workers/proposal-generator/appPackage/outline.png new file mode 100644 index 000000000..f7a4c8644 Binary files /dev/null and b/samples/da-smart-router-multiagent/workers/proposal-generator/appPackage/outline.png differ diff --git a/samples/da-smart-router-multiagent/workers/proposal-generator/env/.env.dev b/samples/da-smart-router-multiagent/workers/proposal-generator/env/.env.dev new file mode 100644 index 000000000..8d47b877c --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/proposal-generator/env/.env.dev @@ -0,0 +1,8 @@ +# This file includes environment variables that will be committed to git by default. + +# Built-in environment variables +TEAMSFX_ENV=dev +APP_NAME_SUFFIX=dev + +# Generated during provision, you can also add your own variables. +TEAMS_APP_ID= diff --git a/samples/da-smart-router-multiagent/workers/proposal-generator/m365agents.yml b/samples/da-smart-router-multiagent/workers/proposal-generator/m365agents.yml new file mode 100644 index 000000000..607855d98 --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/proposal-generator/m365agents.yml @@ -0,0 +1,83 @@ +# yaml-language-server: $schema=https://aka.ms/teams-toolkit/v1.8/yaml.schema.json +# Visit https://aka.ms/teamsfx-v5.0-guide for details on this file +# Visit https://aka.ms/teamsfx-actions for details on actions +version: v1.8 + +additionalMetadata: + sampleTag: pnp-copilot-pro-dev:da-smart-router-multiagent + +environmentFolderPath: ./env + +# Triggered when 'teamsapp provision' is executed +provision: + # Creates a Teams app + - uses: teamsApp/create + with: + # Teams app name + name: Proposal Generator${{APP_NAME_SUFFIX}} + # Write the information of created resources into environment file for + # the specified environment variable(s). + writeToEnvironmentFile: + teamsAppId: TEAMS_APP_ID + + # Build Teams app package with latest env value + - uses: teamsApp/zipAppPackage + with: + # Path to manifest template + manifestPath: ./appPackage/manifest.json + outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + outputFolder: ./appPackage/build + # Validate app package using validation rules + - uses: teamsApp/validateAppPackage + with: + # Relative path to this file. This is the path for built zip file. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Apply the Teams app manifest to an existing Teams app in + # Teams Developer Portal. + # Will use the app id in manifest file to determine which Teams app to update. + - uses: teamsApp/update + with: + # Relative path to this file. This is the path for built zip file. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Extend your Teams app to Outlook and the Microsoft 365 app + - uses: teamsApp/extendToM365 + with: + # Relative path to the build app package. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Write the information of created resources into environment file for + # the specified environment variable(s). + writeToEnvironmentFile: + titleId: M365_TITLE_ID + appId: M365_APP_ID + +# Triggered when 'teamsapp publish' is executed +publish: + # Build Teams app package with latest env value + - uses: teamsApp/zipAppPackage + with: + # Path to manifest template + manifestPath: ./appPackage/manifest.json + outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + outputFolder: ./appPackage/build + # Validate app package using validation rules + - uses: teamsApp/validateAppPackage + with: + # Relative path to this file. This is the path for built zip file. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Apply the Teams app manifest to an existing Teams app in + # Teams Developer Portal. + # Will use the app id in manifest file to determine which Teams app to update. + - uses: teamsApp/update + with: + # Relative path to this file. This is the path for built zip file. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Publish the app to + # Teams Admin Center (https://admin.teams.microsoft.com/policies/manage-apps) + # for review and approval + - uses: teamsApp/publishAppPackage + with: + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Write the information of created resources into environment file for + # the specified environment variable(s). + writeToEnvironmentFile: + publishedAppId: TEAMS_APP_PUBLISHED_APP_ID diff --git a/samples/da-smart-router-multiagent/workers/sales-faq/.vscode/extensions.json b/samples/da-smart-router-multiagent/workers/sales-faq/.vscode/extensions.json new file mode 100644 index 000000000..aac0a6e34 --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/sales-faq/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "TeamsDevApp.ms-teams-vscode-extension" + ] +} diff --git a/samples/da-smart-router-multiagent/workers/sales-faq/.vscode/launch.json b/samples/da-smart-router-multiagent/workers/sales-faq/.vscode/launch.json new file mode 100644 index 000000000..de1b02ec6 --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/sales-faq/.vscode/launch.json @@ -0,0 +1,27 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Preview in Copilot (Edge)", + "type": "msedge", + "request": "launch", + "url": "https://www.office.com/chat?auth=2", + "presentation": { + "group": "remote", + "order": 1 + }, + "internalConsoleOptions": "neverOpen" + }, + { + "name": "Preview in Copilot (Chrome)", + "type": "chrome", + "request": "launch", + "url": "https://www.office.com/chat?auth=2", + "presentation": { + "group": "remote", + "order": 2 + }, + "internalConsoleOptions": "neverOpen" + } + ] +} diff --git a/samples/da-smart-router-multiagent/workers/sales-faq/.vscode/settings.json b/samples/da-smart-router-multiagent/workers/sales-faq/.vscode/settings.json new file mode 100644 index 000000000..429962025 --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/sales-faq/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + "debug.onTaskErrors": "abort", + "json.schemas": [ + { + "fileMatch": [ + "/aad.*.json" + ], + "schema": {} + } + ] +} diff --git a/samples/da-smart-router-multiagent/workers/sales-faq/appPackage/color.png b/samples/da-smart-router-multiagent/workers/sales-faq/appPackage/color.png new file mode 100644 index 000000000..11e255fa0 Binary files /dev/null and b/samples/da-smart-router-multiagent/workers/sales-faq/appPackage/color.png differ diff --git a/samples/da-smart-router-multiagent/workers/sales-faq/appPackage/declarativeAgent.json b/samples/da-smart-router-multiagent/workers/sales-faq/appPackage/declarativeAgent.json new file mode 100644 index 000000000..34239e770 --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/sales-faq/appPackage/declarativeAgent.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/copilot/declarative-agent/v1.8/schema.json", + "version": "v1.8", + "name": "Sales FAQ", + "description": "Answers common sales questions with fast, clear responses and points to the relevant reference material.", + "instructions": "$[file('instruction.txt')]", + "conversation_starters": [ + { + "title": "Discount process", + "text": "What is our discount approval process for deals above $250,000?" + }, + { + "title": "Quote validity", + "text": "How long does a customer quote stay valid before it needs to be reissued?" + } + ] +} diff --git a/samples/da-smart-router-multiagent/workers/sales-faq/appPackage/instruction.txt b/samples/da-smart-router-multiagent/workers/sales-faq/appPackage/instruction.txt new file mode 100644 index 000000000..74a5b74fa --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/sales-faq/appPackage/instruction.txt @@ -0,0 +1,15 @@ +Respond quickly to standard sales questions using plain, natural language. + +Recognise common keyword-style questions such as "discount process", "quote +validity", "contract terms", "commission", "renewal", and "escalation path", and +answer them directly. + +Keep answers concise. Lead with the answer in one or two sentences, then add a short +bulleted list only when the process genuinely has multiple steps. + +Where a policy document, playbook, or internal page covers the topic in more depth, +provide a link so the user can read further. + +If a question falls outside standard sales process and policy, say so and suggest who +the user should ask instead. Do not guess at approval thresholds, pricing, or +contractual terms that you have not been given. diff --git a/samples/da-smart-router-multiagent/workers/sales-faq/appPackage/manifest.json b/samples/da-smart-router-multiagent/workers/sales-faq/appPackage/manifest.json new file mode 100644 index 000000000..6ab66f152 --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/sales-faq/appPackage/manifest.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/teams/v1.30/MicrosoftTeams.schema.json", + "manifestVersion": "1.30", + "version": "1.0.0", + "id": "${{TEAMS_APP_ID}}", + "developer": { + "name": "Contoso", + "websiteUrl": "https://www.example.com", + "privacyUrl": "https://www.example.com/privacy", + "termsOfUseUrl": "https://www.example.com/termsofuse" + }, + "icons": { + "color": "color.png", + "outline": "outline.png" + }, + "name": { + "short": "Sales FAQ", + "full": "Sales FAQ - Smart Router worker agent" + }, + "description": { + "short": "Answers common sales process and policy questions.", + "full": "Worker agent for the Smart Router multi-agent sample. Answers standard sales questions such as discount approval, quote validity, and contract terms with concise responses and links to the relevant reference material." + }, + "accentColor": "#FFFFFF", + "copilotAgents": { + "declarativeAgents": [ + { + "id": "declarativeAgent", + "file": "declarativeAgent.json" + } + ] + }, + "permissions": [ + "identity", + "messageTeamMembers" + ], + "validDomains": [] +} diff --git a/samples/da-smart-router-multiagent/workers/sales-faq/appPackage/outline.png b/samples/da-smart-router-multiagent/workers/sales-faq/appPackage/outline.png new file mode 100644 index 000000000..f7a4c8644 Binary files /dev/null and b/samples/da-smart-router-multiagent/workers/sales-faq/appPackage/outline.png differ diff --git a/samples/da-smart-router-multiagent/workers/sales-faq/env/.env.dev b/samples/da-smart-router-multiagent/workers/sales-faq/env/.env.dev new file mode 100644 index 000000000..8d47b877c --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/sales-faq/env/.env.dev @@ -0,0 +1,8 @@ +# This file includes environment variables that will be committed to git by default. + +# Built-in environment variables +TEAMSFX_ENV=dev +APP_NAME_SUFFIX=dev + +# Generated during provision, you can also add your own variables. +TEAMS_APP_ID= diff --git a/samples/da-smart-router-multiagent/workers/sales-faq/m365agents.yml b/samples/da-smart-router-multiagent/workers/sales-faq/m365agents.yml new file mode 100644 index 000000000..44cbfb12e --- /dev/null +++ b/samples/da-smart-router-multiagent/workers/sales-faq/m365agents.yml @@ -0,0 +1,83 @@ +# yaml-language-server: $schema=https://aka.ms/teams-toolkit/v1.8/yaml.schema.json +# Visit https://aka.ms/teamsfx-v5.0-guide for details on this file +# Visit https://aka.ms/teamsfx-actions for details on actions +version: v1.8 + +additionalMetadata: + sampleTag: pnp-copilot-pro-dev:da-smart-router-multiagent + +environmentFolderPath: ./env + +# Triggered when 'teamsapp provision' is executed +provision: + # Creates a Teams app + - uses: teamsApp/create + with: + # Teams app name + name: Sales FAQ${{APP_NAME_SUFFIX}} + # Write the information of created resources into environment file for + # the specified environment variable(s). + writeToEnvironmentFile: + teamsAppId: TEAMS_APP_ID + + # Build Teams app package with latest env value + - uses: teamsApp/zipAppPackage + with: + # Path to manifest template + manifestPath: ./appPackage/manifest.json + outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + outputFolder: ./appPackage/build + # Validate app package using validation rules + - uses: teamsApp/validateAppPackage + with: + # Relative path to this file. This is the path for built zip file. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Apply the Teams app manifest to an existing Teams app in + # Teams Developer Portal. + # Will use the app id in manifest file to determine which Teams app to update. + - uses: teamsApp/update + with: + # Relative path to this file. This is the path for built zip file. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Extend your Teams app to Outlook and the Microsoft 365 app + - uses: teamsApp/extendToM365 + with: + # Relative path to the build app package. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Write the information of created resources into environment file for + # the specified environment variable(s). + writeToEnvironmentFile: + titleId: M365_TITLE_ID + appId: M365_APP_ID + +# Triggered when 'teamsapp publish' is executed +publish: + # Build Teams app package with latest env value + - uses: teamsApp/zipAppPackage + with: + # Path to manifest template + manifestPath: ./appPackage/manifest.json + outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + outputFolder: ./appPackage/build + # Validate app package using validation rules + - uses: teamsApp/validateAppPackage + with: + # Relative path to this file. This is the path for built zip file. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Apply the Teams app manifest to an existing Teams app in + # Teams Developer Portal. + # Will use the app id in manifest file to determine which Teams app to update. + - uses: teamsApp/update + with: + # Relative path to this file. This is the path for built zip file. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Publish the app to + # Teams Admin Center (https://admin.teams.microsoft.com/policies/manage-apps) + # for review and approval + - uses: teamsApp/publishAppPackage + with: + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Write the information of created resources into environment file for + # the specified environment variable(s). + writeToEnvironmentFile: + publishedAppId: TEAMS_APP_PUBLISHED_APP_ID