How FactualMinds Builds Production AI Agents for eCommerce on AWS (2026)
Quick summary: AWS AI agents for eCommerce on AgentCore Harness (GA 17 June 2026), Strands 1.0, and Bedrock Converse — not a native Shopify connector. Reuse Gateway ~180 to 95 ms and ~$791/mo at 50K sessions. Next.js is the ops dashboard, not the runtime.
Key Takeaways
- AWS AI agents for eCommerce on AgentCore Harness (GA 17 June 2026), Strands 1
- 0, and Bedrock Converse — not a native Shopify connector
- Reuse Gateway ~180 to 95 ms and ~$791/mo at 50K sessions
- AWS lifecycle notice (June 30, 2026) — Amazon Bedrock Agents Classic is in maintenance for new customers after July 30, 2026
- Net-new agent builds should use Bedrock AgentCore

Table of Contents
AWS lifecycle notice (June 30, 2026) — Amazon Bedrock Agents Classic is in maintenance for new customers after July 30, 2026. Net-new agent builds should use Bedrock AgentCore. Full matrix: lifecycle roundup.
On June 17, 2026, AgentCore Harness reached general availability: create an agent with configuration, invoke it with a streaming API, and stop hand-rolling session stores for the default path (What’s New, Harness get started). For CTOs evaluating AWS AI agents for eCommerce, that date ends the “wait for a managed loop” excuse. It does not mean every store needs Harness and a custom Runtime graph and a Next.js console on day one.
This is the technical-authority post in the eCommerce AI Agents series. Audience: CTOs, technical founders, engineering leaders, enterprise architects. It explains how FactualMinds typically composes production agents on AWS. It is not an anonymized client engagement, and it does not duplicate the supervisor-plus-four-specialists sample — that architecture, Cedar, and stubs already live here:
- Build eCommerce store AI agents on AgentCore
- Clone
examples/architecture-blog-2026/ecommerce-agentcore-store-agents/
First-party signals we reuse (not eCommerce outcomes) — Gateway server-side tools cut median tool round-trip ~180 ms → ~95 ms on a B2B CRM assistant (12 tools, ~8k turns/day) — Gateway post. Platform TCO silhouette: support-style AgentCore at 50K sessions/mo ~$791/mo platform + model (decision guide). Model your mix on the AgentCore pricing calculator.
Reproduce this — Read
architecture-cto-brief.mdand pastemonday-checklist.mdinto the RFC. Open the draw.io:architecture.drawio. Folder:examples/architecture-blog-2026/ecommerce-ai-agents-series/.
Opinionated take: treat Harness as the paved road for the first production commerce agent. Treat Runtime plus Strands 1.0 multi-agent primitives as the paved road once topology, hop caps, or A2A show up. Treat Next.js as an optional HITL/admin surface. Trade-off: you give up a single-repo “full stack agent” story; you keep AWS isolation, Policy, and Memory where they belong.
FactualMinds is an AWS Select Tier Consulting Partner. We help eCommerce businesses design agents that connect storefronts, business data, and back-office operations — with human approval on writes.
Reference architecture (typical — not every box is mandatory)
flowchart TD
store[Storefront]
events[Events and APIs]
app[Agent application]
harness[AgentCore Harness]
strands[Strands on Runtime]
bedrock[Amazon Bedrock]
tools[Approved tools via Gateway]
orders[Orders]
crm[CRM]
erp[ERP]
inv[Inventory]
wms[WMS]
analytics[Analytics]
store --> events
events --> app
app --> harness
harness -->|export when topology appears| strands
harness --> bedrock
strands --> bedrock
harness --> tools
strands --> tools
tools --> orders
tools --> crm
tools --> erp
tools --> inv
tools --> wms
tools --> analyticsSame picture as a diagram file you can drop into Confluence: architecture.drawio.
| Layer | Role | You own | AWS owns |
|---|---|---|---|
| Storefront / OMS / PIM | System of record | Shopify, custom, ERP, WMS connectors | Nothing AgentCore-specific |
| Events / APIs | Triggers and contracts | Webhooks, EventBridge, your OpenAPI | Optional EventBridge bus |
| Agent application | Session UX, HITL queue, evals, cost alarms | Often Next.js + TypeScript + Tailwind — not required | — |
| AgentCore Harness | Config-driven managed loop on Runtime | Model, instructions, tools, memory config | Orchestration loop, streaming, default Memory, export scaffold |
| Runtime + Strands | Custom loop when config is not enough | Container/CodeZip, hop caps, Agents-as-Tools / Graph / Swarm / Workflow | MicroVM isolation, session lifecycle |
| Amazon Bedrock | Models + Guardrails | Prompt/tool schemas you pass to Converse | Model hosting, Guardrails enforcement |
| Gateway + Policy | Tool choke point | OpenAPI/MCP/Lambda targets, Cedar | Invocation path, Policy evaluation |
| Identity | Shopper vs associate | JWT claims, IdP | Brokering into Gateway |
There is no native Shopify AgentCore connector. Shopify (or Magento, BigCommerce, custom) sits behind your APIs. Gateway does not speak Admin GraphQL by magic.
Not every customer needs Harness and Runtime as two products they operate. Harness already runs on Runtime. You operate Harness until you export. After agentcore export harness, you operate Runtime with generated Strands-based Python (or you host that code elsewhere). Do not staff two control planes for a four-tool WISMO bot.
Agent application architecture
The agent application is everything that is not the model loop:
- Inbound channel (storefront chat, helpdesk, Slack, associate console)
- AuthN/Z before AgentCore Identity (shopper JWT vs associate JWT)
- Idempotency keys for writes the workflow will execute
- Human-in-the-loop queue
- Golden eval suite and A/B split (AgentCore A/B can target versions even off Runtime)
- Cost and DENY dashboards
FactualMinds often implements that surface in Next.js + TypeScript + Tailwind because ops teams need session replay, approval buttons, and alarms in a browser. That stack is typical, not contractual. A helpdesk-native HITL queue is valid. A terminal is not a strategy.
The application invokes InvokeHarness (or InvokeAgentRuntime) with a runtimeSessionId (≥33 characters on the Harness data plane). It does not embed the tool sandbox in a Next.js server action.
Hybrid control flow — workflow owns money movement — is argued in AI agent vs workflow automation. Do not skip that post because this one has AWS logos.
Tool-based data access
Agents must not get a SQL user on the replica. They get tools:
- Reads:
getOrder,getShipment,searchProducts,getInventory, analytics RPCs with row caps - Writes:
cancelOrder,createReturn,updateInventory— default deny, Cedar, HITL above caps
Attach OpenAPI or MCP to AgentCore Gateway. When the catalog of tools grows past ~10, use Gateway semantic search so the model sees a shortlist — same failure mode as the Gateway server-side tools post. The CRM canary (~180 ms → ~95 ms median tool RTT) is why we prefer server-side Gateway execution; your OMS still dominates wall clock.
Memory (Harness default, also available on Runtime) is session and long-term shopper/associate notebook. It is not the product catalog. Knowledge Bases (Managed KB GA 17 June 2026, or classic Bedrock KBs) hold size charts and return policy PDFs. Do not dump the catalog into Memory.
AWS Context was still Coming soon as of the August 2026 ship map. Do not block an RFC on it — Harness + Strands post.
Orchestration: Harness first, Strands when topology appears
Two control-plane calls for the paved road. Context: Python 3.12+, boto3 ≥ 1.38.0, IAM execution role, supported region. Sketch only — pin the model your account allows; this is not a proprietary deploy script.
# Sketch — CreateHarness / InvokeHarness (see AWS Harness get-started docs)
import boto3
import uuid
control = boto3.client("bedrock-agentcore-control", region_name="us-west-2")
created = control.create_harness(
harnessName="commerce-wismo",
executionRoleArn="arn:aws:iam::123456789012:role/HarnessExecutionRole",
)
# Poll get_harness until READY, then:
client = boto3.client("bedrock-agentcore", region_name="us-west-2")
response = client.invoke_harness(
harnessArn=created["arn"],
runtimeSessionId=str(uuid.uuid4()),
messages=[{"role": "user", "content": [{"text": "Where is order ORD-1001?"}]}],
)CLI equivalent (Node 20+, @aws/agentcore): agentcore create, agentcore deploy, agentcore invoke. When configuration cannot express hop caps or specialist routing, export:
# Context: @aws/agentcore CLI; Strands is the supported export target as of August 2026
agentcore export harnessStrands 1.0 primitives we will actually name in code review:
| Primitive | Shape | Use in commerce | When NOT to |
|---|---|---|---|
| Agents-as-Tools | Orchestrator calls specialists as tools | Hierarchical supervisor | Fixed audit step order |
| Graph | DAG via GraphBuilder | Compliance / review pipelines | Open-ended shopper chat |
| Swarm | Peer handoffs + shared memory | Exploration only, hard caps | Ungated writes; unbounded handoffs |
| Workflow | Code-defined sequential/parallel tasks | Validation chains | Free-form routing |
Prefer Agents-as-Tools for sales / orders / support / inventory when those prompts and IAM diverge. Prefer a single Harness when they do not. The longer sample — hop cap 2, eight tools, Cedar on three writes — is the store-agents post, not a second copy here.
Context: strands-agents ≥ 1.x. Sketch of Agents-as-Tools — replace with Gateway-backed specialists in production.
# Sketch — not the four-specialist production stubs
from strands import Agent
wismo = Agent(system_prompt="Answer only from getOrder/getShipment tool results.")
orchestrator = Agent(
system_prompt="Route tracking questions to wismo. Do not call cancel tools.",
tools=[wismo.as_tool(name="wismo", description="Order and shipment status.")],
)Security boundaries
- Identity JWT —
role=shoppervsrole=associate(andadmin) into Gateway Policy. Shopper tokens must DENYupdateInventoryeven if a specialist is invoked by mistake. - Cedar on Gateway writes — cancel window, refund cap, inventory role. Run
LOG_ONLY, thenENFORCE. Prompt text is not a control. - Guardrails on Bedrock — complementary; they do not replace Cedar for tool authorization.
- No payment capture in agent tools — keep PCI scope in the existing checkout.
- Browser / Code Interpreter default off — enable per intent. Support-bot pilots with Browser left hot tracked roughly 3× Runtime-shaped spend (ship map).
Context: Cedar sketch aligned to the public sample policy; entity shapes must match your Gateway schema. Full file: refund-and-cancel.cedar.
// Sketch — auto-refund ceiling (demo). Not a customer policy.
permit (
principal,
action == Action::"createReturn",
resource
)
when {
principal has role &&
["shopper", "associate", "admin"].contains(principal.role) &&
resource has refundUsd &&
resource.refundUsd <= 75
};Human approval
HITL is a queue, not a system prompt that says “be careful.” Day 4 of monday-checklist.md: session id + tool trace on every escalation; associate-only writes proven DENY for shopper tokens.
The Next.js dashboard, when we build one, is the approval UX: replay, Cedar decision, “approve cancel” that calls the workflow, not a second unconstrained model turn.
Observability and scaling
Harness and Runtime emit OpenTelemetry-compatible spans into CloudWatch. Track:
- Tool mix (alarm if Browser fires on status-only intents)
- Policy ALLOW vs DENY (
aws.agentcore.policy.authorization_decision) - Escalation rate
- Session active seconds (this is the Runtime bill driver)
Pair traces with AgentCore Evaluations before you scale chat volume — confirm regional availability.
Scaling is session isolation, not a bigger ECS task for the model loop. Gateway and OMS rate limits will bite before Firecracker does. Budget from the AgentCore pricing calculator using your average active seconds, not the ~$791/mo @ 50K silhouette as a quote.
Production deployment: IAM execution role for the harness, Identity configured, Gateway targets in private APIs, Policy attached, Observability on, eval suite in CI. Classic InvokeAgent action groups are a migration inventory, not a greenfield.
What broke
What broke — Architecture review where the RFC listed “Harness + Runtime + Strands + Next.js” as a single required stack for a four-tool WISMO lookup. Harness would have covered the loop; four specialists and an unstaffed dashboard added hop latency and an empty HITL queue. Detection: unused export stubs and zero approvals in the first canary week. Fix: Harness for the first production agent if config is enough; export to Strands when hop caps appear; Next.js only when humans need a queue. Lesson: not every customer needs Harness and Runtime as two operated products, and Next.js is not the AWS runtime.
The dual-write cancel-on-delivered failure remains the commerce write-path counter-case — documented on the sample, not re-litigated as a fake KPI here.
What to Do This Week
- Paste
monday-checklist.mdinto the RFC. Ship one workflow, not five agents. - Confirm Agents Classic is not the net-new path (maintenance for new customers after 30 July 2026).
- Choose Harness if ≤5 tools, one team, no hop caps — otherwise Runtime + Strands.
- Draft read OpenAPI only; Gateway Policy
LOG_ONLY; Browser off. - Write 10 golden tasks + 3 must-escalate cases. Alarm on DENY spikes and unexpected tool mix.
- Prove shopper JWT cannot write inventory. Flip Cedar to ENFORCE only after the canary.
- Open
architecture-cto-brief.mdwith the draw.io in the same PR. - If you need the supervisor topology, clone store-agents — do not re-author it.
- Model cost, then book an architecture review or start from Amazon Bedrock services.
What This Post Doesn’t Cover
- Duplicating the supervisor + four specialists implementation — already published
- A native Shopify AgentCore connector — you own middleware
- Proprietary FactualMinds deploy pipelines, CDK modules, or customer IAM layouts
- AWS Context APIs — not GA as of the August 2026 ship map
- HIPAA/PCI control mapping — Gateway Policy is not a BAA
- Measured eCommerce conversion or deflection KPIs from named clients — we are not inventing them
- Region-by-region SKU matrices — verify AgentCore regions
FAQ
When should a CTO NOT require both Harness and Runtime?
Most first production agents need one host story. Harness is a config-driven managed loop that already runs on Runtime. Start on Harness if configuration covers the workflow. Export to Strands on Runtime when you need hop caps or Strands primitives. Buying both as a checkbox adds ops without adding a control plane.
What could go wrong if Next.js is treated as the AWS agent runtime?
You inherit Node process isolation instead of AgentCore microVM sessions, and you will be tempted to call Converse with ad-hoc tools from a server action. Next.js is a typical ops dashboard for HITL and monitoring. It is not required for every customer.
When should you NOT start from the supervisor plus four specialists sample?
Skip that topology when you have five or fewer tools, one team, and a single conversation shape. A single Harness with Gateway reads is cheaper to operate. Link the sample; do not copy it into every RFC.
What could go wrong if Cedar stays off on refund and inventory writes?
The model can call cancel, createReturn, or updateInventory with shopper tokens or on delivered orders. Put Cedar on Gateway, run LOG_ONLY, then ENFORCE. Identity JWT claims must flow into Policy.
Is Amazon Bedrock the agent host?
No. Bedrock provides models via Converse and Guardrails. AgentCore Harness or Runtime hosts the loop. Strands is application code on Runtime after export.
Should net-new eCommerce agents still use Bedrock Agents Classic?
No. Agents Classic is in maintenance for new customers after 30 July 2026. Net-new builds should use AgentCore Harness or Runtime plus Gateway.
Need a Harness-versus-Runtime RFC and Gateway Policy on refunds without a native Shopify connector myth? Contact FactualMinds or see Amazon Bedrock.
AWS Cloud Architect & AI Expert
AWS-certified cloud architect and AI expert with deep expertise in cloud migrations, cost optimization, and generative AI on AWS.




