Skip to content

Agent Access

CartBay includes an optional agent access layer for trusted automation systems. It is closed by default and becomes active only after a store administrator enables it.

SurfaceUse caseAuthentication
CartBay Agent RESTCartBay-specific automation endpoints.WordPress auth or CartBay Bearer token.
WordPress AbilitiesWordPress-native ability discovery and execution.WordPress authentication, often Application Passwords.
MCP Adapter exposureExpose CartBay Abilities to MCP clients through the official WordPress MCP Adapter.Authenticated WordPress MCP user.

CartBay Bearer tokens authenticate only CartBay agent REST endpoints. They are not accepted as general WordPress authentication.

Open WooCommerce > CartBay > Settings > AI Agent Access.

SettingDefaultMeaning
Enable Agent AccessOffMaster gate for all agent capabilities.
REST AccessOnEnables /wp-json/cartbay/v1/agent when master access is enabled.
Abilities AccessOnRegisters CartBay WordPress Abilities for authenticated users.
MCP Public ExposureOffMarks abilities as MCP-public for the MCP Adapter.
Agent Write ActionsOffAllows safe settings/campaign updates.
Agent Contact ActionsOffAllows email-oriented session actions.
Agent Sensitive DataOffAllows raw PII and sensitive recovery details.
Agent Destructive ActionsOffAllows expiring or deleting sessions.

WordPress capabilities:

  • cartbay_agent_read
  • cartbay_agent_write
  • cartbay_agent_contact
  • cartbay_agent_sensitive
  • cartbay_agent_destructive
  • cartbay_agent_manage_tokens
  • cartbay_agent_manage_access

Bearer token scopes:

  • read
  • write
  • contact
  • sensitive
  • destructive
  • manage_tokens
  • manage_access

Administrators receive all agent capabilities. Shop managers receive read, write, and contact capabilities.

MethodPath
GET/wp-json/cartbay/v1/agent/manifest
GET/wp-json/cartbay/v1/agent/sessions
GET/wp-json/cartbay/v1/agent/sessions/{id}
POST/wp-json/cartbay/v1/agent/sessions/{id}/actions
GET/wp-json/cartbay/v1/agent/analytics
GET, PATCH/wp-json/cartbay/v1/agent/settings
GET, PATCH/wp-json/cartbay/v1/agent/campaign
GET, POST/wp-json/cartbay/v1/agent/tokens
DELETE/wp-json/cartbay/v1/agent/tokens/{public_id}
GET/wp-json/cartbay/v1/agent/audit-log

Session output masks PII by default. Raw customer email, cart snapshots, coupon data, and linked order details require sensitive access and the sensitive data gate.

Supported actions:

  • mark_abandoned_now
  • cancel_pending_emails
  • send_email_step_now
  • expire_session
  • delete_session

Contact and destructive actions require both a matching capability/scope and the corresponding settings gate.

When the WordPress Abilities API is available, CartBay registers the cartbay-agent category and abilities such as:

  • cartbay/get-agent-manifest
  • cartbay/list-sessions
  • cartbay/get-session
  • cartbay/get-analytics
  • cartbay/get-settings
  • cartbay/update-settings
  • cartbay/get-campaign
  • cartbay/update-campaign
  • cartbay/run-session-action

CartBay does not bundle the MCP Adapter. Site owners can install the official WordPress MCP Adapter and expose CartBay abilities as MCP tools.

CartBay stores a redacted rolling audit log in cartbay_agent_audit_log. Reads and writes should be attributable to the resolved principal, whether that is a WordPress user or CartBay Bearer token.

  1. Create a dedicated least-privilege WordPress user or CartBay token.
  2. Enable only Enable Agent Access and the surface needed for the workflow.
  3. Start with read-only access.
  4. Enable write/contact/sensitive/destructive gates only when required.
  5. Review the audit log after the first automation run.