Shopify App Architecture & API (/docs)

Developer Documentation.

Technical overview of our Shopify Theme App Extension, HMAC-verified App Proxy, and AI-to-AI Agentic Commerce protocol (axg-agentic-commerce/1.0).

SHOPIFY THEME APP EXTENSION

1. Native Shopify App Embed Block & Shop Metafields

AxG AI Store Sales Assistant integrates into any Shopify Online Store 2.0 theme using official Shopify Theme App Extensions (App Embed Blocks) and PUBLIC_READ shop metafields under the axgai namespace — requiring zero manual Liquid or script tag edits.

// Shopify Admin GraphQL Metafields (Namespace: "axgai")
shop {
  agentId: metafield(namespace: "axgai", key: "agent_id") { value }
  slug: metafield(namespace: "axgai", key: "slug") { value }
  chatTitle: metafield(namespace: "axgai", key: "chat_title") { value }
  colorTheme: metafield(namespace: "axgai", key: "color_theme") { value }
  enableCartNudge: metafield(namespace: "axgai", key: "enable_cart_nudge") { value }
}
  • 1-Click Activation: Enable 'AxG AI Sales Assistant' under Online Store > Themes > Customize > App Embeds.
  • Zero Theme Pollution: Uninstalling the app automatically removes the App Embed Block without leaving residual theme code.
  • Native Shopify Cart API: Product cards use /cart/add.js and /cart.js to update the shopper's cart in real time.
APP PROXY & WEBSOCKET ENGINE

2. HMAC-Verified Shopify App Proxy & 2-Factor Order Lookup

Storefront chat requests authenticate through our cryptographic Shopify App Proxy (/apps/axg-ai) and stream responses from our Frankfurt (europe-west3) Cloud Run WebSocket engine powered by Google Gemini 2.5 Flash.

// 1. Cryptographic App Proxy WebSocket Token Handshake
GET /apps/axg-ai?action=get_ws_token&shop=your-store.myshopify.com

// 2. 2-Factor Shopify Order Verification (Order ID + Customer Billing Email)
POST /apps/axg-ai
{
  "message": "Track order #1042 for anna@example.com",
  "language": "en"
}
  • Sub-Second Gemini 2.5 Flash Streaming: Configured with thinkingBudget: 0 and temperature: 0.2 for instant, hallucination-free product and policy responses.
  • 2-Factor Order Privacy: Order fulfillment status and carrier tracking links (PostNord, DHL, DB Schenker, UPS, FedEx) are returned only when both the Order ID and matching billing email address are verified via the Shopify Admin GraphQL API.
  • Mandatory GDPR Compliance Webhooks: Full HMAC-SHA256 verification for customers/data_request, customers/redact, and shop/redact.
AGENTIC COMMERCE PROTOCOL

3. AI-to-AI & Agentic Commerce API (axg-agentic-commerce/1.0)

Included in Silver (€29.99/mo) and Gold (€99.00/mo) plans (and during the 30-day free trial). Exposes a fast, 0-token machine-readable Shopify catalog and real-time stock endpoint so personal AI shopping assistants can query verified products and receive direct Shopify cart links.

# 1. Structured JSON Catalog & Search Endpoint (<250ms, 0 LLM token overhead)
GET https://api.axelsson.graphics/v1/agent-shop?slug=your-store-slug&q=serum

# 2. LLM-Optimized Storefront Index (llms.txt standard)
GET https://api.axelsson.graphics/v1/llms.txt?slug=your-store-slug
  • Protocol Version: axg-agentic-commerce/1.0 — returns verified Shopify product titles, prices, currency, stock availability, high-res image URLs, and direct add-to-cart links.
  • Zero-Token & Anti-Loop Protection: Backed by a 5-minute in-memory RAM cache and strict IP rate limiting (max 25 req/min, HTTP 429) with zero LLM token consumption.
  • Tier Gating: Active during the 30-day free trial and on Silver (€29.99/mo) & Gold (€99.00/mo) Shopify subscriptions.