Domain 2: Operational reliability
This article describes how to run agents as production systems rather than experiments, covering the testing, observability, and rollback practices that keep agent behavior predictable as prompts, models, and integrations change, along with the containment and review procedures that apply once something goes wrong. The guidance holds whether your teams own the full agent stack or rely on a managed service.
Agents aren't traditional software. Their behavior is shaped by prompts, model versions, context windows, and tool integrations, any of which can shift over time.
This domain covers two ownership patterns. If you build custom agents on Amazon Bedrock AgentCore, then you own the full operational stack, including versioning, evaluation, model upgrades, and incident response.
If you use AWS DevOps Agent, then AWS provides management of the underlying service and infrastructure, but you still own the configuration, runbooks, and integrations.
The following sections cover how to build and upgrade agents, plan for load and failure, trace multi-agent workflows, and respond when agents fail.
Build, evaluate, and upgrade with confidence
Reliable agent operations start with knowing what's in production, catching quality regressions early, and rolling out model changes without surprises. A change to a prompt, tool definition, or model version can shift behavior in ways that only a baseline and evaluation suite can catch.
Version your agents and configurations
Track every change to prompts, tool definitions, guardrails, model selections, and configurations. Pair version history with the ability to roll back when a change doesn't behave as expected.
For custom agents, Amazon Bedrock AgentCore Runtime versions automatically. Every update creates a new immutable version, and endpoints reference specific versions. The DEFAULT endpoint advances to the latest version automatically. Named endpoints, such as production or staging, only advance when you call the UpdateAgentRuntimeEndpoint API. New deployments flow to DEFAULT for testing while production stays on the proven version. If a promoted version misbehaves, then point production back to the previous version for immediate rollback.
For AWS DevOps Agent, AWS manages prompt selection, model selection, and orchestration versioning. You version what's around the agent: Agent Space definitions, AWS Identity and Access Management (IAM) role configurations, secondary account associations, third-party integration settings, and runbook content. Treat these as infrastructure code. Tracing what changed in those configurations matters as much as tracing prompt changes in custom-built agents when an investigation behaves unexpectedly.
Detect quality regressions before production
Establish AgentOps practices by adapting your existing AWS DevOps disciplines to agents. Test that the agent takes the right actions and reaches acceptable outcomes, and observe if inputs and outputs match deterministic expectations. Build evaluation suites of realistic scenarios with known expected results, and run them in CI/CD on every change to prompts, tool definitions, guardrails, or model versions. Track pass rates, cost per scenario, and latency. Your team must be able to catch a prompt change that improves accuracy but triples token consumption before it ships.
Amazon Bedrock AgentCore Observability emits OpenTelemetry-compatible traces to Amazon CloudWatch. Inspect each step in a workflow, audit intermediate outputs, and find performance bottlenecks through the Generative AI Observability dashboard or Amazon CloudWatch Transaction Search. Set CloudWatch alarms on error rates, latency percentiles, and token consumption so that deviation from the baseline triggers a signal before users notice. Amazon Bedrock AgentCore Evaluations adds systematic quality scoring with built-in and custom evaluators that use large language models (LLM)-as-a-judge.
Online evaluation monitors live production traffic by a percentage or conditional filter. On-demand evaluation assesses specific span or trace IDs. This evaluation is useful for investigating reported issues, validating fixes, and running targeted checks during development. Run on-demand evaluations in your CI/CD pipeline to catch regressions before production. In production, configure online evaluation to track quality trends and investigate low-scoring sessions when scores drop.
For a walkthrough of how the service measures agent accuracy across multiple quality dimensions, see Build reliable AI agents with Amazon Bedrock AgentCore Evaluations. For a deeper exploration of evaluation practices in production, see From AI agent prototype to product: Lessons from building AWS DevOps Agent.
Roll out model upgrades safely
Treat model upgrades like application deployments. A new version can interpret prompts differently, change output formats, shift token consumption, or alter latency. Without baseline metrics, these changes can degrade agent performance or inflate costs unexpectedly.
Before you upgrade, capture five baseline metrics for the current model version:
- Token consumption per request. Track average input and output token counts. A new version might need more tokens to reach similar results, which directly affects cost.
- End-to-end latency. Measure total time from request to final response. AgentCore Runtime shows this measurement as the Latency metric. For streaming responses, also capture time-to-first-token.
- Error rates. Baseline both system errors (server-side) and user errors (client-side). Edge-case handling can shift between versions.
- Output format consistency. Confirm that structured outputs (JSON, tool calls, action plans) are parsable. Format drift can silently break downstream processing.
- Task completion success rate. Run the evaluation suite and record the pass rate. This is the most meaningful baseline because it captures whether the agent reaches the right outcome.
Before you promote the upgrade, test it in development. Update the agent code to reference the new model ID, deploy to a development endpoint, and run scenarios that mirror production. Validate that output formats stay consistent, token consumption stays within range, latency meets requirements, and error rates don't increase. Then, update the production endpoint to the new version. If a problem appears after promotion, then roll back the endpoint with the UpdateAgentRuntimeEndpoint API.
Document model versions as part of the agent configuration. If an issue arises months later, then knowing which version was in use becomes critical for root-cause analysis. Maintain a change log that records model upgrades and prompt and configuration changes because all three can affect behavior.
Plan for load and failure
Agents can quickly become integral to operational workflows. Their unavailability can block incident response, change processing, and service-level commitments. Plan for peak load, graceful degradation, Regional outages, and dependency failures before production reveals them.
Test for peak operational load
Performance testing for agentic workflows validates that quota allocations handle peak operational scenarios, not just average response time. Build load profiles around worst-case conditions:
- How many concurrent incidents can the incident response agent handle during a major outage?
- How many tickets can the triage agent process during a surge?
- How many simultaneous investigations can AWS DevOps Agent conduct?
- What happens when agents hit rate limits? Do they queue gracefully, or do they fail?
- How does the system respond when inference latency spikes? Does the application time out, or hang while waiting for a response?
Run load tests that replicate the production trigger pattern in a non-production environment. If the production flow is a CloudWatch alarm that fires an Amazon EventBridge rule to invoke the agent's HTTP endpoint, then the load test must follow the same path. Send concurrent requests with realistic payloads that represent different incident types and severity levels.
Token consumption deserves close attention under load. Agents often consume more tokens for complex scenarios than for simple test cases. If the agent correlates logs across systems or evaluates a complex decision tree, then usage increases. To mitigate this increase, make sure that load tests cover these paths.
Monitor quota consumption during testing. Amazon Bedrock has rate limits and quota allocations that vary by model and AWS Region. If peak load exceeds current quotas, then request increases before production deployment. It’s better to discover the gap in testing than during a critical incident.
Design for graceful degradation
Classify agents by criticality. Agents that handle real-time incident response require different recovery objectives than those that run batch analyses or generate reports. For critical agents, define Recovery Time Objectives (RTOs) and Recovery Point Objectives (RPOs) that align with the workflows that they support.
When foundation models hit capacity constraints or latency spikes, agents must fall back to cached responses, queue requests, or route to human operators rather than fail silently. Implement circuit breakers that detect when models, Model Context Protocol (MCP) servers or backend systems degrade. They can then switch to fallback behavior before failures cascade.
Return distinct error codes for each failure mode. A model timeout, tool invocation failure, and knowledge base retrieval error can each produce a different code. Logs and dashboards make it clear where in the workflow the problem occurred.
Plan for Regional outages
AgentCore Runtime and AWS DevOps Agent are Regional. Agents, configurations, and supporting infrastructure exist in a single Region. AgentCore Runtime's serverless architecture handles scaling within a Region automatically, but a Regional outage still affects availability.
For the most critical agents, deploy to a second Region, either as a warm standby that waits to absorb traffic or as a fully active peer that serves it continuously. For AgentCore-hosted agents, multi-Region deployment involves replicating knowledge bases, memory stores, MCP servers, and configuration in each target Region. For AWS DevOps Agent, provision Agent Spaces in secondary Regions with equivalent account associations, runbook content, and third-party integration settings. That way, you can redirect investigations if there’s an impact to the primary Region.
Map dependencies and inject faults
Map every critical agent's dependencies such as foundation models, MCP servers, knowledge bases, backend systems, and memory stores. Identify single points of failure and the blast radius for each dependency. Include the teams, processes, and runbooks behind those systems. The map drives resilience investments and shapes failure-testing scenarios.
MCP servers can run in AgentCore Runtime as managed containers or connect to Amazon Bedrock AgentCore Gateway as external targets with AWS Lambda functions. AgentCore-managed infrastructure benefits from automatic failover across Availability Zones. Backend systems that your tools connect to (databases, REST APIs, or third-party services) introduce their own failure points. Apply standard resilience practices: Health checks, timeouts, retry with exponential backoff, and caching for hot data. Add load balancing and automated recovery for external MCP servers behind the Gateway.
Use fault injection to find failure patterns before production does. AWS Fault Injection Service (AWS FIS) doesn't directly support Amazon Bedrock or AgentCore. Inject faults into supporting infrastructure instead, such as network latency, Lambda errors, and container disruptions. For components that AWS FIS doesn't cover, use manual fault injection. Misconfigure endpoints, introduce delays in tool responses, or simulate knowledge base unavailability. Confirm that circuit breakers activate, fallback mechanisms engage, and agents degrade gracefully.
Feed dependency maps and fault injection results into operational runbooks. For each critical agent, produce a runbook that covers symptoms in observability data and shows how to confirm the issue, the escalation paths, containment, and recovery. Include not only outages but also incorrect outputs, degraded performance, and unexpected behavior. Include manual fallback procedures so that the team can work without agents. Run tabletop exercises against these runbooks. Detecting a misbehaving agent is often harder than noticing one that's down.
Trace requests across multi-agent workflows
Multi-agent workflows hand requests between agents that delegate tasks and pass context. Without correlation, you can't tell which agent started a workflow, what context the agent passed, or where a chain of decisions went wrong.
Add correlation metadata to every agent
Treat agent instrumentation like any production-distributed system. Include correlation metadata (agent_id, session_id, and trace_id) in structured logs. Propagate trace context through every inter-agent message. Watch for cascading decisions, where one agent's action triggers chains of downstream decisions that amplify errors.
Use AWS X-Ray and CloudWatch Transaction Search
AWS X-Ray provides distributed tracing for multi-agent systems. It uses the X-Amzn-Trace-Id header to propagate trace context across service boundaries and create a causal chain that links operations across agents. For agents on AgentCore Runtime, turn on CloudWatch Transaction Search once. Then, AgentCore Observability emits OpenTelemetry-compatible traces to CloudWatch automatically. You can view these traces through the Generative AI Observability dashboard or CloudWatch Transaction Search.
For agents implemented as Lambda functions, Amazon Elastic Container Service (Amazon ECS) tasks, or other compute services, instrument them with AWS Distro for OpenTelemetry (ADOT) to generate AWS X-Ray traces. Propagate the X-Amzn-Trace-Id header through all inter-agent messages: EventBridge events, Amazon Simple Queue Service (Amazon SQS) messages, Amazon Simple Notification Service (Amazon SNS) notifications, and API calls. Include correlation metadata in structured logs so that logs and traces tie together.
Correlate AWS DevOps Agent investigations with downstream MCP servers
AWS DevOps Agent investigations that reach external systems through connected MCP servers create a tracing consideration. AWS DevOps Agent publishes vended logs and CloudWatch metrics for investigation activity, and the AWS DevOps Agent Journal captures MCP server calls. AWS DevOps Agent manages internal orchestration of MCP tool calls so you don't have to.
On the MCP server side, where you do have control, emit traces and structured logs so that each downstream call from the agent can have end-to-end correlation. Skills that direct AWS DevOps Agent to use specific MCP tools can document expected logging behavior so that you can trace investigation activity from the Agent Space to the resources that those tools touch.
Respond when agents fail
Agents fail like any production system, but the response demands capabilities beyond traditional incident management. You need to know what the agent did, why it did it, and how to prevent the next incident. If the agent stops working, then contain, investigate, review, and retire.
Contain the incident
Establish agent-specific incident classification. An agent that gives a human operator incorrect information differs from one that autonomously executes a harmful action. Define severity levels that account for autonomy. Incidents where agents acted independently typically warrant higher severity than those where humans reviewed and approved the recommendation. Add agent-related categories to the incident taxonomy so that patterns surface over time.
Containment is the first response priority. If an agent is actively causing harm, then stop it immediately. Implement kill switches that turn off specific agents without affecting others. Amazon Bedrock AgentCore Policy can help: Update policies to block specific actions, or revoke agent access to specific tools while you investigate. For agents that aren’t running on AgentCore, equivalent mechanisms apply: Feature flags, configuration changes, or fast deployment rollbacks.
Investigate using your observability data
The traces, logs, and audit trails that you built for compliance become essential during investigation. Reconstruct the agent's execution path: What inputs did it receive, what reasoning did it apply, what tools did it invoke, and what outputs did it reduce? For AgentCore-hosted agents, AgentCore Observability and CloudWatch Transaction Search capture each workflow step, intermediate output, and performance datum through OpenTelemetry-compatible traces. For AWS DevOps Agent, the Agent Journal provides an immutable record of every reasoning step, tool invocations (including MCP server calls), and decisions that the agent made during an investigation. CloudTrail captures all API calls to the AWS DevOps Agent service and tells you when and who triggered an investigation. The data must be complete and immutable. Gaps in the audit trail create gaps in the investigation.
Distinguish agent errors from systemic issues. If an agent makes a wrong action based on correct inputs, then there might be a problem in logic, prompts, or knowledge base content. If an agent takes reasonable actions on incorrect inputs, then there might be a problem in upstream data sources, MCP servers, or knowledge bases. If an agent behaves unexpectedly after a model change, then there might be inadequate testing of model upgrades. Each root cause requires different remediation.
Run agent-specific post-incident reviews
Post-incident reviews must address agent behavior. Beyond what happened, what was the impact and how did we respond? Was the agent operating within its defined boundaries? Did governance controls work as intended? Were there warning signs in observability data that we missed? Did this agent have the autonomy to take this action? Use the answers to these questions to refine agent scoping, policy, and monitoring thresholds.
When an agent causes a problem, there's often a human who approved deployment, configured permissions, or didn’t override a recommendation. Avoid blame. Focus on why that decision looked right at the time and whether the human had the information and tools to make a better one. Agent incidents often reveal gaps in training, tooling, or processes rather than individual failures.
Maintain a runbook specifically for agent incidents. Include procedures for how to turn off a specific agent, roll back to a previous version, revoke credentials, preserve evidence, communicate with affected stakeholders, and escalate to vendor support when there’s foundation model behavior. Test these procedures before you need them, ideally as part of the fault injection program.
Retire and replace agents on a schedule
Agents are not static assets. Without lifecycle management, you can accumulate technical debt.
Establish ownership for every agent. Each agent needs an owner that’s responsible for maintenance, performance, and eventual retirement. Domain specialist agents stay with the specialist's team. For centrally hosted shared agents, the center of excellence might own infrastructure while a domain team owns logic. AWS Agent Registry, available through AgentCore, is a centralized catalog for publishing and discovering agents, MCP servers, tools, and skills, with built-in approval workflows. Record each agent's purpose, owner, dependencies, and workflow consumption so that teams can discover what already exists without duplicating effort.
Track foundation model deprecation. Providers deprecate older versions on a regular cadence. Rushed migrations increase risk, so schedule testing and migration well before the deprecation date. Standardize model versions across the agent portfolio to simplify upgrade cycles, but also recognize that some agents might require specific versions for performance or compatibility.
Monitor agent usage. Agents with declining usage might be candidates for retirement or consolidation. Patterns that diverge from expectations might indicate that the agent isn't meeting user needs. Build dashboards that show invocation trends, success rates, and user feedback for each agent, and review them as part of the operational cadence.
Define retirement criteria. Retire an agent when its purpose no longer exists, a better solution supersedes it, it consistently underperforms, or its maintenance costs more than its value. When you retire an agent, make sure to notify consuming workflows, update documentation, archive configurations, and confirm that no dependencies remain. For shared agents, coordinate with all consuming teams and give sufficient notice to migrate.
← Back to main article | Previous: Governance and compliance | Next: Data access and integration →
About the Author
Brian Simpson-Adkins is a Principal Technical Account Manager (TAM) in AWS Global Financial Services. He has over 20 years of experience in architecture, operations, and automation. Based in Australia, he partners with customers worldwide, and helps them resolve operational challenges through data-driven insights.
- Tags
- AWS DevOps AgentAWS Identity and Access ManagementAWS LambdaAWS Fault Injection ServiceAmazon Bedrock
- Language
- English

Relevant content
AWS OFFICIALUpdated a month ago
AWS OFFICIALUpdated a month ago- Accepted Answer
asked 5 months ago
- Accepted Answer