Skip to content

[Feat]: Standardized "Discovery Layer" for high-frequency polling #134

@TsaZan

Description

@TsaZan

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

  1. 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.

  2. 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.

  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions