-
Notifications
You must be signed in to change notification settings - Fork 371
Description
Is your feature request related to a problem? Please describe.
Yes. Agents need to watch products. The User-Signed Intent Mandate (Human Not Present) requires polling. An agent must check price and stock repeatedly. Scraping HTML is slow. It breaks often. It costs too much money. Using the full AP2 handshake just to check "is it in stock?" is heavy. It wastes resources.
Describe the solution you'd like
Support CommerceTXT as the Discovery Layer. It is a read-only text protocol. It is static. It is cacheable. The Merchant Endpoint (ME) serves a /commerce.txt file. The Shopping Agent (SA) reads it first. It gets the price, the stock, and the SKU. It uses almost no tokens. Then, the agent starts the AP2 transaction. The flow becomes: Read CommerceTXT -> Verify Intent -> Execute AP2.
Spec: https://github.com/commercetxt/commercetxt/tree/main/spec
Describe alternatives you've considered
-
HTML (Scraping) is built for layout, not data. It is heavy (MBs vs KBs). It is brittle. One CSS change breaks the parser. It causes hallucinations when agents try to guess the price visually.
-
JSON (APIs / Linked Data) is the standard for code, but inefficient for agents. It is verbose. Quotes, brackets, and commas consume context window. Our benchmarks show JSON uses 24% more tokens than CommerceTXT. It lacks native navigation. Representing a category tree requires deep nesting. This forces the agent to load irrelevant structure just to find a product.
-
YAML is cleaner than JSON, but dangerous for agents. It is whitespace-sensitive. One wrong space breaks the file. It is hard to generate deterministically from all legacy backends. It lacks the strict structure required for financial context.
Additional context
We tested this on the IKEA US catalog (30,000 items).
Result: 24% fewer tokens than JSON. It solves the polling cost problem.
https://huggingface.co/datasets/tsazan/ikea-us-commercetxt
Code of Conduct
- I agree to follow this project's Code of Conduct