Merchant-Side Unified Integration Architecture for AI Shopping Agents

    As AI shopping agents and platform-level agent protocols move toward default integration, merchants face a critical shift from one-off API customization to building machine-readable, governable capabilities. This article presents a merchant-side reference architecture with three layers: capability discovery, identity and authorization, and transaction execution. It explains how to publish a static, versioned capability descriptor at a fixed endpoint; how to separate agent identity from user identity with scoped, revocable consent; how to coordinate with existing checkout protocols instead of replacing them; and how to apply rate limiting, anomaly detection, full-link tracing, and audit controls. It also outlines generic infrastructure requirements for hosting stateless interfaces, static assets, key management, and observability. The goal is to help merchants reduce integration overhead while keeping data boundaries, trust governance, and post-sale responsibility clear.

    1. Background: From One-by-One Integration to Default Platform Access

    Recent industry developments show that an e-commerce platform has announced its agent-interaction protocol specification has reached a usable 1.0 state and has formed default integration with merchant systems in its ecosystem. Meanwhile, a personal assistant product on the platform side has begun to proactively discover merchant capability description entry points. Taken together, these two changes signal an important turning point: the heavyweight work of negotiating API changes, running integration tests, and completing regression testing store by store is being compressed into a one-time default capability rollout at the platform level.

    For merchants, this directly means a sharp drop in the marginal cost of integration. However, it is easy to draw the wrong conclusion from this. “Publishing an entry point” and “actually generating agent-driven orders” are separated by multiple engineering and governance layers, including identity, authorization, product and inventory semantic alignment, and fulfillment and after-sales responsibility assignment. Therefore, the investment worth making in advance is not waiting for a default switch to be turned on, but building the store-side “machine-understandable capability surface” into a sustainable, evolving infrastructure.

    This article abstracts these issues into a general reference architecture covering three layers of capability:

    • Capability Discovery Layer: Enable agents to deterministically find “what this store can do, how to contact it, and what prerequisites are required.”
    • Identity and Authorization Layer: When an agent acts on behalf of a specific consumer, its identity must be verifiable, its permissions must be bounded, and its behavior must be auditable.
    • Transaction Execution Layer: Shopping carts, checkout, orders, payments, and after-sales service should be handled by existing protocols with strong consistency and compliance requirements, avoiding reinventing the wheel.

    2. Capability Discovery Layer: Translating a “Storefront” into Machine-Readable Capability Contracts

    2.1 Why a Static Entry File Is Needed

    When a personal assistant visits a site and can only rely on page scraping and model inference, it encounters three stable obstacles: unstable entry points (page redesigns cause semantic drift), uncontrolled costs (scraping and inference overhead scale linearly with site size), and unclear boundaries (it is difficult to distinguish public information from capabilities that require authorization). A relatively consistent industry approach is to publish a static, cacheable, versioned capability description file at the site root or a fixed conventional location, which the agent reads as its first hop.

    The responsibility boundary of this file must be restrained. It handles “description and guidance” and does not carry “transaction semantics.” A reasonable field organization is roughly as follows:

    1. {
    2. "protocol": "agent-discovery",
    3. "version": "1.0.0",
    4. "capabilities": [
    5. { "name": "product.search", "endpoint": "/agent/search", "auth": "none" },
    6. { "name": "product.detail", "endpoint": "/agent/p/{id}", "auth": "none" },
    7. { "name": "cart.create", "endpoint": "/agent/cart", "auth": "bearer" }
    8. ],
    9. "identity": { "methods": ["oauth2", "signed-assertion"] },
    10. "delegation": { "max_scope": "cart:write", "consent_required": true },
    11. "commerce": { "cart": "UCP-like", "checkout": "hosted" },
    12. "contact": { "support": "https://example.invalid/support-agent" },
    13. "policy": { "data_minimization": true, "log_retention_days": 30 }
    14. }

    The design points focus on four areas:

    1. Capability granularity: Divide capabilities by “consumer intent” rather than “internal modules,” such as “product search,” “inventory confirmation,” and “add to cart,” to avoid exposing internal service topology.
    2. Front-loaded authentication declarations: Each capability explicitly declares the required authorization type, allowing the agent to initiate the authorization flow in advance and reduce mid-process failures.
    3. Delegation scope limits: Use max_scope to hard-code the maximum permissions an agent can obtain, for example, allowing writes to the cart only but not allowing direct order creation.
    4. Reference rather than redefine transaction protocols: Shopping cart and checkout capabilities should be expressed by referencing external common protocol identifiers, preventing the formation of new private semantic silos.

    2.2 Caching, Invalidation, and Gradual Rollout

    A static entry file is naturally suited for edge caching, but it must be paired with an invalidation strategy: content negotiation and ETag/Last-Modified validation, clear version number increment rules, and, in gradual rollout scenarios, returning different capability views by agent source or user shard. It is recommended to include the file in the regular release pipeline and manage it with the same source as the capability switches for product and inventory services, avoiding long-term risks such as “documented capabilities not matching real online capabilities.”

    3. Identity and Authorization Layer: Trust Propagation When Agents Represent Consumers

    The core difficulty of agent-driven ordering is not the technical interface, but whether the trust chain can be established: merchants need to confirm that a request indeed comes from an agent authorized by a specific principal, and that the agent’s permissions are limited to the scope the consumer has agreed to.

    3.1 Identity Verification: Separating Agent Identity from User Identity

    A “dual-principal” model is recommended:

    • Agent Identity: Identify the calling party through standardized client credentials or signed assertions, used for rate limiting, quota management, and accountability tracing.
    • User Identity: Carried through a one-time authorization code or short-lived token, confirming “on whose behalf” the agent acts, with the token bound to a specific order context.

    The value of separation is that even if agent credentials are leaked, attackers cannot impersonate arbitrary users and perform unauthorized operations. Conversely, if a user token expires, it will not interrupt the agent’s own capability negotiation.

    Authorization scopes should follow the principle of least privilege and be tiered by risk:

    • Read-only: Product, price, inventory, and logistics timing queries, which are low-risk and may allow anonymous or weak authorization.
    • Writable: Cart additions, deletions, and modifications, and discount calculations, which require user-level authorization and are subject to quota limits on write operations.
    • High-sensitivity: Creating orders, initiating payments, and changing delivery addresses, which require secondary confirmation or strong identity verification and clearly assigned responsibility.

    Consent records should be structured and retained: authorization subject, agent identifier, scope, validity period, and revocation entry point. This is both a compliance requirement and the only trusted basis for subsequent dispute resolution.

    3.3 Session and State Management

    Shopping cart and checkout flows are typically multi-turn and cross-agent, so state must be server-addressable rather than dependent on client memory. Practical points include:

    • Cart identifiers should be issued by the server with expiration times and binding relationships (agent + user);
    • All mutation operations should have idempotency keys to prevent duplicate additions or duplicate orders caused by retries;
    • Price and inventory validation should be re-executed at the “confirmation stage” to avoid overselling and price discrepancy disputes caused by long sessions.

    4. Transaction Execution Layer: Coordinating with Existing Checkout Protocols Rather Than Replacing Them

    A standardized discovery layer solves the problem of “finding the door.” Transaction execution should still be handled by mature solutions. A typical reference implementation flow is as follows:

    1. The agent reads the capability discovery file to confirm supported capabilities and authentication methods;
    2. If writable capabilities are involved, the agent redirects to the user consent flow to obtain a limited token;
    3. The agent calls product and inventory APIs to complete candidate set convergence and requirement confirmation;
    4. The agent creates or updates the cart, and the server returns a checkout session with an expiration time;
    5. Checkout is completed in a hosted page or standard protocol, and payment information does not enter the agent’s visible scope;
    6. Order status and after-sales service are synchronized through existing open APIs or callback notifications.

    An important boundary must be emphasized: payment credentials, risk-control features, and complete user profiles should not be exposed through the capability discovery layer. The agent’s reasonable responsibility is to pass intent and necessary context, not to become a data aggregation point.

    5. Engineering Implementation Checklist: Risk Control, Idempotency, and Observability

    Systems serving agent traffic need to bear the new type of pressure brought by “high-frequency automation and composable intent.” At a minimum, the following mechanisms are recommended:

    • Rate and quota limits: Implement dual-layer rate limiting by agent identifier and user dimension to prevent a single agent from scraping and dragging down the inventory service.
    • Behavioral anomaly detection: Incorporate patterns such as high-frequency short-term searches, abnormal cross-category jumps, and immediate abandonment after adding to cart into the risk-control rule set.
    • Full-link tracing: Generate a unified trace identifier for each agent request, linking the three stages of capability negotiation, authorization, and transaction logs for accountability and troubleshooting.
    • Audit trail: Retain authorization consent snapshots and before-and-after states of key operations; retention periods and de-identification policies need to be defined in advance.
    • Degradation plans: When the capability discovery service is unavailable, agents should be able to fall back to the regular storefront experience, and business operations must not block real users due to entry-point failures.

    On the hosting side, this type of architecture has relatively general infrastructure requirements: stateless capability interfaces are suitable for deployment on container platforms with elastic scaling policies configured; capability description files and static resources are suitable for object storage with content delivery networks; token signing and key rotation can rely on key management services; and full-link tracing, log retrieval, and metric alerting can build a unified observability dashboard through log services and monitoring and alerting systems. Baidu AI Cloud provides standardized product forms for these general capability categories, enabling teams to implement the above architectural layers with relatively low modification effort.

    6. Conclusion: The Real Moat Lies in Data Boundaries and Trust Governance

    Default platform access makes “being discoverable by agents” a basic baseline, and competition shifts upward to three areas: the accuracy and consistency of capability descriptions, the verifiability of authorization and consent, and the clarity of transaction and after-sales responsibility. For merchants, the value of standardized discovery extends beyond low-cost customer acquisition; it allows merchants to serve consumption demand from multiple different personal assistants without giving up customer relationships and user data.

    Therefore, merchants are advised to treat capability building as a long-term asset rather than a one-time integration: incorporate capability descriptions into versioned and gradual rollouts, tier the authorization model by risk, leave transaction execution to existing protocol chains with strong consistency and compliance guarantees, and use observability systems to continuously verify the consistency between “declared capabilities” and “real capabilities.” Once these foundations are solid, regardless of which type of personal assistant becomes the primary entry point, merchants can receive traffic at controllable costs while maintaining clear boundaries for data and relationships.