Enablement of Copilot Studio Samples#109
Conversation
|
Temporarily disabling workflow, as its caused by a permissions error. |
|
Looking at second submission option via Copilot Studio VSC Extension which produces a set of YAML Files. |
|
I have added the method of submission, for Copilot Studio for Visual Studio Code samples, since there is two methods of submission. This includes a second agent with example. @sebastienlevert @garrytrinder - would love your reviews. References #100 There is room for improvement for automation, but at this stage wanted to get the ball rolling. |
|
To update from a discussion with @garrytrinder, to
|
Option 1 - Copilot Studio Solution WorkflowThis document explains the export and import workflow for Copilot Studio agent solutions. Solution Export (CONTRIBUTING.md) and Import Process (README-template.MD)graph LR
subgraph export["EXPORT (CONTRIBUTING.md)"]
A["Power Platform<br/>Agent Solution"] -->|Clone| B["pac solution clone<br/>--name MyAgent<br/>--outputDirectory .<br/>--packagetype Unmanaged"]
B --> C["Source Files<br/>in src/"]
C --> D["Ready for<br/>Development"]
end
subgraph import["IMPORT (README-template.md)"]
E["Source Files<br/>in src/"] -->|Pack| F["pac solution pack<br/>--zipfile YourAgent.zip<br/>--folder ./src"]
F --> G["YourAgent.zip<br/>Created"]
G --> H{Environment}
H -->|Default| I["pac solution import<br/>--path YourAgent.zip"]
H -->|Specific| J["pac env list<br/>+ pac solution import<br/>-env environment-guid"]
I --> K["Solution in<br/>Power Platform"]
J --> K
end
D -.->|Develop & Deploy| E
style A fill:#e1f5ff
style D fill:#e8f5e9
style E fill:#e8f5e9
style G fill:#fff3e0
style K fill:#f3e5f5
Export (Clone from Power Platform)The export process uses the Power Platform CLI to clone a solution from your Power Platform environment. Refer to CONTRIBUTING.md for detailed instructions. Command: pac solution clone --name <your-package-name> --outputDirectory . --packagetype UnmanagedImport (Deploy to Power Platform)The import process packages your source files into a solution zip and imports it to Power Platform. Refer to README-template.md for detailed instructions. Commands: # Package the solution
pac solution pack --zipfile <YourAgent>.zip --folder ./mcs-YOUR_AGENT_FOLDER/src
# Import to default environment
pac solution import --path <YourAgent>.zip
# Import to specific environment
pac env list
pac solution import --path <YourAgent>.zip -env <environment-guid>Option 2 - Creating and Deploying Copilot Studio Agents using Visual Studio Code ExtensionCopilot Studio VS Code Extension WorkflowThis document explains the creation and deployment workflow for Copilot Studio agents using the Visual Studio Code extension. Agent Creation and Deployment Processgraph LR
subgraph create["CREATE (CONTRIBUTING.md)"]
A["Scaffold Sample<br/>from Template"] -->|Clone/Create| B["Build Agent with<br/>VS Code Extension"]
B --> C["YAML Files<br/>in src/"]
C --> D["Finalize Documentation<br/>& Assets"]
D --> E["Ready for<br/>Deployment"]
end
subgraph deploy["DEPLOY (README-template.md)"]
F["YAML Files<br/>in src/"] -->|Open| G["Open src folder<br/>in VS Code"]
G --> H["Run: Copilot Studio:<br/>Reattach Agent"]
H --> I["Select Target<br/>Environment"]
I --> J["Agent Reattached<br/>to Environment"]
J --> K["Live in<br/>Power Platform"]
end
E -.->|Deploy| F
style A fill:#e1f5ff
style E fill:#e8f5e9
style F fill:#e8f5e9
style J fill:#fff3e0
style K fill:#f3e5f5
Create (Build with VS Code Extension)The creation process uses the Visual Studio Code extension to build your Copilot Studio agent. Refer to CONTRIBUTING.md for detailed contribution guidelines. Steps:
Deploy (Reattach Agent with VS Code Extension)The deployment process uses the VS Code extension to reattach your agent to a Power Platform environment. Refer to README-template.md for detailed deployment instructions. Steps:
File Structure |
|
We discussed last week about deciding on which approach to take. The pp-cli approach creates files during the export that are not readable by humans, but are complete solutions (can include additional resources), whereas the Copilot Studio VS Code extension generates readable and editable files but only applies to the agent and does not include additional resources. |
|
I have removed the guidance from this PR (we can already refer in future). Right ready to merge. |
--- Copilot Review
This pull request introduces several new Microsoft 365 Copilot agent samples to
.github/samples.json, updates contribution documentation to support Copilot Studio samples, improves PowerShell scripting for path handling, and adds a workflow to block zip files in the samples directory. The most important changes are summarized below:Documentation Updates:
CONTRIBUTING.mdto clarify support for Copilot Studio (MCS) samples, including new folder structure guidelines and instructions for exporting solution contents using Power Platform CLI. Also updated sample naming conventions and README template references. [1] [2] [3]Repository Automation:
.github/workflows/no-zip-in-samples.yml) that scans thesamples/**directory for.zipfiles and comments on pull requests if any are found, enforcing the policy against including zip archives in sample submissions.PowerShell Script Improvements:
.github/Generate-SampleList.ps1to useJoin-Pathfor more robust and cross-platform path handling when referencing files and directories. [1] [2] [3]Sample List Update:
README.mdto include the new "Adaptive Card dialog" sample in the sample list table.