Lesson 6 of 6 Agentic AI Workflows

Versioning and Releasing Agents Through Pipelines

This lesson explains how agents, whose instructions, tools, models and code change often, get the same release discipline as models and applications, with versions, automated tests and safe promotion and rollback.

Learning outcomes

After completing this lesson, you will be able to:

  • Use versions and aliases in Bedrock Agents.
  • Version agents in AgentCore Runtime.
  • Build automated agent pipelines with rollback.

Versions and aliases in Bedrock Agents

A Bedrock agent has a working draft (DRAFT) that is edited and tested. Preparing the agent and creating a version takes an immutable snapshot of its configuration. An alias points to a version, and applications invoke the alias. Promoting a new version or rolling back means updating the alias to point to another version, with no application change. Typical aliases are dev, staging and prod.

The following diagram shows the versions and alias of a support agent and how a faulty release is rolled back.

Rolling back the support agent. Applications invoke the prod alias. After version 12 was promoted, a renamed action-group parameter pushed tool errors from 2% to 11%; pointing the alias back to version 11 took seconds and needed no change to client code. A new evaluation scenario and a tool-error alarm now gate promotion.
Earlier version numbers are illustrative.
True or false

Versions and aliases

Exam skills 3.3.8

Check how Bedrock Agents versions and aliases work.

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

Versions in AgentCore Runtime

AgentCore Runtime agents are versioned in a similar way to Bedrock Agents. Each update of an agent creates a new, immutable version, and endpoints point to specific versions. A default endpoint follows the latest version, which suits development.

Named endpoints, such as prod, are moved to a new version explicitly, after testing, which gives the same promotion and rollback control as aliases: rolling back means pointing the endpoint at the previous version.

Automated agent pipelines

A CI/CD pipeline for agents typically: builds the agent container or configuration from the repository; runs unit tests on tool code; deploys a new version to a test alias or endpoint; runs an evaluation suite of scenarios scored for task success, correct tool use, safety and cost (with LLM-as-a-judge or AgentCore Evaluations); requires approval; then moves the production alias or endpoint. The previous version stays available for instant rollback. The following table summarises the mechanisms.

PlatformImmutable unitPointer used by applicationsRollback
Bedrock AgentsVersionAliasPoint alias to previous version
AgentCore RuntimeVersionEndpointPoint endpoint to previous version
Prompts (Prompt Management)Prompt versionVersion ARN in configReference previous version
Put in order

An agent release pipeline

Exam skills 3.3.8

Arrange the stages of an automated agent release.

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

A bad release

After version 12 of a support agent is promoted, the share of conversations ending with a tool error rises from 2% to 11%: a changed action-group schema renamed a parameter.

  • Roll back immediately by pointing the prod alias to version 11.
  • Add an evaluation scenario that calls the changed tool and checks for success.
  • Add a CloudWatch alarm on tool error rate for the alias that blocks promotion in the pipeline.

Because applications call the alias, rollback took seconds and needed no redeployment of client code. Had applications called the draft directly, the faulty change would have reached users as soon as it was saved.

Check yourself

How is an agent release rolled back?

Show answer

By pointing the alias or endpoint back to the previous immutable version.

Exam Tips

Remember for the exam

  • Applications should call agent aliases or endpoints, never the draft.
  • Promote or roll back by repointing the alias or endpoint.
  • Agent versions are immutable snapshots.
  • Run scenario evaluations before promoting a new version.
  • Alarm on tool error rates per version.