DEV Community

Ievgenii Gryshkun
Ievgenii Gryshkun

Posted on

What is llms.ljson and why eCommerce needs it

AI assistants don't read your website the way customers do. They need structured, machine-readable data β€” and that's exactly what llms.ljson provides.

If you already know about llms.txt, think of llms.ljson as its structured, data-rich sibling β€” purpose-built for eCommerce product catalogs.

πŸ”— This article was originally published on https://angeo.dev/what-is-llms-ljson-and-why-ecommerce-needs-it/:

What Is llms.ljson?

llms.ljson stands for LLM-optimized Line-delimited JSON. It is a file where each line contains a complete, self-contained JSON object representing a single entity β€” a product, a category, or a CMS page.

Unlike a regular JSON array (which wraps everything in brackets and requires loading the whole file at once), LJSON is:

  • Streamable β€” AI agents can read it line by line
  • Scalable β€” stores with 50,000 SKUs don't need one giant file
  • Parseable β€” each line is valid JSON independently

A Single Product Line in llms.ljson

{"type":"product","sku":"WB-004","name":"Alpine Hiking Jacket","price":189.99,"currency":"USD","url":"https://angeo.test/alpine-jacket","category":"Outerwear","short_description":"Waterproof 3-layer shell for alpine conditions","in_stock":true,"attributes":{"color":"Navy","size_options":["S","M","L","XL"],"material":"Gore-Tex"}}
Enter fullscreen mode Exit fullscreen mode

Every product β€” one line. Every line β€” complete context for an AI to understand and recommend that product.


llms.txt vs llms.ljson β€” What Is the Difference?

Feature llms.txt llms.ljson
Format Markdown (human-readable) Line-delimited JSON (machine-readable)
Best for Store overview, pages, categories Full product catalog data
AI use case Context & navigation Product recommendations & queries
Scalability Up to ~500 items Unlimited (streamed line by line)
Attributes Basic (name, URL, price) Full (variants, stock, specs)

Both files work together. llms.txt tells AI what your store is. llms.ljson tells AI what your store sells β€” in full detail.


Why Does eCommerce Specifically Need llms.ljson?

1. AI Agents Need Structured Product Data

When a user asks ChatGPT or Claude "recommend a waterproof jacket under $200," the AI needs structured, queryable product data β€” not HTML product pages. llms.ljson provides exactly that: a clean feed of every product with its attributes, price, stock status, and URL.

2. HTML Product Pages Are Noise for AI

A typical Magento 2 product page contains navigation menus, cookie banners, review widgets, upsell carousels, and footer links. The actual product data is buried inside this noise. AI context windows are limited, and parsing messy HTML wastes them. llms.ljson gives AI only signal, zero noise.

3. Product Catalogs Are Too Large for llms.txt

A store with 5,000 SKUs cannot fit them all meaningfully into a single llms.txt file. llms.ljson handles any catalog size because AI systems can stream and process it line by line β€” one product at a time.

4. Variants, Stock, and Pricing Change Daily

Unlike static blog content, product data changes constantly. A configurable product might have 12 size/color combinations. Stock goes in and out. Prices change with promotions. llms.ljson is generated fresh by cron and always reflects the current state of your catalog.


What Does a Full llms.ljson File Look Like?

Each line is an independent JSON object. Here is a multi-entity example:

{"type":"store","code":"angeo_en","name":"EN","url":"https:\/\/angeo.test\/","currency":"USD","locale":en}
{"type":"category","store":"angeo_nl","id":"4","name":"Sale","parent_id":"2","url":"https:\/\/angeo.test\/sale.html","description":"","embedding_text":"Sale "}
{"type":"product","store":"angeo_en","id":"4","sku":"product_sku","title":"product name","price":"123.00","currency":"USD","short_description":"","description":"test descriprtion","url":"https:\/\/angeo.test\/product-name.html","embedding_text":"product name  test descriprtion"}

Enter fullscreen mode Exit fullscreen mode

An AI agent processing this file can instantly answer:

  • "What waterproof jackets do you have under $300?" β†’ WB-001
  • "Do you have merino base layers?" β†’ WB-002
  • "Is the 3-in-1 jacket in stock?" β†’ No (in_stock: false)

How to Generate llms.ljson for Magento 2

The open-source module angeo/module-llms-txt generates both llms.txt and llms.ljson automatically for your Magento 2 store.

Install in 3 commands:

composer require angeo/module-llms-txt
bin/magento setup:upgrade
bin/magento cache:flush
Enter fullscreen mode Exit fullscreen mode

After installation, navigate to:

Stores β†’ Configuration β†’ General β†’ Angeo β†’ LLMS
Enter fullscreen mode Exit fullscreen mode

Generate manually or let cron handle scheduled updates. Both files are created at your store root:

  • https://yourstore.com/llms.txt
  • https://yourstore.com/llms.ljson

The module supports multi-store and multi-language Magento 2 setups, includes unit tests for both file types, and is MIT licensed.

Source: Packagist


The Bigger Picture: AI Commerce Infrastructure

We are entering a phase where AI agents don't just recommend products β€” they initiate purchase flows on behalf of users. For an AI agent to recommend your products, it must be able to:

  1. Understand what you sell
  2. Filter by price, attributes, stock status
  3. Navigate to a product URL and initiate checkout

Steps 1 and 2 are solved by llms.ljson. Step 3 is the next frontier β€” but without steps 1 and 2, step 3 is impossible.

Stores that generate structured AI feeds today will be the ones AI agents recommend tomorrow.


Summary

  • llms.ljson is a line-delimited JSON file that exposes your full product catalog to AI systems
  • It complements llms.txt β€” together they give AI both context and structured data
  • For Magento 2, the open-source angeo/module-llms-txt generates both files automatically
  • Implementation takes under 5 minutes and requires no custom development

The AI commerce era is not coming β€” it is already here. Structured product feeds are the foundation that makes your store visible to the systems that are replacing traditional search.


Have questions about llms.ljson for Magento 2? Drop a comment below or check the module on Packagist.

Top comments (0)