Lesson 2 of 5 ALM for AI Solutions

Designing ALM for Copilot Studio Agents

This lesson explains solutions, connection references, environment variables, pipelines and source control for agents.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe what solutions include and what must be added.
  • Explain connection references and environment variables.
  • Describe how pipelines and Git integration deploy agents.

Solutions and their contents

Copilot Studio agents are stored in Dataverse and moved between environments in solutions. Agents should be built in a custom solution rather than the default solution, because only a custom solution can be exported to move agents between environments. Export requires at least the System Customizer role. The agent's instructions are included automatically, but related components, such as agent flows, environment variables, connection references and custom connectors, must be added to the solution, for example with Add existing or Add required objects. Custom connectors must be imported before the solution that holds connection references to them.

Several details commonly appear in exam scenarios.

  • Solutions are unmanaged by default. Development environments hold unmanaged solutions; test and production should receive managed solutions.
  • After import, user authentication must be configured again, and the agent must be published before it is shared. The icon and channel details may need to be set again.
  • Some knowledge sources stored as separate resources may not be included; check knowledge after import.
  • Topic names containing periods block export, and agents with more than 250 topics or 100 entities should use the classic export path.

Connections, connection references and environment variables

Agents reach other systems through connectors, and the connection details differ in each environment. A connection reference lets a solution refer to a connection without containing it, so that each environment binds the reference to its own connection, such as a test account in test and a production account in production. An environment variable holds a value that differs by environment, such as the URL of a SharePoint knowledge site or an API endpoint. Designing these from the start is what makes an agent deployable without manual edits in each environment.

Pipelines and source control

Pipelines in Power Platform automate deployment of solutions from development through test to production. A pipeline is configured in a host environment, which should be a production environment and cannot also be the development environment. Target environments must be managed environments, and from October 2026 administrators are notified about pipelines that deploy to unmanaged targets, with deployments blocked after a notice period. Pipelines deploy managed solutions, export and store the artifacts automatically, and pass the same artifact through each stage in order, so that what was tested is what reaches production. Approvals are configured through delegated deployments, which can run as service principals. Pipelines do not support cross-tenant deployment, and they deploy one solution at a time.

Native Git integration connects development environments to Azure DevOps or GitHub, so that unmanaged solution changes are committed to source control and managed solutions are built from source. The following table summarizes a typical design.

EnvironmentSolution statePurpose
Development (one per maker or team)Unmanaged, connected to GitBuild and unit test
TestManaged, deployed by pipelineRegression, end-to-end and acceptance testing
ProductionManaged, deployed by pipeline with approvalLive use
Worked example

Fixing an agent release process

A company's Copilot Studio agent was built in the default solution in a production environment. Makers edit it directly, and a recent change broke the order lookup tool during business hours. The agent uses a SharePoint knowledge site and a SQL Server connector. What ALM process should you recommend?

The agent should be moved into a custom solution in a development environment, with the agent flows, connection references for the SQL Server connector and an environment variable for the SharePoint site added to the solution. Development uses Git integration. A pipeline, hosted in a production environment, deploys the managed solution to a managed test environment for regression testing and then, with an approval, to a managed production environment, binding each connection reference and environment variable to that environment's values. After deployment, authentication is checked and the agent is published. Direct edits in production stop.

Check yourself

What must be done to an agent after its solution is imported into a new environment?

Show answer

Configure user authentication again and publish the agent before sharing it.

Exam Tips

Remember for the exam

  • Build agents in a custom solution; add flows, connection references, environment variables and custom connectors.
  • Deploy managed solutions to test and production; reconfigure authentication and publish after import.
  • Pipeline targets must be managed environments; the host should be a production environment.
  • Pipelines pass the same artifact through stages and support delegated approvals; no cross-tenant deployment.