Build an AI-Powered A/B testing engine using Amazon Bedrock
AWS•How-to••by Vijit Vashishtha and Koshal Agrawal•AWS Artificial Intelligence Blog
This post shows you how to build an AI-powered A/B testing engine using Amazon Bedrock, Amazon Elastic Container Service, Amazon DynamoDB, and the Model Context Protocol (MCP). The system improves traditional A/B testing by analyzing user context to make smarter variant assignment decisions during the experiment.
Shows an architecture where Amazon Bedrock picks A/B test variants per returning user by calling MCP tools for profiles, similar users and variant metrics, while new users get hash-based assignment.
Who it is for
Teams on AWS running A/B tests on web or retail pages who want per-user variant assignment using early behavior signals.
Key points
New users get hash-based assignment; Bedrock is called only for returning users, to limit AI cost.
Uses Claude Sonnet with native tool use, served from ECS on Fargate behind CloudFront and a VPC origin.
Deployment uses CloudFormation templates; the post gives a GitHub repository for the code.
The post's examples are illustrative retail scenarios; it reports no measured lift in conversion.
AI:Step Functions workflows can now be called by agents as tools through Bedrock AgentCore Gateway over MCP, and OpenAI's GPT-6.1 Terra is generally available on Bedrock at lower token prices.
AI:AgentCore agents can cut per-turn token use by offloading large JSON to S3, paging tool results on demand, and compacting dictionary outputs into descriptors.
AI:A taxonomy of multi-agent patterns (sequential, conditional, parallel, plan-based, handoff, conversation, debate) with anti-patterns and a decision sequence for when multiple agents are warranted.