AgentCart

Description

AI agents are the new shoppers. Platforms like ChatGPT, Google Gemini, and Perplexity are increasingly recommending and purchasing products on behalf of users. AgentCart makes your WooCommerce store visible and shoppable to these AI agents.

What this plugin does:

  • Connects your WooCommerce store to the AgentCart platform with a simple 6-digit pairing code
  • Enables AI agents to discover and search your full product catalog
  • Allows AI agents to create checkout sessions so customers can complete purchases
  • Tracks which orders originate from AI agent interactions
  • Keeps your product data synced automatically

How AI agents shop your store:

  1. An AI agent (ChatGPT, Gemini, etc.) receives a shopping request from a user
  2. The agent discovers your store through AgentCart’s Universal Commerce Protocol (UCP)
  3. It searches your catalog, compares products, and selects the best match
  4. The agent creates a checkout session and hands the customer a link to complete payment

Your existing WooCommerce checkout, payments, and shipping all work as normal — the agent handles discovery and selection, the customer handles payment.

Key features on AgentCart:

  • AI-readiness scoring — See how well your store is optimized for AI agents
  • Product optimization — AI-enriched descriptions that help agents understand and recommend your products
  • Agent analytics — Track which AI platforms visit your store, what they search for, and what converts
  • A/B testing — Test different product descriptions to see which performs better with AI agents
  • Agent Playground — See exactly what AI agents see when they shop your store

External services

This plugin relies on the following external services. Connecting to AgentCart is the core purpose of the plugin and is required for it to function.

1. AgentCart (agentcart.io / app.agentcart.io)

AgentCart is the platform this plugin connects your WooCommerce store to. It makes your products discoverable and purchasable by AI shopping agents (such as ChatGPT, Google Gemini, and Perplexity).

What data is sent to AgentCart (app.agentcart.io), and when:

  • When you pair your store (one-time, after you enter the 6-digit code): your store URL, store name, WooCommerce currency, WooCommerce version, and the auto-generated WooCommerce REST API credentials are sent so AgentCart can communicate with your store.
  • When the plugin retrieves your store’s public agent URL (the “UCP slug”): your AgentCart merchant ID is sent so AgentCart can return the slug.
  • When you disconnect or deactivate the plugin: your AgentCart merchant ID is sent so AgentCart can mark your store as disconnected.

After pairing, AgentCart uses the stored REST API credentials to read your product catalog (titles, descriptions, prices, images, availability) and to create checkout sessions when an AI agent initiates a purchase. No customer personal data is shared with AgentCart unless an AI agent initiates a checkout session.

This service is provided by AgentCart:

  • Terms of Service: https://agentcart.io/terms
  • Privacy Policy: https://agentcart.io/privacy

2. Universal Commerce Protocol specification (ucp.dev)

AgentCart exposes your store to AI agents using the open Universal Commerce Protocol (UCP). The discovery manifest this plugin serves at /.well-known/ucp contains https://ucp.dev/... URLs that identify the UCP version, specification, and JSON schemas an agent should use to interpret your store.

These URLs are static references embedded in the manifest text. The plugin does not send any of your store or customer data to ucp.dev, and does not make any requests to it — the links simply tell AI agents which protocol and schemas the manifest follows.

  • UCP specification: https://ucp.dev/

Screenshots

Installation

  1. Upload the agentcart folder to /wp-content/plugins/, or install directly through the WordPress plugin screen
  2. Activate the plugin through the Plugins screen
  3. Go to WooCommerce AgentCart
  4. Enter the 6-digit pairing code from your AgentCart dashboard

The plugin automatically generates WooCommerce REST API keys for secure communication with AgentCart. No manual configuration needed.

FAQ

Do I need an AgentCart account?

Yes. Sign up at agentcart.io and connect your store using the pairing code. AgentCart is free to get started.

What data does this plugin share?

The plugin shares your product catalog (titles, descriptions, prices, images, availability) with AgentCart so AI agents can recommend and sell your products. Order completion events are shared to track agent-driven sales. No customer personal data is shared unless an AI agent initiates a checkout.

Does this affect my store’s performance?

No. The plugin only responds to incoming API requests from AgentCart. It does not add any frontend JavaScript, CSS, or tracking code to your store pages.

Which AI agents are supported?

AgentCart works with any AI agent that supports the Universal Commerce Protocol (UCP), including ChatGPT (OpenAI), Google Gemini, Google AI Mode, and Perplexity. As more AI platforms adopt agentic commerce, your store is automatically available to them.

Can I control what agents see?

Yes. Through the AgentCart dashboard you can review and edit the product descriptions that AI agents receive, run A/B tests on different descriptions, and monitor which products agents recommend.

Can I disconnect at any time?

Yes. Go to WooCommerce AgentCart and click Disconnect. Your store will immediately stop being available to AI agents. Reactivating later preserves your settings.

Does this work with WooCommerce HPOS?

Yes. The plugin declares full compatibility with WooCommerce High-Performance Order Storage.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“AgentCart” is open source software. The following people have contributed to this plugin.

Contributors

Translate “AgentCart” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.3.4

  • UX fix: agentcart_session_id is no longer attached to order line-items, so it no longer appears as a public attribute on the buyer’s order summary / receipt. The session ID is still attached at the order level (invisible to the buyer) and remains readable by AgentCart’s webhook handler.

1.3.3

  • Fix: agentcart_session_id is now copied to both order meta AND line-item meta via the woocommerce_checkout_create_order_line_item hook, which fires with direct access to cart_item_data. v1.3.2’s session-then-cart-iterate fallback was unreliable because WooCommerce does not automatically promote arbitrary cart_item_data keys to line-item meta.

1.3.2

  • Fix: agentcart_session_id now propagates to the order via cart-item meta as well as via WC session, making order attribution resilient when the WC session cookie is dropped between the cart-restore redirect and checkout submission (e.g. on COD checkouts that bounce through guest-cart flow).
  • attach_session_id_to_order falls back to reading from cart-item meta when WC()->session is empty.

1.3.1

  • Fix: WC()->customer is now initialized before cart operations, preventing a fatal error (“Call to a member function get_shipping_country() on null”) when stores have at least one shipping zone configured. Latent issue exposed when zone-less stores added a zone.
  • Internal: extracted ensure_wc_runtime() helper used by cart create, cart update, coupon apply, shipping rates, and delete endpoints.

1.3.0

  • Coupon endpoint now returns rejected[] alongside applied[] so AI agents see why a code didn’t apply (invalid, expired, limit_reached, minimum_not_met, not_applicable)
  • Uses WC_Discounts::is_coupon_valid() to capture per-code reason; falls back to ‘invalid’ for non-existent coupon codes

1.2.0

  • Add shipping rates REST endpoint (POST /agentcart/v1/cart/{token}/shipping-rates) for UCP fulfillment capability
  • Add coupon codes REST endpoint (PUT /agentcart/v1/cart/{token}/coupons) for UCP discount capability
  • Advertise dev.ucp.shopping.fulfillment and dev.ucp.shopping.discount capabilities in /.well-known/ucp manifest
  • Re-apply stored coupons on checkout restoration (agentcart_cart query param flow)

1.1.0

  • Add cart management REST endpoints (GET/PUT/DELETE /agentcart/v1/cart/{token})
  • Add order retrieval REST endpoint (GET /agentcart/v1/orders/{id})
  • Advertise UCP cart and order capabilities in /.well-known/ucp manifest
  • Increase cart session TTL from 1 hour to 24 hours
  • AI agents can now create, update, and cancel carts before initiating checkout
  • AI agents can now track order status after purchase

1.0.0

  • Initial release
  • One-click store pairing via 6-digit code
  • Automatic WooCommerce REST API key generation
  • Custom REST endpoints for store info, cart creation, and health check
  • Cart restoration and checkout URL generation for AI agent purchases
  • Order meta tracking for agent-attributed sales
  • WooCommerce HPOS compatibility
  • Clean uninstall with full data removal