---
title: "Resilience testing your agents on Amazon Bedrock AgentCore"
description: "AI agents that rely on tools can fail silently or produce confident but incorrect answers when those tools break. This post introduces a method for testing agent resilience by injecting tool-level faults using AWS Fault Injection Service (AWS FIS) and AWS Systems Manager (SSM). Faults are classified into pre-hook faults, which cancel a tool call before execution, and post-hook faults, which corrupt the tool’s response after it runs. The agent runs on Amazon Bedrock AgentCore with the Strands framework, and fault injection is controlled via SSM Parameter Store, enabling dynamic activation without redeployment. Observability is built through Embedded Metric Format and Pydantic constraints, allowing teams to detect safe failures versus silent data corruption in agent behavior."
---

# Resilience testing your agents on Amazon Bedrock AgentCore

[AWS](https://yomu.fyi/company/aws) · Richard Whitworth · Nov 18, 2026

**Type:** Tutorial

## Summary

AI agents that rely on tools can fail silently or produce confident but incorrect answers when those tools break. This post introduces a method for testing agent resilience by injecting tool-level faults using AWS Fault Injection Service (AWS FIS) and AWS Systems Manager (SSM). Faults are classified into pre-hook faults, which cancel a tool call before execution, and post-hook faults, which corrupt the tool’s response after it runs. The agent runs on Amazon Bedrock AgentCore with the Strands framework, and fault injection is controlled via SSM Parameter Store, enabling dynamic activation without redeployment. Observability is built through Embedded Metric Format and Pydantic constraints, allowing teams to detect safe failures versus silent data corruption in agent behavior.

## Context

In production, tools like databases and APIs can fail, and agents may react unpredictably, presenting fabricated answers or raw errors. This tutorial addresses the need to test agent behavior under such conditions using controlled chaos experiments.

## Approach / What changed

Integrate chaos\_plugins() into the agent constructor. Deploy an SSM Automation document (ChaosExperiment) that writes fault configurations to Parameter Store under /chaos/{runtime\_id}/. AWS FIS starts the experiment, setting active=true after writing all parameters. The agent’s controller reads these parameters on each invocation and injects pre-hook faults (cancel tool call with errors like timeout) or post-hook faults (corrupt response with truncate, remove, or corrupt actions). Observability uses Embedded Metric Format to log tool-level outcomes and constraints to validate responses.

## Takeaways

- Pre-hook faults cancel the tool call before execution and return an error (timeout, network\_error, etc.), testing if the agent gracefully handles failures.
- Post-hook faults let the tool run but corrupt its response (truncate\_fields, remove\_fields, corrupt\_values), revealing if the agent unknowingly uses bad data.
- Use Embedded Metric Format and Pydantic constraints to detect corrupted or incomplete tool outputs, enabling alarms on safe failures versus silent data corruption.

## FAQ

### What is the difference between pre-hook and post-hook faults?

Pre-hook faults cancel the tool call before it executes and return an error to the agent. Post-hook faults let the tool run but then corrupt its response, testing whether the agent detects and handles incorrect data.

### How do I define a hypothesis for resilience testing?

Specify the expected agent behavior when tool calls are canceled or corrupted, including safe failure actions and alerting thresholds. For example: 'When tool calls are canceled, the agent should notify the user and not fabricate an answer; after three failed calls in five minutes, an alarm should fire.'

### Can I run chaos experiments on production agents?

No. The post recommends using a dedicated chaos runtime that includes chaos\_plugins() and has read access to /chaos/\*. Production runtimes should omit the plugins and not have that permissions path.

**Tags:** [AI Agents](https://yomu.fyi/topic/ai-agents), [Amazon Bedrock](https://yomu.fyi/topic/amazon-bedrock), [AWS FIS](https://yomu.fyi/topic/aws-fis), [Resilience Testing](https://yomu.fyi/topic/resilience-testing), [Strands](https://yomu.fyi/topic/strands)

- Source: [AWS](https://aws.amazon.com/blogs/architecture/resilience-testing-your-agents-on-amazon-bedrock-agentcore)
- Source URL: https://aws.amazon.com/blogs/architecture/resilience-testing-your-agents-on-amazon-bedrock-agentcore
- Ingested by Yomu: 2026-11-18T21:00:14.088Z

[Read original post](https://aws.amazon.com/blogs/architecture/resilience-testing-your-agents-on-amazon-bedrock-agentcore)
