Hewyn AI Agent
AI-Powered E-Commerce Operations System
A comprehensive AI operations system for a DTC wellness brand, covering everything from revenue forecasting to automated SEO deployment across 4,700 products.
The Problem
Hewyn is a UAE-based premium wellness and supplements brand selling roughly 4,700 products. Like most DTC operations at this size, the data lived in eight different places: Shopify for orders and products, Google Ads and Meta Ads for paid acquisition, GA4 for site analytics, Klaviyo for email, Zendesk for support tickets, Google Merchant Center for feed management, and Microsoft Clarity for session recordings.
No one person could hold all of that context simultaneously. Questions that should take minutes (“what’s our actual ROAS on branded search by product category?”) took hours of tab-switching, CSV exports, and manual cross-referencing. The gap between having data and actually using it for decisions was enormous.
The Approach
I built a specialized Claude Code agent with 84 custom skills organized across 11 domains, connected to all 8 data sources through the MCP (Model Context Protocol) server architecture. Instead of a dashboard that shows you numbers, this is an agent that reasons about your business.
The skills fall into categories that mirror how you actually run an ecommerce operation:
- Analytics: Attribution modeling, cohort tracking, funnel leak detection, revenue forecasting, A/B test analysis
- Optimization: AOV optimizer, price elasticity testing, budget pacing, portfolio optimization, channel allocation
- SEO: Keyword strategy, on-page optimizer, technical SEO fixes, schema markup generation, internal linking
- Customer Intelligence: LTV prediction, churn prediction, journey mapping, retention frameworks
- Execution: Product page enhancement, collection merchandising, Klaviyo flow building, email campaign writing, discount architecture, cross-sell copy, customer tagging
- Strategic: Growth engine planning, weekly planning, vendor decisions, incrementality testing, launch playbooks
The critical difference from a typical analytics tool: these skills compose. You can ask the agent to pull last month’s Google Ads performance, cross-reference it with Shopify revenue by product category, check Klaviyo email attribution for the same period, and recommend budget reallocation. It reasons across data sources in a single conversation.
What Got Built Beyond the Agent
The agent was the core, but several standalone systems came out of the same engagement:
Customer Support AI Assistant. A production-deployed chatbot (Next.js, Claude Haiku, Vercel) for internal support agents. Seven AI tools in a tool-use loop: product search, stock check, alternative finder, wellness goal search, brand lookup, order tracking via Metabase SQL. Deployed with Redis persistence and an alert dashboard.
Personalized Wellness Quiz. An 8-question recommendation quiz built directly into the Shopify storefront. Smart product mapping across 12 goal categories with diet-aware filtering. Vegan customers automatically get plant-based alternatives. Dynamic product fetching from the Shopify API with personalized explanations for each recommendation.
Automated SEO at Scale. Programmatic SEO improvements across the entire catalog: 420 AI-generated product meta descriptions deployed via Python scripts, collection page meta descriptions, theme-level SEO fixes (title tags, structured data, duplicate schema removal), and a compliance pass removing health claims from titles and descriptions across 302 products.
Revenue Analytics and Forecasting. Quantified $5.8K in wasted ad spend during a 6-day store suspension (DMCA takedown), proving the efficiency decline wasn’t structural. Built scenario models for monthly revenue forecasting with probability estimates based on channel-level ROAS projections.
Google Ads Branded Search Campaign. Designed from scratch: 21 ad groups, 198 keywords, 34 negatives. Discovered zero dedicated wellness DTC competitors on branded search in UAE. Only marketplaces. Projected incremental revenue: $15-35K/month at 3-8x ROAS.
Cart and Conversion Optimization. Custom promotional progress bars in the cart drawer, GA4 event tracking for cross-sell clicks, and replaced a third-party app with native Liquid code.
Key Decisions
-
MCP protocol over custom API wrappers. MCP gives Claude native access to each data source through a standardized interface. Building custom API wrappers would have meant maintaining 8 separate integrations. MCP servers handle authentication, rate limiting, and data formatting so the agent skills can focus on business logic.
-
84 discrete skills over a general-purpose prompt. Each skill has a defined input, output format, and data source dependency. This makes the agent predictable. When you ask for a revenue forecast, it follows the same methodology every time. A general prompt would produce different approaches on each run.
-
Python scripts for bulk SEO over manual Shopify edits. Updating 420 meta descriptions through the Shopify admin would take weeks. The Python script generated copy with Claude, validated it against character limits and compliance rules, then deployed through the Shopify Admin API in batches. The entire catalog was done in hours.
-
Haiku for the support chatbot over Sonnet or Opus. Support agents need sub-second responses. They’re looking up order statuses and product alternatives in real time. Haiku’s speed at this task was more important than Sonnet’s reasoning depth. The 7-tool architecture gives it structured data anyway.
Under the Hood
The agent architecture uses Claude Code with MCP servers providing live data access:
┌─────────────────────────────────────────┐
│ Claude Code Agent │
│ 84 Custom Skills │
│ (analytics, optimization, SEO, │
│ customer intel, execution, │
│ strategic planning) │
└──────────┬──────────────────────────────┘
│ MCP Protocol
▼
┌──────────────────────────────────────────┐
│ 8 MCP Data Servers │
├────────────┬────────────┬────────────────┤
│ Shopify │ Google Ads │ GA4 │
│ Admin API │ (read/ │ Analytics │
│ │ write) │ │
├────────────┼────────────┼────────────────┤
│ Klaviyo │ Meta Ads │ Zendesk │
│ Email │ Manager │ Support │
├────────────┼────────────┼────────────────┤
│ Google │ Microsoft │ │
│ Merchant │ Clarity │ │
└────────────┴────────────┴────────────────┘
Each skill defines its data dependencies, output format, and reasoning approach:
# Example: Revenue forecast skill
skill = {
"name": "revenue_forecast",
"domain": "analytics",
"sources": ["shopify", "google_ads", "meta_ads"],
"output": "scenario_model",
"description": "Build revenue forecast with probability "
"estimates based on channel-level ROAS "
"and historical seasonality"
}
The support assistant uses a tool-use loop where Claude calls the right tool based on the customer query:
const tools = [
{ name: "product_search", /* fuzzy search across 4,700 SKUs */ },
{ name: "stock_check", /* real-time inventory levels */ },
{ name: "alternative_finder", /* similar products when OOS */ },
{ name: "wellness_search", /* match by health goal */ },
{ name: "brand_lookup", /* brand info and policies */ },
{ name: "order_tracking", /* Metabase SQL for order status */ },
{ name: "agent_notes", /* persistent context per ticket */ },
];
Scale
- 84 custom skills across 11 operational domains
- 8 live data source integrations via MCP
- 4,700 products under management
- 420 product meta descriptions generated and deployed
- 198 keywords across 21 ad groups for branded search
- $5.8K wasted spend identified and quantified during DMCA incident
- $15-35K/month projected incremental revenue from branded search
What I Learned
This project taught me the difference between AI as a tool and AI as infrastructure. A tool answers a question. Infrastructure changes how you ask questions.
Before the agent, our monthly review was: pull reports from 8 platforms, paste into slides, discuss what happened. After, it became: ask the agent what changed, why, and what to do about it. The shift isn’t speed. It’s that you start asking questions you wouldn’t bother asking manually because the cost of answering them was too high.
The 84 skills sound impressive as a number, but most of them exist because I kept running into the same questions week after week. “What’s our actual blended ROAS?” “Which products should we push this week?” “Is this Klaviyo flow actually incremental?” Each skill is really just a question I got tired of answering manually.
The biggest surprise was how much of the value came from connecting data sources rather than from any individual analysis. Google Ads data alone tells you cost per acquisition. Cross-referenced with Shopify LTV data, it tells you which acquisitions are actually profitable. That cross-referencing is where the real insight lives, and it’s the thing that’s hardest to do without an agent that can access everything at once.
Built for Hewyn (hewyn.com), a DTC wellness brand in the UAE. Architecture and skill structure shown. Revenue figures are projections and estimates.