AWS shows a copyable pattern for failing a pull request when agent behavior regresses
The walkthrough wires Bedrock AgentCore Evaluations into GitHub Actions: CDK deploys a Strands agent runtime and an OAuth-protected MCP server behind a shared Cognito pool, the workflow invokes the agent with test prompts, pulls traces from CloudWatch and scores them, then destroys everything with if: always(). Four built-in evaluators run at a 0.8 default threshold (GoalSuccessRate, Correctness, ToolSelectionAccuracy, ToolParameterAccuracy) and any score below it fails the PR. Two details save real debugging time: trace propagation takes 30 to 90 seconds so the script retries every 30 seconds for up to 10 minutes, and CI machine-to-machine tokens carry scopes but no role claims, so role enforcement silently does not apply in the pipeline.
↳ Follow the thread