MSBA-312 · Lesson 2 of 12 · 19 min

Solutions, pipelines and source control

▶ Video coming soon A video version of this lesson is on the way.

With the environments settled, Bram turned to the question Rasmus Okonjo asked most often: "How does a change get from Yusra's development environment to production, and how do I know exactly what changed?" For the Policy Service Assistant, MSBA-242 had already answered that with a solution called "Policy Service", a two-stage Power Platform pipeline and a release history from 1.3.0 to 1.7.2. The AI council now wanted the same discipline for every solution, including the ones that live partly or wholly in Foundry, and it wanted a single record of change across both platforms. This lesson covers how application lifecycle management (ALM) works for agentic solutions: packaging, moving, versioning and recording change.

What ALM has to carry for AI solutions

Traditional ALM moves code and configuration. AI solutions add three kinds of artifact that are easy to forget. The first is behaviour definitions: agent instructions, topic logic, tool descriptions, prompt text and model settings such as temperature. These change behaviour as much as code does, and a one-word edit to a tool description can change which tool the planner chooses. The second is data that shapes answers: knowledge source configuration, indexes, Dataverse tables used as knowledge, evaluation test sets and grounding documents. The third is models: which base model and version a solution uses, and for custom or fine-tuned models, the training data, training configuration and resulting model artifact.

The AB-100 study guide reflects this. Its ALM skills ask candidates to design the ALM process for data used in AI models and agents; for Copilot Studio agents, connectors and actions; for the Microsoft Foundry Agent Service; for custom AI models; and for AI in Dynamics 365 apps for finance and supply chain and for customer experience and service. Each needs a slightly different mechanism, but the principles are the same: everything that affects behaviour is versioned, every change has an author and a reason, every environment receives the same tested artifact, and you can go back.

A grid with rows for Copilot Studio agents, Foundry agents, custom models, data and knowledge, and Dynamics 365 AI features, and columns for package, version, move and record. Each cell names the mechanism, for example solution, solution version, pipeline and pipeline history for Copilot Studio; agent definition, immutable agent version, CI/CD workflow and Git history for Foundry.
One ALM principle, five mechanisms: each kind of artifact is packaged, versioned, moved and recorded in its own way.

Copilot Studio: solutions and pipelines

For Copilot Studio, the package is a solution. A solution carries the agent with its topics, instructions, knowledge configuration and tools, along with related components: custom connectors, connection references, environment variables, agent flows, Dataverse tables and prompts. Microsoft recommends a custom publisher with its own prefix, so that components are clearly owned; Quillfield uses the prefix qib. Solutions move as managed solutions into test and production, which prevents direct edits downstream and makes removal clean.

Not everything travels. MSBA-242 listed the settings that must be configured again in each environment because they are not solution-aware, including channels, sharing, manual authentication settings, Direct Line and web channel security, and Application Insights. Bram's operating model turned that list into a post-deployment checklist attached to each solution: who configures each item in each environment, and how it is checked. The checklist is short, but forgetting it is the most common reason a solution that passed testing behaves differently in production.

Power Platform pipelines move solutions between environments. A pipeline is defined in a host environment, has an ordered set of stages, deploys the same artifact to every stage, validates connection references and environment variables before deployment, and can require approvals. Delegated deployments run as a service principal or pipeline owner, so the deployed components are owned by a stable identity rather than by whichever maker pressed the button. Pipelines also keep a history of every deployment, which becomes part of the audit trail in Lesson 7. Where needs go beyond pipelines, the Power Platform CLI (pac) and the Power Platform Build Tools for Azure DevOps or GitHub Actions for Power Platform can export, unpack, check and import solutions in a scripted process.

Source control with Git integration

Pipelines record what moved and when, but they do not show line-by-line what changed inside an agent. That is the job of source control. Power Platform's native Git integration connects Dataverse environments to a Git repository in Azure DevOps or GitHub, and makers can start it from the Solutions area in Copilot Studio and other Power Platform apps. There are two binding strategies. Environment binding connects the whole environment, with all its unmanaged solutions, to one repository, branch and folder, and new unmanaged solutions are synchronized automatically. Solution binding connects each solution separately, so different solutions can use different branches or folders, but each new solution must be onboarded and solutions in one environment cannot bind to different repositories.

From a solution, a maker opens Source control, reviews changes, and commits and pushes them; changes in Git can be pulled into connected environments. The result is a readable history of who changed what in an agent's definition. For Quillfield, Bram chose solution binding to a GitHub repository, with a folder per solution, because the AI council wanted Foundry and Power Platform changes in one place. Each commit message references a backlog item, and pull requests are reviewed by a second maker before the solution is promoted.

QuestionWhere the answer lives
Which version of the Policy Service solution is in production?Pipeline deployment history in the pipelines host
Who changed the claims tool description, and when?Git history for the solution folder
Which agent version does the production endpoint serve in Foundry?Foundry agent version and published application record
Which model version is deployed, and under which upgrade policy?Foundry model deployment details
Who changed a role assignment on the production subscription?Azure Activity Log
Which evaluation results supported this release?Release record linking evaluation run to version

Foundry: versions, definitions and CI/CD

Foundry agents follow a different lifecycle. Microsoft's description of it runs from choosing an agent type, creating and testing it, and adding tools and data, through saving versions, tracing, evaluating and publishing, to monitoring and iterating. Prompt agents are defined declaratively with a model, instructions and tools and can be edited in the portal; hosted agents are containerized code built with supported frameworks, deployed and managed by the Agent Service, but not edited in the portal. Each saved version of an agent is immutable, requests can target a specific version for controlled deployment and rollback, and agents are referred to in code as the agent name followed by a colon and the version. Publishing a version as an agent application gives it a stable endpoint, and Microsoft notes that the project's identity permissions do not transfer automatically, so the application's identity needs its own permissions.

Because a portal edit only creates a new version in that project, moving a Foundry agent between development, test and production projects means re-creating the definition in each project. The reliable way to do that is to keep the agent definition (its YAML or code) in Git and create it in each project from a CI/CD workflow. Ngozika's team adopted exactly that pattern. Their GitHub repository holds the submission review agent's definition, a dataset of test submissions and a workflow file. A pull request runs evaluations against the development project; merging to the main branch creates a new version in the test project and runs the full evaluation; a manually approved job then creates the same version in the production project and republishes the application.

Microsoft provides a GitHub Action for AI agent evaluation, in preview, that runs offline evaluations of Foundry agents in a workflow. It sends a dataset of queries to one or more agents identified by name and version, runs selected evaluators from the Foundry catalog, and writes a summary with scores, confidence intervals and, when several agent versions are compared, a pairwise statistical comparison against a baseline. It authenticates through Microsoft Entra ID using OpenID Connect, so the workflow stores no secret. Microsoft advises against running evaluations on every commit to control cost, which is why Quillfield runs them on pull requests and on merges rather than on each push.

jobs:
  evaluate-candidate:
    runs-on: ubuntu-latest
    environment: foundry-test
    permissions:
      id-token: write
      contents: read
    steps:
      - uses: actions/checkout@v4
      - uses: azure/login@v2
        with:
          client-id: ${{ vars.AZURE_CLIENT_ID }}
          tenant-id: ${{ vars.AZURE_TENANT_ID }}
          subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}
      - uses: microsoft/ai-agent-evals@v3-beta
        with:
          azure-ai-project-endpoint: ${{ vars.TEST_PROJECT_ENDPOINT }}
          deployment-name: ${{ vars.JUDGE_DEPLOYMENT }}
          agent-ids: submission-review:14,submission-review:15
          data-path: ${{ github.workspace }}/evals/submissions.json

The Azure resources around the agent, such as the Foundry resource, projects, model deployments, Key Vault and Application Insights, belong in source control too, as infrastructure as code (for example Bicep or Terraform templates). Kwabena keeps Quillfield's in the same repository, so that creating the test project and the production project used the same template, and a change to a model deployment's version appears in a pull request rather than in a portal click.

ALM for data, knowledge and custom models

Data is where AI ALM is weakest in most organizations. Three practices help. First, version the definitions of data sources even when the data itself cannot be versioned: the SharePoint libraries an agent uses, the index configuration, the Dataverse table schema, and the filters that limit what is retrieved. Second, version evaluation data alongside the solution, because a test set is part of the definition of "working". Quillfield stores Copilot Studio test sets as exported CSV files in the same Git folder as the solution. Third, control content changes in knowledge sources with an owner and a review step. When a procedure page changes, the agent's answers change, even though no one touched the agent.

Custom models, such as a classifier trained on Quillfield's submissions or a fine-tuned model, add the need to track lineage: which data, which code and which settings produced which model, and which evaluation results it achieved. Azure Machine Learning and Foundry keep model registries and job histories that record this, and the ALM process should require that a model can be traced back to its training data snapshot and forward to every deployment that uses it. Ngozika's team was not yet training models, but Bram wrote the rule into the operating model before they started.

Dynamics 365 AI features

AI features in Dynamics 365 apps follow the app's ALM. For customer experience and service apps, which run on Dataverse, configuration such as case management agent settings, knowledge settings and Copilot feature settings is managed per environment, and customizations travel in solutions through the same pipelines as Copilot Studio agents. For finance and supply chain apps, code and extensions move as deployable packages through the app's own lifecycle, while AI features are mostly configured per environment. In both cases the architect's job is the same: list which AI settings are solution-aware and which must be set in each environment, and put the second group on a post-deployment checklist.

Worked problem

A change that crosses platforms

Yusra wants the Policy Service Assistant to send commercial submissions to version 15 of the Foundry submission review agent instead of version 14. Which artifacts change, and in what order should they move?

Show solution
  1. Foundry: version 15 is created in development from the definition in Git, evaluated on the pull request and created in test on merge.
  2. Copilot Studio: the connected-agent reference is held in an environment variable, so only the variable's value changes per environment, not the solution.
  3. Test: set the test environment variable to the test project's version 15 endpoint and run the Policy Service evaluation set end to end.
  4. Production: create version 15 in the production project first, then update the production environment variable through the pipeline's deployment settings.
  5. Record the release with both versions, the evaluation run identifiers and the rollback step (set the variable back to version 14).

Answer: The Foundry version moves first through its CI/CD workflow, then the Copilot Studio side changes only an environment variable; both are recorded in one release with a rollback that is a single setting.

A single change record

The last piece is connecting the records. Quillfield's operating model requires every release, on either platform, to have a release record: a short entry in a SharePoint list that links the backlog item, the Git pull request, the pipeline deployment or Foundry workflow run, the evaluation results, the approver and the rollback plan. It is deliberately simple. Wendell Pike-Amari, the compliance officer, can answer "what changed in the certificates agent in October, and who approved it?" from one list without learning Git or the pipelines host.

Common mistakes

  • MistakeTreating instructions, tool descriptions and prompts as settings rather than code.

    InsteadVersion them in solutions and Git, review changes and test them like code.

  • MistakeAssuming everything in a solution travels.

    InsteadKeep a post-deployment checklist for channels, sharing, authentication and telemetry settings.

  • MistakeEditing Foundry production agents in the portal.

    InsteadKeep definitions in Git and create versions in each project from a CI/CD workflow with approvals.

  • MistakeRunning full evaluations on every commit.

    InsteadRun them on pull requests, merges and releases, and keep quick checks for every change.

  • MistakeKeeping change history in several tools with no link between them.

    InsteadCreate one release record that links backlog, Git, deployment, evaluation and approval.

Summary and key terms

  • AI ALM must carry behaviour definitions, data that shapes answers, and models, not only code.
  • Copilot Studio agents move in managed solutions through Power Platform pipelines, with a checklist for settings that are not solution-aware.
  • Git integration connects environments or individual solutions to Azure DevOps or GitHub, giving a line-by-line history of agent changes.
  • Foundry agent versions are immutable; definitions in Git and CI/CD workflows create the same version in each project, gated by evaluations.
  • Custom models need lineage from training data to deployment; data sources and test sets need versioned definitions and owners.
  • A single release record links every artifact of a change for audit and rollback.
Application lifecycle management (ALM)
The practices and tools for managing a solution from build through test, release, operation and retirement.
Managed solution
A solution imported in a locked state into downstream environments, removed cleanly as a unit.
Environment binding
A Git integration mode that connects a whole environment and its unmanaged solutions to one repository location.
Solution binding
A Git integration mode that connects each solution to its own branch or folder.
Agent version
An immutable saved state of a Foundry agent that requests can target directly.
Model lineage
The record linking a custom model to its training data, code, settings, evaluations and deployments.
Release record
A single entry that links a change's backlog item, source changes, deployment, evaluation evidence, approval and rollback plan.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. Name two Copilot Studio settings that must be configured again after a solution import.

    Show answer

    Any two of channels, sharing, manual authentication settings, Direct Line or web channel security, and Application Insights.

  2. How is a Foundry agent moved from test to production?

    Show answer

    By creating the same definition as a new version in the production project, usually from a CI/CD workflow, then publishing it.

  3. Why store test sets in Git?

    Show answer

    Because they define what working means for the solution and must change together with it.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz