---
title: How FactualMinds Builds Production AI Agents for eCommerce on AWS (2026)
description: 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.
url: https://www.factualminds.com/blog/aws-ai-agents-for-ecommerce-factualminds-2026/
datePublished: 2026-08-27T00:00:00.000Z
dateModified: 2026-08-27T00:00:00.000Z
author: palaniappan-p
category: Generative AI
tags: ai-agents, ecommerce, bedrock-agentcore, agentcore-harness, strands, amazon-bedrock
---

# How FactualMinds Builds Production AI Agents for eCommerce on AWS (2026)

> 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.

> **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](/blog/amazon-bedrock-agentcore-production/). Full matrix: [lifecycle roundup](/blog/aws-service-lifecycle-updates-june-2026/).

**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](https://aws.amazon.com/about-aws/whats-new/2026/06/amazon-bedrock-agentcore-harness-generally-available/), [Harness get started](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/harness-get-started.html)). 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](/blog/ai-agents-for-ecommerce-15-automations-2026/) 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](/blog/ecommerce-ai-agents-amazon-bedrock-agentcore-2026/)
- Clone [`examples/architecture-blog-2026/ecommerce-agentcore-store-agents/`](https://www.factualminds.com/examples/architecture-blog-2026/ecommerce-agentcore-store-agents/README.md)

> **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](/blog/amazon-bedrock-agentcore-gateway-server-side-tool-execution-2026/). Platform TCO silhouette: support-style AgentCore at **50K sessions/mo ~$791/mo** platform + model ([decision guide](/blog/aws-bedrock-agentcore-vs-amazon-q-enterprise-decision-guide-2026/)). Model your mix on the [AgentCore pricing calculator](/tools/amazon-bedrock-agentcore-pricing-calculator/).

> **Reproduce this** — Read [`architecture-cto-brief.md`](https://www.factualminds.com/examples/architecture-blog-2026/ecommerce-ai-agents-series/architecture-cto-brief.md) and paste [`monday-checklist.md`](https://www.factualminds.com/examples/architecture-blog-2026/ecommerce-ai-agents-series/monday-checklist.md) into the RFC. Open the draw.io: [`architecture.drawio`](https://www.factualminds.com/examples/architecture-blog-2026/ecommerce-ai-agents-series/architecture.drawio). Folder: [`examples/architecture-blog-2026/ecommerce-ai-agents-series/`](https://www.factualminds.com/examples/architecture-blog-2026/ecommerce-ai-agents-series/README.md).

**Opinionated take:** treat Harness as the paved road for the first production commerce agent. Treat Runtime plus [Strands 1.0 multi-agent primitives](https://strandsagents.com/docs/user-guide/concepts/multi-agent/multi-agent-patterns/index.md) 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)

```mermaid
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 --> analytics
```

Same picture as a diagram file you can drop into Confluence: [architecture.drawio](https://www.factualminds.com/examples/architecture-blog-2026/ecommerce-ai-agents-series/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](/blog/ai-agent-vs-workflow-automation-ecommerce-2026/). 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](/blog/amazon-bedrock-agentcore-gateway-server-side-tool-execution-2026/). 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](/blog/production-ai-agents-aws-agentcore-harness-strands-2026/).

## 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](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/agentcore-regions.html). Sketch only — pin the model your account allows; this is not a proprietary deploy script.

```python
# 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:

```bash
# Context: @aws/agentcore CLI; Strands is the supported export target as of August 2026
agentcore export harness
```

[Strands 1.0](https://strandsagents.com/docs/user-guide/concepts/multi-agent/multi-agent-patterns/index.md) 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](/blog/ecommerce-ai-agents-amazon-bedrock-agentcore-2026/), not a second copy here.

Context: `strands-agents` ≥ 1.x. Sketch of Agents-as-Tools — replace with Gateway-backed specialists in production.

```python
# 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

1. **Identity JWT** — `role=shopper` vs `role=associate` (and `admin`) into Gateway Policy. Shopper tokens must DENY `updateInventory` even if a specialist is invoked by mistake.
2. **Cedar on Gateway writes** — cancel window, refund cap, inventory role. Run **`LOG_ONLY`**, then **`ENFORCE`**. Prompt text is not a control.
3. **Guardrails on Bedrock** — complementary; they do not replace Cedar for tool authorization.
4. **No payment capture in agent tools** — keep PCI scope in the existing checkout.
5. **Browser / Code Interpreter default off** — enable per intent. Support-bot pilots with Browser left hot tracked roughly **3×** Runtime-shaped spend ([ship map](/blog/production-ai-agents-aws-agentcore-harness-strands-2026/)).

Context: Cedar sketch aligned to the public sample policy; entity shapes must match your Gateway schema. Full file: [`refund-and-cancel.cedar`](https://www.factualminds.com/examples/architecture-blog-2026/ecommerce-agentcore-store-agents/policy/refund-and-cancel.cedar).

```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`](https://www.factualminds.com/examples/architecture-blog-2026/ecommerce-ai-agents-series/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](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/evaluations.html) 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](/tools/amazon-bedrock-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](/blog/ecommerce-ai-agents-amazon-bedrock-agentcore-2026/), not re-litigated as a fake KPI here.

## What to Do This Week

1. Paste [`monday-checklist.md`](https://www.factualminds.com/examples/architecture-blog-2026/ecommerce-ai-agents-series/monday-checklist.md) into the RFC. Ship **one** workflow, not five agents.
2. Confirm Agents Classic is **not** the net-new path (maintenance for new customers after **30 July 2026**).
3. Choose Harness if ≤5 tools, one team, no hop caps — otherwise Runtime + Strands.
4. Draft **read** OpenAPI only; Gateway Policy `LOG_ONLY`; Browser off.
5. Write 10 golden tasks + 3 must-escalate cases. Alarm on DENY spikes and unexpected tool mix.
6. Prove shopper JWT cannot write inventory. Flip Cedar to **ENFORCE** only after the canary.
7. Open [`architecture-cto-brief.md`](https://www.factualminds.com/examples/architecture-blog-2026/ecommerce-ai-agents-series/architecture-cto-brief.md) with the [draw.io](https://www.factualminds.com/examples/architecture-blog-2026/ecommerce-ai-agents-series/architecture.drawio) in the same PR.
8. If you need the supervisor topology, clone [store-agents](https://www.factualminds.com/examples/architecture-blog-2026/ecommerce-agentcore-store-agents/README.md) — do not re-author it.
9. Model cost, then [book an architecture review](/contact-us/) or start from [Amazon Bedrock services](/services/aws-bedrock/).

## What This Post Doesn't Cover

- Duplicating the supervisor + four specialists implementation — [already published](/blog/ecommerce-ai-agents-amazon-bedrock-agentcore-2026/)
- 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](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/agentcore-regions.html)

## 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](/contact-us/) or see [Amazon Bedrock](/services/aws-bedrock/).

## 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 model, instructions, tools, and Memory. Export to Strands on Runtime when you need hop caps, Agents-as-Tools, Graph, Swarm, or Workflow. 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, you lose managed Memory/Gateway/Identity defaults, and you will be tempted to call Bedrock Converse with ad-hoc tools from a server action. Next.js plus TypeScript plus Tailwind is a typical FactualMinds ops dashboard for HITL, traces, and cost alarms. It is an application layer. 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 (WISMO only, or catalog Q and A only). A single Harness with Gateway reads is cheaper to operate. Multi-agent pays off when sales, orders, support, and inventory prompts and IAM diverge. 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 cancelOrder, createReturn, or updateInventory with shopper tokens or on delivered orders. Prompt text is not an authorization boundary. Put Cedar on Gateway, run LOG_ONLY, then ENFORCE. Identity JWT claims (shopper vs associate) must flow into Policy even if specialists share an entrypoint.

### Is Amazon Bedrock the agent host?
No. Bedrock provides foundation models (Converse) and Guardrails. AgentCore Harness or Runtime hosts the loop. Strands (or another framework) is application code on Runtime after export. Collapsing those names in a board deck is how teams buy Classic Agents again.

### 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. Existing Classic deployments keep running; inventory tools and sessions before cutover.

---

*Source: https://www.factualminds.com/blog/aws-ai-agents-for-ecommerce-factualminds-2026/*
