standard-agentic-commerce-engine
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.
- License 许可
- MIT
- 最近更新
- 2026-08-23
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- standard-agentic-commerce-engine
- tags
- [ "ecommerce", "shopping-agent", "commerce-engine", "standard-protocol", "headless-commerce", "agentic-web" ]
- version
- 1.2.4
- description
- 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.
02 资源文件 6
- 参考文档_meta.json474 B
- 参考文档README.md3.5 KB
- 脚本scripts/commerce.py5.5 KB
- 脚本scripts/lib/__init__.py—
- 脚本scripts/lib/commerce_client.py5.1 KB
- 参考文档SERVER_SPEC.md3.2 KB
03 SKILL.md 正文
Standard Agentic Commerce Engine
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
Reference Case: Lafeitu
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.
? Tool Priority & Fallback Strategy
To provide the most accurate and efficient experience, follow this priority sequence:
- API First (Primary): Always attempt to use the
commerce.pyscript first. It provides structured, high-precision data. Configure it via environment variables (COMMERCE_URL). - Stateless Headers: Rely on the engine's built-in header management (
x-user-account,x-visitor-id) to maintain session integrity without cookies. - Self-Correction: If the API returns a 404 for a specific slug discovered via browser, prioritize the API's
searchresults as the source of truth for the backend.
? Agent Operational Logic
Follow these logical flows to ensure a high-quality user experience:
1. Product Discovery & Validation
Goal: Ensure the item exists and find the correct specifications before taking action.
- Action: Always run
searchorlistbefore adding to cart. - Logic: Use the API to discover the correct
slugand validgram/variant values. - Refinement: If multiple results are found, ask the user to specify based on the returned attributes.
2. Authentication & Profile Flow
Goal: Manage user privacy and session data.
- Logic: The API is stateless. Actions requiring identity will return
401 Unauthorizedif credentials aren't saved. - Commands:
- View profile:
python3 scripts/commerce.py get-profile - Update details:
python3 scripts/commerce.py update-profile --name "Name" --address "..."
- View profile:
- Required Data: Respect the schema of the specific brand's backend.
3. Registration Flow
Goal: Handle new users.
- Trigger: When an action returns "User Not Found".
- Instruction: Guide the user to the store's registration URL (often found in brand metadata).
4. Shopping Cart Management
Goal: Precise modification of the user's shopping session.
- Logic: The engine supports incrementing quantities or setting absolute values.
- Commands:
- Add:
python3 scripts/commerce.py add-cart <slug> --gram <G> --quantity <Q> - Update:
python3 scripts/commerce.py update-cart <slug> --gram <G> --quantity <Q> - Remove:
python3 scripts/commerce.py remove-cart <slug> --gram <G>
- Add:
- Validation: Gram/variant values must be strictly chosen from the product's available options list.
5. Brand Information & Storytelling
Goal: Access brand identity and support data.
- Logic: Use the
brand-infointerface to retrieve narrative content. - Tooling:
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.
? Capabilities Summary
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.
? CLI Configuration & Examples
# 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>
? Troubleshooting & Debugging
- Status Code 401: Credentials missing or expired. Recommend
login. - Status Code 404: Resource not found. Verify
slugviasearch. - Connection Error: Verify
COMMERCE_URLenvironment variable is correct and the endpoint is reachable.
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
git-summary
Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.
agent-constitution
Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.