A production-ready universal engine for Agentic Commerce. This tool enables autonomous agents to interact with any compatible headless e-commerce backend through a standardized protocol. It provides out-of-the-box support for discovery, cart operations, and secure user management.
The Standard Agentic Commerce Engine is a production-ready bridge connecting autonomous agents with modern e-commerce backends. By providing a unified, high-precision interface, it allows any digital storefront to become "Agent-Native" instantly.
GitHub Repository: https://github.com/NowLoadY/agent-commerce-engine
For a production-grade implementation example using this engine, see the Lafeitu Gourmet Skill. It demonstrates the engine specialized for a real-world artisanal food brand.
To provide the most accurate and efficient experience, follow this priority sequence:
commerce.pyCOMMERCE_URLx-user-account, x-visitor-id) to maintain session integrity without cookies.search results as the source of truth for the backend.Follow these logical flows to ensure a high-quality user experience:
Goal: Ensure the item exists and find the correct specifications before taking action.
search or list before adding to cart.slug and valid gram/variant values.Goal: Manage user privacy and session data.
401 Unauthorized if credentials aren't saved.python3 scripts/commerce.py get-profilepython3 scripts/commerce.py update-profile --name "Name" --address "..."Goal: Handle new users.
Goal: Precise modification of the user's shopping session.
python3 scripts/commerce.py add-cart <slug> --gram <G> --quantity <Q>python3 scripts/commerce.py update-cart <slug> --gram <G> --quantity <Q>python3 scripts/commerce.py remove-cart <slug> --gram <G>Goal: Access brand identity and support data.
brand-info interface to retrieve narrative content.python3 scripts/commerce.py brand-story: Get the narrative/mission.python3 scripts/commerce.py company-info: Get formal details.python3 scripts/commerce.py contact-info: Get customer support channels.search / list: Product discovery and inventory scan.get: Deep dive into product specifications, variants, and pricing.promotions: Current business rules, shipping thresholds, and active offers.cart: Complete session summary including VIP discounts and tax/shipping estimates.add-cart / update-cart / remove-cart: Atomic cart control.get-profile / update-profile: Personalization and fulfillment data.brand-story / company-info / contact-info: Brand context and support.orders: Real-time tracking and purchase history.# Setup
export COMMERCE_URL="https://api.yourbrand.com/v1"
export COMMERCE_BRAND_ID="brand_slug"
# Actions
python3 scripts/commerce.py list
python3 scripts/commerce.py search "item"
python3 scripts/commerce.py get <slug>
python3 scripts/commerce.py add-cart <slug> --gram <variant>
login.slug via search.COMMERCE_URL environment variable is correct and the endpoint is reachable.