Module reference

llms.txt for Magento 2 — module reference

Covers angeo/module-llms-txt 4.3.3 · Checked 16 October 2026 · MIT licensed

llms.txt builds the files that let AI systems read your store in a few requests instead of crawling every page. It follows the llms.txt specification v2 (10 August 2026).

After install your store serves these URLs:

URLWhat it is
/llms.txtThe llms.txt file: a short Markdown map of the store
/llms-full.txtSame structure with full descriptions (off by default)
/llms.jsonlOne JSON record per line, for AI indexing
/{url-key}.mdA Markdown version of any product, category or CMS page
/agents.mdA short manual for AI agents: rules, policies, machine-readable links
/sitemap_agentic_discovery.xmlA sitemap that lists the files above

Product, category and CMS pages also get two links in <head>, so an agent that has a page URL can find its Markdown version and the llms.txt that describes it:

<link rel="alternate" type="text/markdown" href="https://shop/blue-shirt.html.md"/>
<link rel="describedby" href="https://shop/llms.txt"/>

How generation works

Files are built by cron (daily by default), from the command line, or with the Generate Now button in the admin. The catalog is read once per store and every enabled format is written from that one pass. Output is streamed to disk with bounded memory and renamed only when complete, so visitors never get a half-written file. Files are served with ETag and Cache-Control headers.

Both Markdown forms work: page.html.md (v1) and page.md (v2). They are matched against url_rewrite, with or without your URL suffix.

Two facts are often reported wrongly, so here they are plainly:

  • **llms-full.txt is not part of the specification.** It is a convention. It is 5–50 times larger than llms.txt. Turn it on only if you want it.
  • There is no W3C standard for llms.txt. v2 allows files in sub-paths, and the most specific file wins. That is why per-store files such as /de/llms.txt are valid.

Requirements

Magento2.4.x (Open Source, Mage-OS or Adobe Commerce) — magento/framework ^103.0
PHP8.1 – 8.5 — ~8.1.0||~8.2.0||~8.3.0||~8.4.0||~8.5.0
PHP extensionsjson, mbstring

Multi-Source Inventory is optional. With MSI the module reads the salable status, so availability is right on stores with more than one stock.

Installation

composer require angeo/module-llms-txt
bin/magento module:enable Angeo_LlmsTxt
bin/magento setup:upgrade
bin/magento setup:di:compile                # production mode only
bin/magento cache:flush

Then build the files and open https://your-store/llms.txt:

bin/magento angeo:llms:generate

Command line

bin/magento angeo:llms:generate                       # all stores
bin/magento angeo:llms:generate --store=default --no-jsonl
bin/magento angeo:llms:generate --force               # rebuild even if nothing changed
bin/magento angeo:llms:clean --store=default          # delete files, clear .md cache
bin/magento angeo:llms:status                         # last run per store and format
bin/magento angeo:llms:validate --strict              # lint against llms.txt v2; warnings fail
CommandWhat it does
bin/magento angeo:llms:cleanDelete generated llms.txt / JSONL / agents.md files and flush the .md mirror cache.
bin/magento angeo:llms:generateGenerate llms.txt, llms-full.txt, and JSONL files.
bin/magento angeo:llms:statusShow per-store/per-format llms file generation status.
bin/magento angeo:llms:validateValidate generated llms.txt + JSONL files against the llms.txt v2 spec.

validate checks the H1, at most one summary blockquote, no heading between the summary and the first H2, real Markdown links with absolute URLs, and one JSON object per JSONL line. It warns when llms.txt links point to HTML while Markdown mirrors are on.

Product data for AI shopping agents

Since 4.0.0 the files carry more than the price:

  • Availability — in_stock in JSONL, In stock / Out of stock in Markdown. Loaded in batches, not per product.
  • Image URL — the original base image, not a resized copy.
  • Brand — from an attribute you choose (for example manufacturer), under its own brand key.
  • Extra attributes — a short list such as color, size, material. Dropdowns export as labels, not option IDs.

Prices use the customer group you choose (default NOT LOGGED IN), with special and group prices applied.

Page Builder content

Page Builder adds a lot of layout markup. The module parses it with DOMDocument (not regex) and applies one of four strategies:

StrategyEffect
PreserveKeep all content, strip only wrapper attributes
Exclude (default)Drop elements whose data-content-type is in the excluded list (sliders, banners, product lists, video, maps…)
AllowKeep only the content types in the allowed list (text, heading, html, tabs, rows, columns)
StripDrop every element with a data-content-type

CMS directives such as {{widget}} and {{block}} are resolved through Magento’s frontend filter.

agents.md

agents.md tells an AI agent how to work with the store. It lists your policy pages (delivery, returns, privacy, terms, about, support) so an agent can quote them instead of guessing. The section is left out when you set none. When UCP or MCP Server is installed, their endpoints are linked automatically.

Configuration reference

All settings are under Stores → Configuration → Angeo → LLMs.txt. The table shows each field, its config path (for bin/magento config:set) and its default value.

General (4)
SettingConfig pathDefault
Enableangeo_llms/general/enabledYes
Exclude This Scopeangeo_llms/general/exclude_storeNo
Store Summaryangeo_llms/general/store_summary—
Attribution Signatureangeo_llms/general/signature_enabledYes
Actions (1)
SettingConfig pathDefault
Statusangeo_llms/actions/status_panel—
Content (8)
SettingConfig pathDefault
Include Categoriesangeo_llms/content/include_categoriesYes
Include CMS Pagesangeo_llms/content/include_cmsYes
Include Productsangeo_llms/content/include_productsYes
Products under "## Optional"angeo_llms/content/products_under_optionalNo
Product Limitangeo_llms/content/product_limit5000
Exclude Out-of-Stock Productsangeo_llms/content/exclude_out_of_stockNo
CMS Identifiers to Excludeangeo_llms/content/cms_exclude_identifiersno-route,enable-cookies,privacy-policy-cookie-restriction-mode
Customer Group for Pricingangeo_llms/content/customer_group_id0
Output Formats (8)
SettingConfig pathDefault
Generate llms.txtangeo_llms/formats/generate_llms_txtYes
Generate llms-full.txtangeo_llms/formats/generate_llms_full_txtNo
Generate JSONLangeo_llms/formats/generate_jsonlYes
Serve /url-key.md Mirrorsangeo_llms/formats/generate_md_mirrorNo
Generate agents.mdangeo_llms/formats/generate_agents_mdYes
Emit Link Relationsangeo_llms/formats/emit_link_relationsYes
Link to Markdown Mirrors in llms.txtangeo_llms/formats/link_to_mdYes
Serve Agentic Discovery Sitemapangeo_llms/formats/generate_agentic_sitemapYes
Product Data (5)
SettingConfig pathDefault
Include Availabilityangeo_llms/product_data/include_availabilityYes
Include Image URLangeo_llms/product_data/include_imageYes
Brand Attribute Codeangeo_llms/product_data/brand_attribute—
Availability Sourceangeo_llms/product_data/stock_sourceauto
Additional Attributesangeo_llms/product_data/export_attributes—
Agents.md Content (6)
SettingConfig pathDefault
Delivery Pageangeo_llms/agents/page_shipping—
Returns Pageangeo_llms/agents/page_returns—
Privacy Pageangeo_llms/agents/page_privacy—
Terms Pageangeo_llms/agents/page_terms—
About Pageangeo_llms/agents/page_about—
Support / Contact Pageangeo_llms/agents/support_url—
Content Sanitization (5)
SettingConfig pathDefault
Resolve CMS Directivesangeo_llms/sanitizer/resolve_directivesYes
Resolve Directives in Product Contentangeo_llms/sanitizer/resolve_directives_productsNo
Page Builder Strategyangeo_llms/sanitizer/page_builder_strategyexclude
Excluded Content-Typesangeo_llms/sanitizer/page_builder_excluded_typesproducts,banner,slider,slide,video,map,buttons,button-item,block,dynamic-block,d
Allowed Content-Typesangeo_llms/sanitizer/page_builder_allowed_typestext,heading,html,tabs,tab-item,row,column,column-group
Performance (3)
SettingConfig pathDefault
Skip Generation When Nothing Changedangeo_llms/performance/skip_unchangedNo
Invalidate Markdown Mirror on Saveangeo_llms/performance/invalidate_mirror_on_saveYes
Collection Page Sizeangeo_llms/performance/collection_page_size500
HTTP Caching (1)
SettingConfig pathDefault
Cache-Control TTL (seconds)angeo_llms/http/cache_ttl_seconds3600
Schedule (1)
SettingConfig pathDefault
Cron Expressionangeo_llms/cron/schedule0 2 * * *

Read this before you turn on Skip Generation When Nothing Changed. Change detection reads entity timestamps. It does not see stock changes or prices changed by catalog price rules. A store with moving stock would publish old in-stock flags. Turn it on only if your catalog changes through product saves. --force always rebuilds.

Cron

JobCron groupSchedule
angeo_llms_generateangeo_llms0 2 * * * by default, set in angeo_llms/cron/schedule

Extending

Add your own section (brands, blog posts, store locator) by implementing Angeo\LlmsTxt\Api\EntityProviderInterface. A provider yields format-free EntityRecord objects. The renderers turn each record into llms.txt, llms-full.txt and JSONL, so you write the data part once.

<type name="Angeo\LlmsTxt\Model\Pipeline\SinglePassGenerator">
    <arguments>
        <argument name="entityProviders" xsi:type="array">
            <item name="brands" xsi:type="object" sortOrder="50">Vendor\Module\Provider\BrandProvider</item>
        </argument>
    </arguments>
</type>

Keep the bundled StoreEntityProvider first, because it writes the H1 and the summary. Sanitize your content once, with Angeo\LlmsTxt\Api\SanitizerInterface. Providers must yield while paging, never build a full array.

Add a sanitizer filter (for example to remove phone numbers) by implementing SanitizerFilterInterface and adding it to the filters of Angeo\LlmsTxt\Model\Sanitizer\Sanitizer.

Events run per store and per format: angeo_llms_generation_before, angeo_llms_generation_after (with file, bytes, items and duration) and angeo_llms_generation_failed.

Hyvä

Natively compatible. The module ships no JavaScript, CSS or LESS. Its only template prints two <link> tags into head.additional, which Hyvä keeps. No compatibility module and no hyva-themes.json entry is needed.

Upgrading

4.0.0 removed the 3.x ProviderInterface, AbstractProvider and the three format generators. A module that still registers a provider on LlmsTxtGenerator fails at setup:di:compile. Move it to EntityProviderInterface and register it on SinglePassGenerator.entityProviders. Drop your own ## Heading lines: the renderers add them. Since 4.0.0, products have their own ## Products section instead of ## Optional. Full notes are in the changelog.

FAQ

Do I need llms-full.txt?

Usually not. It is not part of the specification and it is 5–50 times larger. It can help on small catalogs. Leave it off unless you have a reason.

How often are the files rebuilt?

Daily at 02:00 by default. You can change the cron expression, run angeo:llms:generate by hand, or use Generate Now in the admin.

Does it show stock?

Yes, since 4.0.0. With Multi-Source Inventory it reads the salable status. Without MSI it reads the legacy stock index.

Does it work on multi-store installs?

Yes. Each store gets its own files, and v2 allows per-store paths such as /de/llms.txt. You can exclude a website or store view.

Can I check the output in CI?

Yes. Run bin/magento angeo:llms:validate --strict. Warnings then fail the build.

This page was written from the README.md, composer.json and etc/*.xml files of tag 4.3.3, read on 16 October 2026. Settings, commands and defaults come straight from that code. If a newer release is out, the README on GitHub wins.