# llms.txt for Magento 2  -  module reference

> Generate llms.txt, llms.jsonl, Markdown page mirrors and agents.md in Magento 2 (llms.txt v2). Settings, CLI, Page Builder, events, upgrades.

Source: https://angeo.dev/docs/modules/llms-txt/
Updated: 2026-10-17

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](https://llmstxt.org) **v2** (10 August 2026).

After install your store serves these URLs:

| URL | What it is |

| `/llms.txt` | The llms.txt file: a short Markdown map of the store |
| `/llms-full.txt` | Same structure with full descriptions (off by default) |
| `/llms.jsonl` | One JSON record per line, for AI indexing |
| `/{url-key}.md` | A Markdown version of any product, category or CMS page |
| `/agents.md` | A short manual for AI agents: rules, policies, machine-readable links |
| `/sitemap_agentic_discovery.xml` | A 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"/>
```

Package`angeo/module-llms-txt`Latest version4.3.3Magento2.4.xPHP8.1 - 8.5LicenseMIT, freeLinks[GitHub](https://github.com/angeo-dev/module-llms-txt) - [Packagist](https://packagist.org/packages/angeo/module-llms-txt) - [Changelog](https://github.com/angeo-dev/module-llms-txt/blob/main/CHANGELOG.md) - [Module page](https://angeo.dev/modules/llms-txt/)

**On this page**

1. How generation works
2. Requirements
3. Installation
4. Command line
5. Product data for AI shopping agents
6. Page Builder content
7. agents.md
8. Configuration reference
9. Cron
10. Extending
11. Hyvä
12. Upgrading
13. FAQ
14. Related

## 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

| Magento | 2.4.x (Open Source, Mage-OS or Adobe Commerce)  -  `magento/framework ^103.0` |
| PHP | 8.1 - 8.5  -  `~8.1.0||~8.2.0||~8.3.0||~8.4.0||~8.5.0` |
| PHP extensions | `json`, `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
```

| Command | What it does |

| `bin/magento angeo:llms:clean` | Delete generated llms.txt / JSONL / agents.md files and flush the .md mirror cache. |
| `bin/magento angeo:llms:generate` | Generate llms.txt, llms-full.txt, and JSONL files. |
| `bin/magento angeo:llms:status` | Show per-store/per-format llms file generation status. |
| `bin/magento angeo:llms:validate` | Validate 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:

| Strategy | Effect |

| Preserve | Keep 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...) |
| Allow | Keep only the content types in the allowed list (text, heading, html, tabs, rows, columns) |
| Strip | Drop 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](https://angeo.dev/docs/modules/ucp/) or [MCP Server](https://angeo.dev/docs/modules/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)

| Setting | Config path | Default |

| Enable | `angeo_llms/general/enabled` | Yes |
| Exclude This Scope | `angeo_llms/general/exclude_store` | No |
| Store Summary | `angeo_llms/general/store_summary` |  -  |
| Attribution Signature | `angeo_llms/general/signature_enabled` | Yes |

Actions (1)

| Setting | Config path | Default |

| Status | `angeo_llms/actions/status_panel` |  -  |

Content (8)

| Setting | Config path | Default |

| Include Categories | `angeo_llms/content/include_categories` | Yes |
| Include CMS Pages | `angeo_llms/content/include_cms` | Yes |
| Include Products | `angeo_llms/content/include_products` | Yes |
| Products under "## Optional" | `angeo_llms/content/products_under_optional` | No |
| Product Limit | `angeo_llms/content/product_limit` | `5000` |
| Exclude Out-of-Stock Products | `angeo_llms/content/exclude_out_of_stock` | No |
| CMS Identifiers to Exclude | `angeo_llms/content/cms_exclude_identifiers` | `no-route,enable-cookies,privacy-policy-cookie-restriction-mode` |
| Customer Group for Pricing | `angeo_llms/content/customer_group_id` | `0` |

Output Formats (8)

| Setting | Config path | Default |

| Generate llms.txt | `angeo_llms/formats/generate_llms_txt` | Yes |
| Generate llms-full.txt | `angeo_llms/formats/generate_llms_full_txt` | No |
| Generate JSONL | `angeo_llms/formats/generate_jsonl` | Yes |
| Serve /url-key.md Mirrors | `angeo_llms/formats/generate_md_mirror` | No |
| Generate agents.md | `angeo_llms/formats/generate_agents_md` | Yes |
| Emit Link Relations | `angeo_llms/formats/emit_link_relations` | Yes |
| Link to Markdown Mirrors in llms.txt | `angeo_llms/formats/link_to_md` | Yes |
| Serve Agentic Discovery Sitemap | `angeo_llms/formats/generate_agentic_sitemap` | Yes |

Product Data (5)

| Setting | Config path | Default |

| Include Availability | `angeo_llms/product_data/include_availability` | Yes |
| Include Image URL | `angeo_llms/product_data/include_image` | Yes |
| Brand Attribute Code | `angeo_llms/product_data/brand_attribute` |  -  |
| Availability Source | `angeo_llms/product_data/stock_source` | `auto` |
| Additional Attributes | `angeo_llms/product_data/export_attributes` |  -  |

Agents.md Content (6)

| Setting | Config path | Default |

| Delivery Page | `angeo_llms/agents/page_shipping` |  -  |
| Returns Page | `angeo_llms/agents/page_returns` |  -  |
| Privacy Page | `angeo_llms/agents/page_privacy` |  -  |
| Terms Page | `angeo_llms/agents/page_terms` |  -  |
| About Page | `angeo_llms/agents/page_about` |  -  |
| Support / Contact Page | `angeo_llms/agents/support_url` |  -  |

Content Sanitization (5)

| Setting | Config path | Default |

| Resolve CMS Directives | `angeo_llms/sanitizer/resolve_directives` | Yes |
| Resolve Directives in Product Content | `angeo_llms/sanitizer/resolve_directives_products` | No |
| Page Builder Strategy | `angeo_llms/sanitizer/page_builder_strategy` | `exclude` |
| Excluded Content-Types | `angeo_llms/sanitizer/page_builder_excluded_types` | `products,banner,slider,slide,video,map,buttons,button-item,block,dynamic-block,d` |
| Allowed Content-Types | `angeo_llms/sanitizer/page_builder_allowed_types` | `text,heading,html,tabs,tab-item,row,column,column-group` |

Performance (3)

| Setting | Config path | Default |

| Skip Generation When Nothing Changed | `angeo_llms/performance/skip_unchanged` | No |
| Invalidate Markdown Mirror on Save | `angeo_llms/performance/invalidate_mirror_on_save` | Yes |
| Collection Page Size | `angeo_llms/performance/collection_page_size` | `500` |

HTTP Caching (1)

| Setting | Config path | Default |

| Cache-Control TTL (seconds) | `angeo_llms/http/cache_ttl_seconds` | `3600` |

Schedule (1)

| Setting | Config path | Default |

| Cron Expression | `angeo_llms/cron/schedule` | `0 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

| Job | Cron group | Schedule |

| `angeo_llms_generate` | `angeo_llms` | `0 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.

## Related

- [Robots.txt AEO](https://angeo.dev/docs/modules/robots-txt-aeo/)  -  manage AI crawler rules in robots.txt and verify real bots
- [Rich Data](https://angeo.dev/docs/modules/rich-data/)  -  one linked JSON-LD graph per page, with offers and policies
- [AEO Audit](https://angeo.dev/docs/modules/aeo-audit/)  -  score 20 AI-visibility signals from the command line
- [MCP Server](https://angeo.dev/docs/modules/mcp-server/)  -  live, read-only catalog tools for AI agents over MCP
- [All module reference pages](https://angeo.dev/docs/modules/) - [Compatibility matrix](https://angeo.dev/docs/compatibility/)

This page was written from the `README.md`, `composer.json` and `etc/*.xml` files of [tag 4.3.3](https://github.com/angeo-dev/module-llms-txt/tree/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.
