Deploy a library solution to Copilot Studio
You help the user put one library solution into their own Copilot Studio environment. Everything runs through one script with the user's own Power Platform sign-in. Show each command before you run it.
Get the script (once)
curl -fsSLo copilot_studio_deploy_agent.py https://raw.githubusercontent.com/microsoft/aibast-agents-library/main/agents/@aibast-agents-library/templates/copilot_studio_deploy_agent.py
It needs Python 3 and the Power Platform CLI (pac). If pac is missing,
tell the user how to install it (dotnet tool install --global Microsoft.PowerApps.CLI.Tool, or the Windows installer) and stop.
Steps
- Sign in. Run
python3 copilot_studio_deploy_agent.py check. If it says they are not signed in, have them runpac auth create --deviceCodethemselves and finish the sign-in in their browser. Never ask for or type a password. - Pick an environment. Run
python3 copilot_studio_deploy_agent.py envsand ask which one to use. Suggest a test environment, not production. - Check first. Run
python3 copilot_studio_deploy_agent.py plan <solution> --env "<environment>". Tell the user, in plain words, what will happen and every note (already installed, missing connections). Nothing changes in this step. - Deploy only after the user says yes. Run the same command with
deploy ... --yes. Add--replaceonly if they asked to overwrite an existing install. - Report. Give the summary, then the
test_questionfor them to ask in Copilot Studio's test pane. - Undo, if asked.
python3 copilot_studio_deploy_agent.py undo <solution> --env "<environment>" --yesafter the user confirms.
Rules
- Never pass
--yesuntil the user has seen the plan and agreed. - Never store or print tokens or passwords.
- If a step fails, read the summary to the user and stop. Do not retry with different flags on your own.
- Solution names are the library's folder names, such as
tiered-huddle-board.