Skip to content

Commit cc73d2a

Browse files
authored
Merge pull request #34 from ValerasNarbutas/newsample/resourceassistant
Add resource allocation sample with environment setup and agent configuration
2 parents 1a4926c + a076e4c commit cc73d2a

14 files changed

Lines changed: 409 additions & 0 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# TeamsFx files
2+
env/.env.*.user
3+
env/.env.local
4+
.localConfigs
5+
appPackage/build
6+
7+
# dependencies
8+
node_modules/
9+
10+
# misc
11+
.env
12+
.deployment
13+
.DS_Store
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"recommendations": [
3+
"TeamsDevApp.ms-teams-vscode-extension"
4+
]
5+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Preview in Copilot (Edge)",
6+
"type": "msedge",
7+
"request": "launch",
8+
"url": "https://m365.cloud.microsoft/chat/entity1-d870f6cd-4aa5-4d42-9626-ab690c041429/${agent-hint}?auth=2&developerMode=Basic",
9+
"presentation": {
10+
"group": "remote",
11+
"order": 1
12+
},
13+
"internalConsoleOptions": "neverOpen",
14+
"runtimeArgs": [
15+
"--remote-debugging-port=9222",
16+
"--no-first-run",
17+
"--user-data-dir=${env:TEMP}/copilot-msedge-user-data-dir"
18+
]
19+
},
20+
{
21+
"name": "Preview in Copilot (Chrome)",
22+
"type": "chrome",
23+
"request": "launch",
24+
"url": "https://m365.cloud.microsoft/chat/entity1-d870f6cd-4aa5-4d42-9626-ab690c041429/${agent-hint}?auth=2&developerMode=Basic",
25+
"presentation": {
26+
"group": "remote",
27+
"order": 2
28+
},
29+
"internalConsoleOptions": "neverOpen",
30+
"runtimeArgs": [
31+
"--remote-debugging-port=9223",
32+
"--no-first-run",
33+
"--user-data-dir=${env:TEMP}/copilot-chrome-user-data-dir"
34+
]
35+
}
36+
]
37+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"debug.onTaskErrors": "abort",
3+
"json.schemas": [
4+
{
5+
"fileMatch": [
6+
"/aad.*.json"
7+
],
8+
"schema": {}
9+
}
10+
]
11+
}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Overview of the Resource Assistant agent sample
2+
![Resource assistant start screen](assets/ResourceAssistant.png)
3+
4+
🚀 Resource Allocation Assistant is a Microsoft Teams Declarative AI Agent designed to help managers and project leads assess workloads, identify resource bottlenecks, and optimize task distribution within their teams. This AI-powered agent provides smart workload insights and recommendations based on user input, ensuring balanced work allocation and preventing burnout.
5+
6+
## 🛠 **Features**
7+
**Workload Assessment** – Helps managers evaluate ongoing tasks and resource availability.
8+
**Task Redistribution** – Suggests optimal ways to balance workloads across team members.
9+
**Bottleneck Detection** – Identifies overworked employees and underutilized resources.
10+
11+
## Get started with the template
12+
13+
> **Prerequisites**
14+
>
15+
> To run this app template in your local dev machine, you will need:
16+
>
17+
> - [Node.js](https://nodejs.org/), supported versions: 18, 20
18+
> - A [Microsoft 365 account for development](https://docs.microsoft.com/microsoftteams/platform/toolkit/accounts).
19+
> - [Teams Toolkit Visual Studio Code Extension](https://aka.ms/teams-toolkit) version 5.0.0 and higher or [Teams Toolkit CLI](https://aka.ms/teamsfx-toolkit-cli)
20+
> - [Microsoft 365 Copilot license](https://learn.microsoft.com/microsoft-365-copilot/extensibility/prerequisites#prerequisites)
21+
22+
![image](https://github.com/user-attachments/assets/e1c2a3b3-2e59-4e9b-8335-19315e92ba30)
23+
24+
1. First, select the Teams Toolkit icon on the left in the VS Code toolbar.
25+
2. In the Account section, sign in with your [Microsoft 365 account](https://docs.microsoft.com/microsoftteams/platform/toolkit/accounts) if you haven't already.
26+
3. Create Teams app by clicking `Provision` in "Lifecycle" section.
27+
4. Select `Preview in Copilot (Edge)` or `Preview in Copilot (Chrome)` from the launch configuration dropdown.
28+
5. Once the Copilot app is loaded in the browser, click on the "…" menu and select "Copilot chats". You will see your declarative agent on the right rail. Clicking on it will change the experience to showcase the logo and name of your declarative agent.
29+
6. Ask a question to your declarative agent and it should respond based on the instructions provided.
30+
31+
## What's included in the template
32+
33+
| Folder | Contents |
34+
| ------------ | ---------------------------------------------------------------------------------------- |
35+
| `.vscode` | VSCode files for debugging |
36+
| `appPackage` | Templates for the Teams application manifest, the GPT manifest and the API specification |
37+
| `env` | Environment files |
38+
39+
The following files can be customized and demonstrate an example implementation to get you started.
40+
41+
| File | Contents |
42+
| ---------------------------------- | ---------------------------------------------------------------------------- |
43+
| `appPackage/declarativeAgent.json` | Define the behaviour and configurations of the declarative agent. |
44+
| `appPackage/manifest.json` | Teams application manifest that defines metadata for your declarative agent. |
45+
46+
The following are Teams Toolkit specific project files. You can [visit a complete guide on Github](https://github.com/OfficeDev/TeamsFx/wiki/Teams-Toolkit-Visual-Studio-Code-v5-Guide#overview) to understand how Teams Toolkit works.
47+
48+
| File | Contents |
49+
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
50+
| `teamsapp.yml` | This is the main Teams Toolkit project file. The project file defines two primary things: Properties and configuration Stage definitions. |
51+
52+
## Extend the template
53+
54+
- [Add conversation starters](https://learn.microsoft.com/microsoft-365-copilot/extensibility/build-declarative-agents?tabs=ttk&tutorial-step=3): Conversation starters are hints that are displayed to the user to demonstrate how they can get started using the declarative agent.
55+
- [Add web content](https://learn.microsoft.com/microsoft-365-copilot/extensibility/build-declarative-agents?tabs=ttk&tutorial-step=4) for the ability to search web information.
56+
- [Add OneDrive and SharePoint content](https://learn.microsoft.com/microsoft-365-copilot/extensibility/build-declarative-agents?tabs=ttk&tutorial-step=5) as grounding knowledge for the agent.
57+
- [Add Microsoft Graph connectors content](https://learn.microsoft.com/microsoft-365-copilot/extensibility/build-declarative-agents?tabs=ttk&tutorial-step=6) to ground agent with enterprise knowledge.
58+
- [Add API plugins](https://learn.microsoft.com/microsoft-365-copilot/extensibility/build-declarative-agents?tabs=ttk&tutorial-step=7) for agent to interact with REST APIs.
59+
60+
## Addition information and references
61+
62+
- [Declarative agents for Microsoft 365](https://aka.ms/teams-toolkit-declarative-agent)
63+
64+
![](https://m365-visitor-stats.azurewebsites.net/SamplesGallery/da-resource-allocation)
65+
66+
67+
5.78 KB
Loading
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"$schema": "https://developer.microsoft.com/json-schemas/copilot/declarative-agent/v1.2/schema.json",
3+
"version": "v1.2",
4+
"name": "Resource Allocation Assistant",
5+
"description": "Resource Allocation Assistant is a declarative AI Agent that helps managers optimize team workloads and balance resource allocation effectively.",
6+
"instructions": "$[file('instruction.txt')]",
7+
"capabilities": [
8+
{
9+
"name": "OneDriveAndSharePoint"
10+
},
11+
{
12+
"name": "GraphConnectors"
13+
}
14+
],
15+
"conversation_starters": [
16+
{
17+
"title": "Assess Team Workload",
18+
"text": "How many tasks is my team handling? Who is overloaded?"
19+
},
20+
{
21+
"title": "Identify Workload Imbalances",
22+
"text": "Which team members are overloaded, and who has availability?"
23+
},
24+
{
25+
"title": "Optimize Task Distribution",
26+
"text": "How can I redistribute tasks to balance workload across my team?"
27+
},
28+
{
29+
"title": "Manage High-Priority Tasks",
30+
"text": "Which critical tasks need immediate reassignment?"
31+
},
32+
{
33+
"title": "Prevent Burnout & Improve Efficiency",
34+
"text": "How can I reduce team overload while maintaining productivity?"
35+
},
36+
{
37+
"title": "Monitor and Adjust Workload",
38+
"text": "Can you help track workload changes over time and suggest adjustments?"
39+
}
40+
]
41+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
Purpose:
2+
You are an expert Resource Allocation Advisor in Microsoft Teams. Your goal is to help managers balance workloads efficiently by asking structured questions, providing insights, and offering best practices.
3+
4+
Goals:
5+
* Assess workload distribution based on user-provided input.
6+
* Identify overworked and underutilized team members through guided questions.
7+
* Recommend workload balancing strategies without direct system access.
8+
* Provide best practices for assigning tasks, upskilling, or deferring work.
9+
* Help managers document decisions via Teams messages or Planner.
10+
11+
User Interaction Flow:
12+
First, understand the team’s workload. Start by asking:
13+
* "How many active tasks or projects are currently in progress?"
14+
* "Which team members are struggling with too many tasks?"
15+
* "Who in your team has capacity to take on more work?"
16+
17+
Second Identify workload bottlenecks:
18+
* "It looks like [Employee X] has more than [Y] tasks. Should we consider redistributing?"
19+
* "Are there any critical deadlines requiring immediate attention?"
20+
21+
Third Recommend solutions based on input:
22+
* "To improve efficiency, consider shifting [Task A] to [Employee B] who has availability."
23+
* "You may want to upskill [Employee X] in [Skill Y] for better task distribution."
24+
25+
Last Follow up:
26+
* "Would you like to document this in a Teams message?"
27+
* "Should I set a reminder for a follow-up check-in?"
28+
29+
Overall Direction:
30+
* Always keep responses structured and actionable.
31+
* If the user provides incomplete details, ask follow-up questions.
32+
* Avoid overwhelming users with multiple questions at once—guide them step by step.
33+
* Keep a helpful and proactive tone.
34+
* If asked for automatic task reassignment, suggest best practices instead (since the agent has no direct system access).
35+
* After each response, ask if the user needs further assistance.
36+
* If greeted or asked for capabilities, briefly explain your role and provide examples.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"$schema": "https://developer.microsoft.com/json-schemas/teams/v1.19/MicrosoftTeams.schema.json",
3+
"manifestVersion": "1.19",
4+
"version": "1.0.0",
5+
"id": "${{TEAMS_APP_ID}}",
6+
"developer": {
7+
"name": "Teams App, Inc.",
8+
"websiteUrl": "https://www.example.com",
9+
"privacyUrl": "https://www.example.com/privacy",
10+
"termsOfUseUrl": "https://www.example.com/termofuse"
11+
},
12+
"icons": {
13+
"color": "color.png",
14+
"outline": "outline.png"
15+
},
16+
"name": {
17+
"short": "Resource Allocation",
18+
"full": "Resource Allocation App"
19+
},
20+
"description": {
21+
"short": "Make resource allocation easy",
22+
"full": "Resource Allocation App helps you to allocate resources easily"
23+
},
24+
"accentColor": "#FFFFFF",
25+
"composeExtensions": [],
26+
"permissions": [
27+
"identity",
28+
"messageTeamMembers"
29+
],
30+
"copilotAgents": {
31+
"declarativeAgents": [
32+
{
33+
"id": "declarativeAgent",
34+
"file": "declarativeAgent.json"
35+
}
36+
]
37+
},
38+
"validDomains": []
39+
}
492 Bytes
Loading

0 commit comments

Comments
 (0)