Agent001 – Support Assistant for WooCommerce

Description

Agent001 – Support Assistant connects your WooCommerce store to agent001 (https://app.agent001.ai), a hosted AI assistant. After a one-click connect (no API keys to copy and paste), the plugin:

  • Sends a snapshot of your products (title, description, price, stock, SKU, categories, variations) to agent001 so the assistant can answer product questions.
  • Re-syncs automatically whenever a product is created, updated or deleted, so the assistant always sees the current catalog. Per-product updates are queued through Action Scheduler and processed in the background.
  • Adds the agent001 chat widget to your storefront (a single <script> tag in the footer) once you select an agent in the settings.
  • Exposes a privacy-protected REST endpoint at /wp-json/agent001/v1/orders/{number} that the chat widget calls from the visitor’s browser to look up an order. The endpoint requires a matching customer email, so it cannot be enumerated.

The plugin does not store any new data of its own. It uses standard WooCommerce APIs (wc_get_order, wc_get_products) to read existing data and forward it to agent001. Order data is read on demand only when a chat user asks about a specific order with the matching email.

Features

  • One-click Connect / Disconnect — no manual API key copy-paste.
  • Pick which agent in your agent001 account this store feeds (drop-down in the settings).
  • Optional category filter — sync only products from the categories you choose.
  • Realtime per-product sync on create / update / delete via Action Scheduler.
  • Manual “Sync now” button for bulk imports or to recover from a failed event.
  • Last sync status and error messages visible in the admin.
  • Order status lookup — the chat widget asks the visitor for their order number and email, then queries the store directly via the REST endpoint (browser store, never our backend store), so it works behind Cloudflare or any other WAF without configuration.
  • Fully removable — uninstall cleans up every option, transient, and scheduled action created by the plugin.

External services

This plugin connects to the agent001 service at https://app.agent001.ai. It is required for the assistant to function.

1. One-click connect (only when an admin clicks “Connect”)

  • Endpoint contacted: https://app.agent001.ai/connect and https://app.agent001.ai/connect/exchange
  • Data sent: site URL (your WordPress home URL) and a one-time random state token.
  • Data received: an API key the plugin stores locally to authenticate further requests.

2. Product catalog sync (after connection, automatic)

  • Endpoint contacted: https://app.agent001.ai/api/v1/ingest/products and https://app.agent001.ai/api/v1/ingest/products/{id}
  • Triggered by: the admin clicking “Sync now”, or any product create/update/delete event in WooCommerce (queued through Action Scheduler).
  • Data sent: per-product information (id, name, description, SKU, price, stock, categories, image URL, variations) and your site URL. No customer or order data is sent during sync.

3. Agent selection (admin only)

  • Endpoint contacted: https://app.agent001.ai/api/v1/integrations/me/agents
  • Triggered by: an admin opening the plugin settings or saving the selected agent.
  • Data sent: the API key in a header. The plugin receives the list of agents available in the connected agent001 account and saves the chosen agent’s ID locally.

4. Chat widget (loaded on your storefront pages)

  • Resource loaded: https://app.agent001.ai/embed/loader.js (a script tag added to the footer of your storefront).
  • The widget is loaded only after an admin selects an agent. It is never rendered in wp-admin.

5. Order status lookup (when a chat visitor asks)

  • The chat widget — running in the visitor’s browser, not on our servers — calls your store’s /wp-json/agent001/v1/orders/{order_number}?email={email} endpoint with the customer’s order number and the email used at checkout.
  • The plugin returns order status, totals, items, shipping method and tracking number only if the email matches the order’s billing email. Customer name and address are never returned.
  • If you do not want the widget to expose this endpoint, deactivate the plugin or remove the agent selection in the settings — the script tag and the endpoint then stop working.

Service terms: https://agent001.ai/terms
Privacy policy: https://agent001.ai/privacy

Privacy

Data leaving your site:

  • Product data is sent to agent001 for catalog indexing whenever you sync. This includes anything you publish on the storefront — titles, descriptions, prices, stock, SKUs, categories, variation attributes, image URLs.
  • Order data is sent on demand, one order at a time, only when a chat visitor (in their own browser) supplies a matching order_number + email. The response contains: status, dates, currency, total, shipping method, tracking number, line items (name, quantity, price). It deliberately excludes customer name, billing/shipping address, phone number, customer notes, IP address, payment details.
  • No tracking, analytics or telemetry is sent.

Data agent001 keeps:

  • The product snapshot is stored on the agent001 platform for the lifetime of your project there.
  • The order data the chat asks about is processed transiently by the agent001 backend (kept in memory only during a single chat reply, not written to any database).

Widget authentication note:

  • The chat widget loaded on your storefront carries a non-secret site identifier (the widget_key) in a request header when calling the order-lookup endpoint on your store. This identifier prevents off-storefront enumeration but is by design visible to anyone who can load your storefront — it is not a per-user authentication token. Order-status protection comes from the order_number + matching billing email check, not from this header.

You can disconnect the plugin at any time. Disconnect clears the API key, removes the chat widget from the storefront, and stops further outbound requests. Uninstalling the plugin removes every option, transient and scheduled action it created.

Screenshots

  • Connect screen in WooCommerce settings — single click to authorise the store with agent001.
  • Settings panel — connection status, receiving agent, and per-category sync filter in one view.
  • Sync — manual full-catalog sync with live progress and last-result status.
  • Storefront chat widget — visitor asks the AI assistant; the widget calls the store directly to look up orders.

Installation

  1. Upload the agent001 folder to /wp-content/plugins/ (or install via the WordPress admin uploader).
  2. Activate the plugin through the Plugins menu.
  3. Go to WooCommerce Settings Support Assistant and click Connect. You are redirected to agent001 to authorise — no API keys to copy.
  4. After the redirect back, pick which agent should receive product data from this store and click Save changes.
  5. The chat widget will appear on your storefront and product changes will sync automatically. Use the Sync now button to push the full catalog after a bulk import.

FAQ

Is WooCommerce required?

Yes. The plugin refuses to boot without WooCommerce active and shows an admin notice instead. It is built around WooCommerce data (products, taxonomies, orders) and has nothing useful to do on a plain WordPress install.

How does sync stay in sync without a recurring schedule?

Every product create, update or delete event in WooCommerce queues a single per-product sync through Action Scheduler. The job runs in the background on the next request after each change, so the catalog on agent001 mirrors your store within seconds. Use Sync now for bulk imports or to recover from a failed background job.

How does order lookup work without a server-to-server call from agent001?

The chat widget runs in the visitor’s browser and calls your store’s REST endpoint directly. From the store’s point of view it’s just another browser request from the same visitor that loaded the widget — Cloudflare and other WAFs let it through without any allowlist. The agent001 backend never touches your store directly.

What stops someone from enumerating orders by guessing numbers?

The lookup endpoint requires both the order number AND the email used at checkout, and returns 404 if either is missing or doesn’t match. Plus a per-IP rate limit (10 requests / minute) makes brute-force impractical.

Can I hard-code the API key in wp-config.php instead of storing it in the database?

Yes. Define AGENT001_API_KEY in wp-config.php (e.g. define( 'AGENT001_API_KEY', 'your-key-here' );) and the plugin will read the key from that constant instead of from the database. Connect / Disconnect / Reconnect buttons in the admin become disabled in this mode (the key is read-only). This is the recommended setup for staging environments where you want the key out of the database backup.

Can I uninstall cleanly?

Yes. Uninstall removes every option (agent001_settings, agent001_last_sync_result, agent001_sync_progress), every transient (agent001_last_sync_status, agent001_sync_running, agent001_agents_cache, plus the connect-state, rate-limiter and kick-throttle transients prefixed with agent001_), and unschedules any pending agent001_sync_product jobs in Action Scheduler. Nothing is left behind.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Agent001 – Support Assistant for WooCommerce” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.0.0

  • Initial release.