Proposed Migration Architecture
The proposed architecture replaces rigid, point-to-point integrations of legacy Enterprise Service Buses (ESBs) with a flexible, protocol-driven system composed of several layers, each with a distinct role in the commerce lifecycle.
High-Level Architecture
The new architecture is centered around a decentralized network of AI agents that communicate using the A2A (Agent-to-Agent) and AP2 (Agent Payments Protocol) protocols. Xano acts as the central nervous system, providing the data and business logic layer, while Shopify's Global Catalog serves as the primary source for product information.
+-----------------+ +----------------------+ +-----------------------+
| User/Customer |----->| AI Agent Platform |----->| Shopify Global Catalog|
| (via UI/App) | | (A2A/AP2 Compliant) | | (Product Discovery) |
+-----------------+ +----------------------+ +-----------------------+
| |
| (A2A/AP2) | (UCP)
v v
+-----------------+ +----------------------+ +-----------------------+
| Payment Gateway |<-----| Xano |<-----| Merchant Systems |
| (Stripe, etc.) | | (Data & Logic Layer) | | (Order Fulfillment) |
+-----------------+ +----------------------+ +-----------------------+
Component Roles
| Component | Role | Technologies |
|---|---|---|
| AI Agent Platform | The consumer-facing surface where AI agents interact with users. Orchestrates the commerce journey from product discovery to payment by communicating with other components via A2A and AP2. | Custom-built agent platforms, AI assistants (e.g., Google Assistant) |
| Shopify Global Catalog | The primary source for product information. AI agents use the Catalog API (or MCP server) to search for products, retrieve details, and get checkout URLs. | Shopify Catalog API/MCP |
| Xano | The central data and business logic layer. Manages user data, session state, encryption, and transaction integrity. Serves as the backend for the Credential Provider (CP) role in UCP (Universal Commerce Protocol). | Xano BaaS (PostgreSQL, REST APIs, JWE/JWS) |
| Merchant Systems | The backend systems of individual merchants, responsible for order fulfillment, inventory management, and customer service. Receive orders from the Xano layer. | Existing e-commerce platforms (e.g., Shopify, Magento) or custom-built systems |
| Payment Gateway | The financial infrastructure provider that processes payments. Interacts with Xano, which securely transmits payment tokens. | Stripe, Adyen, PayPal, etc. |
Data Flow Patterns
Product Data Flow
- An AI agent on the AI Agent Platform receives a product discovery request from a user
- The agent queries the Shopify Global Catalog using the Catalog API/MCP, providing search parameters (keywords, price range, etc.)
- The Catalog returns a list of
UniversalProductobjects, each with a uniqueUPID - The agent can then perform a
Lookuprequest to get detailed information about a specific product, including its variants and checkout URLs - This product data is then presented to the user through the agent's interface
User and Session Data Flow
- When a user interacts with the AI Agent Platform, a secure session is initiated with the Xano backend
- Xano generates a JWE (JSON Web Encryption) token to manage the session state. This token contains encrypted user information and session data
- All subsequent requests from the agent to Xano are authenticated using this token
- User consent for data processing and transactions is also managed within Xano, with consent history stored as a cryptographically signed JWE
Transaction and Payment Data Flow (AP2)
- When a user decides to make a purchase, they express their intent to the AI agent. This creates an Intent Mandate, which is a cryptographically signed digital contract stored in Xano
- The agent presents a cart with the selected items. The user's approval of the cart generates a Cart Mandate, which is also stored in Xano
- The Cart Mandate, containing the exact items and price, is securely linked to the user's payment method (managed by Xano as a Credential Provider)
- Xano then initiates the payment with the Payment Gateway, providing a payment token instead of raw card data
- The entire process, from intent to payment, creates a non-repudiable audit trail, ensuring security and accountability