Lesson 2 of 4 Deploying Multi-Agent Solutions

Releasing Across Environments and Rolling Back Safely

This lesson covers environment design, rollback and release management for a multi-agent solution made of many versioned parts, agent definitions, prompts, tools, models, indexes, infrastructure and data, each of which must be reversible.

Learning outcomes

After completing this lesson, you will be able to:

  • Keep environments consistent with infrastructure as code.
  • Identify how each part of a solution is versioned and rolled back.
  • Record release history for release management.

Consistent environments

Each environment has its own Foundry resource or project, model deployments, search indexes, data stores, identities and Key Vault, created from the same infrastructure-as-code templates with environment-specific parameters (names, SKUs, capacities, network settings). Agent definitions, prompts, tool code and evaluation datasets live in source control and are deployed by the pipeline. Manual changes in production are prohibited or detected as drift, because an environment that differs from its definition cannot be reliably reproduced or rolled back.

True or false

Consistent environments

Exam skills 4.3.2

Check how environments are kept consistent and reproducible.

Log in to try this activity Interactive activities are free with an account.

What to version and how to roll back

Rollback must be possible for every part of the solution. The following table lists the parts and how each is rolled back.

PartVersioningRollback
Agent definitions and promptsSource control; Foundry agent versionsRedeploy or reactivate the previous version
Tool and orchestrator codeContainer image tags, revisionsShift traffic to the previous revision
Model deploymentsPinned model versionPoint the deployment name back to the previous model or version
InfrastructureIaC templates in source controlRedeploy the previous template
Indexes and memory schemasSchema versions, index aliasesSwitch the alias back; keep schemas backward compatible

Data is the hardest part to roll back. Index changes are made by building a new index and switching an alias, so the old index remains available. Memory and state schema changes are additive and backward compatible, so the previous code can still read the data. Model versions are pinned and automatic upgrades are disabled in production, because a provider-side upgrade can change behaviour outside the release process.

Match the pairs

Rolling back each part

Exam skills 4.3.2

Match each part of the solution with how it is rolled back.

Log in to try this activity Interactive activities are free with an account.

Release management and rollout

Release management records what was deployed, where, when, by whom and with which test and evaluation results, usually through the pipeline's deployment history and environment approvals. Rollout strategies limit blast radius: by region (one region first), by tenant (internal users or a pilot customer first), or by traffic share (canary). Releases of interdependent agents are coordinated so that contracts between them stay compatible, or each agent accepts both the old and new message formats during the transition.

Scenario questions

Rolling out safely

Exam skills 4.3.2

Choose how to roll out changes and keep agents compatible.

Log in to try this activity Interactive activities are free with an account.
Worked example

A rollback that did not work

After a release that changed an agent's prompt, its tool code and the memory schema, quality dropped. The team redeployed the previous agent version and container image, but the agent now fails when reading memories written during the faulty release.

The memory schema change was not backward compatible. Schema changes should be additive (new optional fields) and deployed separately before code that depends on them, so that previous code versions can still read the data. A migration to restore compatibility is needed now, and the release process should test rollback, not only deployment.

Check yourself

Why pin model versions in every environment?

Show answer

So that an automatic model update cannot change behaviour unnoticed, and a rollback returns to exactly what was tested.

Exam Tips

Remember for the exam

  • Same IaC templates with parameters for every environment; no manual production changes.
  • Version and be able to roll back prompts, agents, code, models, infrastructure and schemas.
  • Pin model versions; keep data schemas backward compatible; test rollback.