How AgentFlo Built WhatsApp Commerce Agents on Amazon Bedrock AgentCore

How AgentFlo Built WhatsApp Commerce Agents on Amazon Bedrock AgentCore

Cloud Platform Engineering

AgentFlo — an agentic commerce platform by Salesflo — deploys AI sales and support agents across WhatsApp for merchants managing over $300 billion in annual transacted value. Their AWS architecture blog post is one of the clearest published examples of what a production-grade, multi-tenant agent deployment on Amazon Bedrock AgentCore actually looks like.

What Happened

AgentFlo selected Bedrock AgentCore for three capabilities that proved essential at their scale: stateful sessions enabling long-running commerce conversations, isolated microVM execution providing hardware-level tenant separation, and native Model Context Protocol (MCP) integration for standardized tool connectivity.

The production architecture layers AWS services across three tiers. A Fargate messaging layer handles authentication, voice transcription, and security before any request reaches the agent layer. The agent layer itself runs on Bedrock AgentCore, with DynamoDB holding session and cart state, Aurora persisting order data, and S3 combined with Bedrock Knowledge Bases providing RAG-backed product catalog access. Lambda serves as the tool execution layer; an Application Load Balancer handles message routing across the system.

For analytics, Kinesis Data Streams and Data Firehose capture interaction data downstream.

Why It Matters

The architectural choices here reveal patterns that weren’t obvious before agentic systems went into production at scale.

Model-driven beats state machine. AgentFlo’s agents use the Strands SDK for orchestration — tools are defined as Python functions, the system prompt defines behavior, and the model decides workflow routing. They tested rigid state machine orchestration against this approach and found model-driven designs performed better for most commerce interactions. The implication: encoding every possible conversation flow as an explicit state machine creates brittleness; letting the model handle decision points reduces that surface area.

Single-agent outperforms multi-agent. For most customer interactions, a single domain-expert agent outperformed decomposed multi-agent designs. This contradicts a common architectural instinct — that more granular agent decomposition should produce better outputs. In commerce contexts where conversation continuity matters, the coordination overhead of multi-agent systems created more problems than the specialization solved.

Centralized gateway scales tool management. The AgentCore Gateway centralizes tool routing, OAuth management, and Cedar-based access policy enforcement. When a new connector (Shopify, WooCommerce, SAP) is added, it becomes immediately available to all merchant deployments without per-deployment integration work. This is the same architectural principle underlying Bedrock AgentCore’s agent registry design — standardize the integration layer so individual deployment work disappears.

Traffic surge handling without pre-provisioning. The serverless architecture sustained 10–50x surges during flash sales without pre-provisioning. Isolated microVM sessions (up to 8 hours) provided tenant separation during these spikes without cross-contamination.

The So What

AgentFlo’s architecture demonstrates three durable insights for teams building production agent systems: model-driven orchestration reduces operational brittleness compared to state machines; single domain-expert agents outperform multi-agent decomposition for most interaction types; and centralized tool routing through a gateway pattern scales better than distributed integrations. The Bedrock AgentCore capability set — stateful sessions, isolated compute, native MCP — appears well-matched to the multi-tenant SaaS deployment pattern. For teams evaluating agentic infrastructure for high-volume commerce or customer service workloads, this case study is one of the more concrete published references available.

Source: AWS Architecture Blog

Content created with AI assistance and reviewed for accuracy.

💬

Join the conversation

Stack Insiders is our free community for readers who want to go deeper — share resources, ask questions, and connect with others across every vertical we cover.

Join Stack Insiders →

Newsletter coming soon.

Curated digests across AI, biohacking, photography, travel, and more. Be the first to know when we launch.