copilot-studio-workflow

작성자: microsoft

Copilot Studio 에이전트를 빌드, 동기화, 패키징 및 배포하기 위한 개발 워크플로입니다. Copilot Studio YAML 파일로 작업할 때 이 스킬을 사용하세요…

npx skills add https://github.com/microsoft/fasttrack --skill copilot-studio-workflow

Copilot Studio Workflow

Overview

  • Copilot Studio agents are YAML-first assets (.mcs.yml) that sync between a local repo and the cloud.
  • Treat the development/demo environment as the real working environment and the production environment as a packaged distribution target.
  • Keep generic placeholder URLs in git (for example contoso.sharepoint.com); real demo URLs belong only in the live environment.
  • Follow the proven loop: pull → revert env-specific files → edit → push → publish → test → commit.

Prerequisites & First-Time Setup

When starting work on a Copilot Studio project for the first time, verify the following tools are installed and configured. Run .\scripts\cps-status.ps1 for a quick health check.

Required

ToolPurposeInstall
GitSource control for agent YAML filesgit-scm.com
VS CodeEditor for YAML and local developmentcode.visualstudio.com
Copilot Studio VS Code ExtensionPull/push agent YAML between local files and cloud environmentsVS Code Marketplace
Power Platform environmentA Copilot Studio-enabled environment to develop inPower Platform admin center

Recommended

ToolPurposeInstall
Power Platform CLI (pac)Solution export/import, component managementMicrosoft docs
Copilot Studio Plugin (by Microsoft CAT Team)YAML authoring, schema validation, topic creation, agent testing, push/pull management — 30+ specialized skillscopilot plugin marketplace add microsoft/skills-for-copilot-studio then copilot plugin install copilot-studio@skills-for-copilot-studio
PowerShell 7+Cross-platform script executiongithub.com/PowerShell

How this skill relates to the Copilot Studio Plugin: The CAT Team plugin handles YAML authoring, schema validation, and agent management. This workflow skill handles the surrounding engineering workflow — source control, environment sync, solution packaging, and platform gotchas. They are complementary: install both for the best experience.

First session checklist

  1. Run .\scripts\cps-status.ps1 to detect the project and check tool availability.
  2. Install the Copilot Studio Plugin if not already installed (see Recommended table above).
  3. If no agent.mcs.yml exists, clone an agent from the cloud using the VS Code extension or Copilot Studio manage flow.
  4. If pac CLI is needed for solution packaging, authenticate: pac auth create --environment <URL>.
  5. Verify the VS Code Copilot Studio extension can connect to your environment (open the agent folder, Sync → Pull).

Development Loop

  1. Pull from cloud using the VS Code Copilot Studio extension (Sync → Pull) or the Copilot Studio manage flow.
  2. Revert workflow files immediately. Cloud pulls often inject environment-specific URLs into workflows/*.json and settings.mcs.yml. Run .\scripts\cps-revert.ps1 (or git checkout -- **/workflows/ **/settings.mcs.yml) before reviewing diffs.
  3. Edit locally in .mcs.yml files: topics, actions, variables, instructions, triggers, and agent settings.
  4. Push to cloud with the VS Code extension (Sync → Push) or manage-agent tooling.
  5. Publish in Copilot Studio so the draft becomes live.
  6. Test in the real channel (Teams or Microsoft 365 Copilot). The test pane is useful for quick checks, but it is not representative of production behavior.
  7. Commit to git only after the live agent behaves correctly and workflow files are clean.

Solution Packaging

  • Use pac solution export to export the solution from the demo environment.
  • The solution should include the agent, Power Automate flows, and connection references.
  • For production distribution: export → unpack → scrub environment URLs → repack as a clean zip.
  • Teams import the solution zip, reconnect dependencies, re-enable flows, and follow the setup guide.

Adding New Components

  • A VS Code push creates Dataverse components, but it does not add new bot components to the Power Platform solution.
  • Add them explicitly with pac solution add-solution-component -sn <SOLUTION> -c <GUID> -ct botcomponent.
  • Find the component GUID with pac org fetch against botcomponent records.
  • Use .\scripts\cps-add-component.ps1 for guided lookup and add-to-solution flow.

Platform Gotchas

Initialization

  • OnConversationStart does not fire in Microsoft 365 Copilot and usually fires only once in Teams. Use OnActivity(type: Message) plus an IsBlank() just-in-time guard instead.
  • Copilot Studio does not stream partial messages; the platform batches output.

Packaging

  • VS Code push ≠ solution membership. New components must be added to the solution separately.
  • Global variables need YAML definitions in variables/ or solution imports can fail or create broken references.
  • Solution import deactivates Power Automate flows; always re-enable them after import.
  • Cloud pull brings environment-specific URLs into workflow files; always revert them before commit.
  • Extension push/pull is all-or-nothing; there is no selective sync.

Development

  • ConcurrencyVersionMismatch on push usually means someone changed the cloud copy. Pull again before pushing.
  • The Copilot Studio test pane does not match real channel behavior; validate in Teams or Microsoft 365 Copilot.
  • Housekeeping flow push error 0x80040216 is a known benign issue.

Deployment

  • Export scripts capture the state that exists at export time. Do not run packaging scripts after a YAML push unless you intend to rebuild from that exact state.
  • pac component type codes are brittle across environments; prefer the name-based -ct botcomponent pattern in your workflow.

Best Practices

Agent Architecture

  • Use a constitution file pattern (markdown files in SharePoint or OneDrive) for dynamic instructions — edit behavior without YAML surgery.
  • Keep agent instructions concise in agent.mcs.yml; load detailed context via global variables populated at runtime by a Power Automate flow.
  • Use OnActivity(type: Message) with an IsBlank() JIT guard for reliable context initialization across all channels (Teams, M365 Copilot).

YAML Hygiene

  • One topic per file. Name files to match the topic's purpose (for example Greeting.mcs.yml, EscalateToHuman.mcs.yml).
  • Define all global variables explicitly in variables/ with YAML files — never rely on UI-only definitions.
  • Use descriptive schemaName values — they appear in Dataverse queries and logs.

Testing

  • Always test in the real channel (Teams or M365 Copilot), not just the test pane.
  • MCP tools, connectors, and OAuth flows only work in published agents on real channels.
  • Use calendar-driven routines (for example [AgentName Routine] Weekly Review) for testing autonomous behaviors.

Solution Packaging

  • Establish a URL placeholder convention from day one (for example contoso.sharepoint.com). Retrofitting is painful.
  • Always revert workflow files after cloud pulls — one missed revert leaks production URLs into source control.
  • After pushing new components via VS Code, explicitly add them to the solution with pac solution add-solution-component.
  • Re-enable all Power Automate flows after every solution import — imports deactivate them silently.

Memory & State (for agents with persistent memory)

  • Use SharePoint lists for structured memory (facts, preferences, tasks) and markdown files for narrative or journal memory.
  • Design memory with expiration — stale facts degrade agent quality over time.
  • Keep memory scoped (for example preference:timezone, person:manager) for efficient retrieval.

Security & Governance

  • Review all MCP tools and connectors before enabling — each one expands the agent's access surface.
  • Use the KillSwitch pattern (a config flag that halts autonomous behavior) for any agent that acts without user prompting.
  • Audit agent activity through logging lists or flows — autonomous agents need observability.

Included Scripts

  • scripts/cps-status.ps1 — quick project health check: agent info, counts, git state, dirty workflow files, and pac availability.
  • scripts/cps-revert.ps1 — run after every cloud pull to revert workflows/*.json and settings.mcs.yml back to the repo-safe version.
  • scripts/cps-preflight.ps1 — run before push to check workflow hygiene, git state, and missing global variable definitions.
  • scripts/cps-add-component.ps1 — locate a bot component by schema pattern and add it to the Power Platform solution.

Quick Reference

TaskCommand / Path
First-time setup.\scripts\cps-status.ps1
Install pac CLIwinget install Microsoft.PowerPlatformCLI (Windows) or dotnet tool install --global Microsoft.PowerApps.CLI.Tool
Authenticate pacpac auth create --environment <URL>
Clone agent from cloudVS Code extension → open folder → Sync → Pull
Pull from cloudVS Code Copilot Studio extension → Sync → Pull
Push to cloudVS Code Copilot Studio extension → Sync → Push
Revert workflows.\scripts\cps-revert.ps1 or git checkout -- **/workflows/ **/settings.mcs.yml
PublishCopilot Studio → Publish
Pre-push check.\scripts\cps-preflight.ps1
Add component.\scripts\cps-add-component.ps1 -SolutionName "MySolution" -SchemaPattern "my.topic.Name"
Project status.\scripts\cps-status.ps1
Emergency stopSet KillSwitch = true in the config list

References

  • Deep dive: reference/gotchas.md
  • Workflow details: reference/workflow-guide.md

microsoft의 다른 스킬

oss-growth
microsoft
OSS 성장 해커 페르소나
agent-framework-azure-ai-py
microsoft
Microsoft Agent Framework Python SDK(agent-framework-azure-ai)를 사용하여 Azure AI Foundry 에이전트를 구축합니다. AzureAIAgentsProvider로 지속적 에이전트를 만들 때, 호스팅 도구(코드 인터프리터, 파일 검색, 웹 검색)를 사용할 때, MCP 서버를 통합할 때, 대화 스레드를 관리할 때, 또는 스트리밍 응답을 구현할 때 사용합니다. 함수 도구, 구조화된 출력, 다중 도구 에이전트를 다룹니다.
development
airunway-aks-setup
microsoft
AKS에서 AI Runway 설정 — 빈 클러스터에서 실행 중인 모델까지. 클러스터 검증, 컨트롤러 설치, GPU 평가, 공급자 설정, 첫 배포를 다룹니다. 시기: "AI Runway 설정", "AKS 클러스터 온보딩", "AI Runway 설치", "airunway 설정", "AKS에 모델 배포", "AKS에서 GPU 추론", "AKS에서 KAITO 설정", "AKS에서 LLM 실행", "AKS에서 vLLM", "AKS에서 모델 서빙 설정", "AI Runway 컨트롤러".
devops
appinsights-instrumentation
microsoft
Azure Application Insights로 웹앱을 계측하기 위한 지침입니다. 원격 분석 패턴, SDK 설정, 구성 참조를 제공합니다. WHEN: 앱 계측 방법, App Insights SDK, 원격 분석 패턴, App Insights란 무엇인가, Application Insights 지침, 계측 예시, APM 모범 사례.
devops
applicationinsights-web-ts
microsoft
브라우저/웹 앱을 Application Insights JavaScript SDK(@microsoft/applicationinsights-web)로 계측합니다. Real User Monitoring(RUM) — 페이지 뷰, 클릭, AJAX/fetch 종속성, 예외, 사용자 지정 이벤트, 백엔드 OpenTelemetry 트레이스와 상관관계가 있는 브라우저 측 GenAI 에이전트 트레이스에 사용합니다. SDK Loader Script 및 npm 설정, 프레임워크 확장(React, React Native, Angular), Click Analytics, 텔레메트리 이니셜라이저, 브라우저에서 생성된 에이전트/도구/모델 스팬에 대한 OTel GenAI 의미론적 규칙을 다룹니다.
devops
azure-ai-anomalydetector-java
microsoft
Azure AI Anomaly Detector SDK for Java로 이상 탐지 애플리케이션을 구축하세요. 단변량/다변량 이상 탐지, 시계열 분석 또는 AI 기반 모니터링을 구현할 때 사용하세요.
development
azure-ai-language-conversations-py
microsoft
azure-ai-language-conversations Python SDK를 사용하여 대화형 언어 이해(CLU)를 구현합니다. ConversationAnalysisClient로 대화 의도와 엔터티를 분석하거나, NLP 기능을 구축하거나, 애플리케이션에 언어 이해를 통합할 때 사용합니다.
development
azure-ai-ml-py
microsoft
Azure Machine Learning SDK v2 for Python. ML 작업 영역, 작업, 모델, 데이터 세트, 컴퓨팅 및 파이프라인에 사용합니다. 트리거: "azure-ai-ml", "MLClient", "workspace", "model registry", "training jobs", "datasets".
development