PHPackages                             mage-os/module-llm-txt - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mage-os/module-llm-txt

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

mage-os/module-llm-txt
======================

AI-powered LLMs.txt generation for Magento 2 / Mage-OS stores. Help AI systems understand your store with OpenAI-generated content.

0.2.1(2mo ago)234.0k↑53.8%8MITPHP

Since Oct 17Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/mage-os-lab/llms.txt)[ Packagist](https://packagist.org/packages/mage-os/module-llm-txt)[ RSS](/packages/mage-os-module-llm-txt/feed)WikiDiscussions main Synced today

READMEChangelog (5)Dependencies (9)Versions (8)Used By (0)

LLMs.txt for Magento 2 / Mage-OS
================================

[](#llmstxt-for-magento-2--mage-os)

AI-powered LLMs.txt generation module for Magento 2 and Mage-OS stores. Automatically creates optimized `llms.txt` files using OpenAI to help AI systems understand your store content.

What is LLMs.txt?
-----------------

[](#what-is-llmstxt)

LLMs.txt is a proposed standard (similar to `robots.txt`) that helps AI systems like ChatGPT, Claude, and others better understand your website by providing a concise, structured summary of your most important content.

Learn more: [llmstxt.org](https://llmstxt.org)

Features
--------

[](#features)

- 🤖 **AI-Powered Generation** - Uses OpenAI to intelligently curate your store content
- ⚡ **One-Click Generation** - Click a button, review, and publish
- ✏️ **Fully Editable** - Edit AI-generated content or write your own
- 🏪 **Multi-Store Support** - Different content per store view
- 📊 **Token Counter** - Ensures content stays under recommended limits
- 🎯 **Standards Compliant** - Follows llmstxt.org specification

Installation
------------

[](#installation)

```
composer require mage-os/module-llm-txt
bin/magento module:enable MageOS_LlmTxt
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush
```

Configuration
-------------

[](#configuration)

1. Navigate to: **Stores → Configuration → AI → LLMs.txt**
2. **General Settings**

    - Enable the module
    - Enter your OpenAI API key ([get one here](https://platform.openai.com/api-keys))
    - Select AI model (GPT-4o Mini recommended for speed and cost)
3. **AI-Powered Generation**

    - Set site name
    - Add site description
    - Specify up to 10 categories that best represent your store
    - Specify up to 10 products that best represent your store
    - Specify up to 10 CMS pages that best represent your store
    - Click **"Generate with AI"**
4. **Review &amp; Edit**

    - AI generates curated content from your store data
    - Review the generated markdown
    - Edit as needed
    - Save configuration
5. **Verify**

    - Visit `https://yourdomain.com/llms.txt`
    - Content is served as plain text

How It Works
------------

[](#how-it-works)

When you click "Generate with AI":

1. **Data Collection** - Gathers top categories, sample products, and key CMS pages
2. **AI Analysis** - Sends data to OpenAI with optimized prompt
3. **Content Generation** - AI creates concise, well-structured llms.txt
4. **Review** - You can edit the generated content before publishing

Example Output
--------------

[](#example-output)

```
# Your Store Name

> Your one-stop shop for quality products and exceptional service

## Shop by Category
- [Electronics](https://example.com/electronics.html): Explore cutting-edge tech and gadgets
- [Clothing](https://example.com/clothing.html): Fashion for every style and occasion

## Featured Products
- [Premium Headphones](https://example.com/headphones.html): Studio-quality sound
- [Organic Cotton T-Shirt](https://example.com/t-shirt.html): Sustainable fashion

## Customer Resources
- [About Us](https://example.com/about): Our story and mission
- [Contact](https://example.com/contact): Get in touch with our team
```

Manual Override
---------------

[](#manual-override)

Don't want to use AI? No problem:

1. Enable **"Use Manual Content"** checkbox
2. Write your own llms.txt in markdown format
3. Save

Requirements
------------

[](#requirements)

- PHP 8.1, 8.2, or 8.3
- Magento 2.4.x / Mage-OS 1.x
- OpenAI API key (for AI generation feature)
- Guzzle HTTP client (included with Magento)

Cost
----

[](#cost)

OpenAI API usage is minimal:

- ~$0.001 per generation with GPT-5 Mini
- ~$0.010 per generation with GPT-5.4
- ~$0.001 per generation with GPT-4o Mini
- ~$0.005 per generation with GPT-4o

You only pay when clicking "Generate with AI".

Technical Details
-----------------

[](#technical-details)

### Architecture

[](#architecture)

- **Custom Router** - Intercepts `/llms.txt` requests at sort order 22, only when module is enabled
- **Custom Page Layout** - Minimal layout with empty root container; renders plain text without Magento header/footer
- **Store Data Collector** - Collects configured categories, products, and CMS pages with meta descriptions using store emulation
- **Prompt Builder** - Formats collected store data into a structured OpenAI prompt with llms.txt specification constraints
- **LLMs.txt Generator** - Orchestrates generation: collect → build prompt → call API → append additional content
- **OpenAI Client** - Sends requests to `https://api.openai.com/v1/responses` via Guzzle

Testing
-------

[](#testing)

Unit tests included:

```
vendor/bin/phpunit app/code/MageOS/LlmTxt/Test/Unit
```

Coverage:

- Config model
- Generator model
- StoreDataCollector
- OpenAI Client
- Router
- Block rendering

License
-------

[](#license)

MIT License - see [LICENSE](LICENSE) file for details

Contributing
------------

[](#contributing)

Contributions welcome! Please:

1. Fork the repository
2. Create a feature branch
3. Make your changes with tests
4. Submit a pull request

Support
-------

[](#support)

- **Issues**: [GitHub Issues](https://github.com/mage-os-lab/llms.txt/issues)
- **Discussions**: [GitHub Discussions](https://github.com/mage-os-lab/llms.txt/discussions)

Related Resources
-----------------

[](#related-resources)

- [LLMs.txt Official Site](https://llmstxt.org)
- [LLMs.txt Directory](https://llmtxt.app)
- [OpenAI Platform](https://platform.openai.com)
- [Mage-OS](https://mage-os.org)

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance90

Actively maintained with recent releases

Popularity34

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 Bus Factor1

Top contributor holds 71.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~35 days

Total

5

Last Release

72d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/100189073?v=4)[Mage-OS](/maintainers/mage-os-ci)[@mage-os-ci](https://github.com/mage-os-ci)

---

Top Contributors

[![Valant13](https://avatars.githubusercontent.com/u/27895167?v=4)](https://github.com/Valant13 "Valant13 (47 commits)")[![DavidLambauer](https://avatars.githubusercontent.com/u/1841317?v=4)](https://github.com/DavidLambauer "DavidLambauer (14 commits)")[![kevinmeijer97](https://avatars.githubusercontent.com/u/9716909?v=4)](https://github.com/kevinmeijer97 "kevinmeijer97 (1 commits)")[![nikolalardev](https://avatars.githubusercontent.com/u/3015908?v=4)](https://github.com/nikolalardev "nikolalardev (1 commits)")[![rhoerr](https://avatars.githubusercontent.com/u/13335952?v=4)](https://github.com/rhoerr "rhoerr (1 commits)")[![michielgerritsen](https://avatars.githubusercontent.com/u/5858697?v=4)](https://github.com/michielgerritsen "michielgerritsen (1 commits)")[![indykoning](https://avatars.githubusercontent.com/u/15870933?v=4)](https://github.com/indykoning "indykoning (1 commits)")

---

Tags

aiopenaiseomagento2llms-txtmage-os

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mage-os-module-llm-txt/health.svg)

```
[![Health](https://phpackages.com/badges/mage-os-module-llm-txt/health.svg)](https://phpackages.com/packages/mage-os-module-llm-txt)
```

###  Alternatives

[run-as-root/magento2-prometheus-exporter

Magento2 Prometheus Exporter

68357.9k](/packages/run-as-root-magento2-prometheus-exporter)[myparcelnl/magento

A Magento 2 module that creates MyParcel labels

1860.2k](/packages/myparcelnl-magento)[genaker/magento-mcp-ai

Magento MCP AI Assistant - A powerful AI assistant for Magento 2 that helps with store data queries and management

901.8k](/packages/genaker-magento-mcp-ai)[angeo/module-llms-txt

Magento 2 module for AI Engine Optimization (AEO). Generates spec-compliant llms.txt and llms-full.txt per llmstxt.org standard, plus streaming JSONL for vector indexing. Multi-store, multi-website, CLI, cron, async admin UI, Page Builder-aware sanitization, customer-group pricing, atomic writes, ETag/Cache-Control, .md mirrors.

111.1k](/packages/angeo-module-llms-txt)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
