sphinx-llm
What it is and what it does
sphinx-llm is a collection of Sphinx extensions designed to bridge documentation and large language models. It serves two main purposes: making your documentation easily consumable by LLMs and agents (via the llms.txt standard), and optionally using LLMs to generate documentation content during the build process.
The package's primary extension generates llms.txt-compliant output alongside your HTML documentation. During each build, it produces markdown versions of your pages, a sitemap file (llms.txt), and a concatenated full-text file (llms-full.txt) that LLMs and agents can index and retrieve. It supports multiple markdown naming schemes (file-suffix, URL-suffix, or replace modes) and works with both html and dirhtml builders. Optional LLM-powered features can generate page summaries using OpenAI-compatible endpoints, with caching and configurable timeouts.
Use it for:
- Make your project documentation discoverable and well-indexed when users query LLMs about your domain or project.
- Generate llms.txt and llms-full.txt files for consumption by AI agents that gather context from web documentation.
- Automatically produce markdown versions of HTML pages for LLM training or retrieval-augmented generation (RAG) systems.
- Generate one-sentence page summaries using an LLM provider to populate llms.txt entries without manual authoring.
- Export Sphinx documentation in a format compatible with Claude and other LLM documentation standards.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Sphinx extensions that generate LLM-consumable documentation formats (llms.txt standard) and optionally use LLMs to generate content during the Sphinx build process.
Yes, if you maintain Sphinx documentation and want it indexed by LLMs or consumed by AI agents. The package is active, well-maintained, has low install friction, and carries a permissive license. It is beta-status software (Development Status 4), so expect potential API changes, but it has no known vulnerabilities and supports current Python versions. Install it if LLM-friendly documentation export is a goal; skip it if you have no such use case.
Install
sphinx-llm on PyPI
pip
pip install sphinx-llmuv
uv add sphinx-llmpoetry
poetry add sphinx-llmInstalling sphinx-llm
Before you install
Low install friction with a pure-Python wheel. Actively maintained as of 2026-08-14 with recent release. Supports Python 3.9 through 3.14 and PyPy.
License in practice
Apache License 2.0 is permissive; you may use, modify, and distribute this package and derivative works freely, provided you include license notices and state changes.
Quickstart
pip install sphinx-llm
# In conf.py:
extensions = [
"sphinx_llm.txt",
]
# Then run: sphinx-build -b html source _build/html
# Generates llms.txt, llms-full.txt, and .md versions of each page
Requires Sphinx and sphinx-markdown-builder as runtime dependencies; only works with HTML builders (html, dirhtml).
Verify before relying
- Whether LLM content generation features (the [gen] extra) require additional system dependencies beyond Python packages.
- Performance impact of parallel markdown building on large documentation sites.
- Compatibility with custom Sphinx themes or non-standard builder configurations.
Package facts
| License | Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — sphinx-markdown-builder, sphinx |
| Maintenance | actively maintained — 0 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 251,463/month — #8,582 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sphinx_llm-1.0.0-py3-none-any.whl
Tags
More Sphinx packages
Parses Python docstrings in ReST, Google,…
permissive · top 1,000 on PyPI
SphinxSphinx generates professional documentation…
permissive · top 1,000 on PyPI
sphinxcontrib-serializinghtmlA Sphinx extension that outputs documentation…
permissive · top 1,000 on PyPI
alabasterAlabaster is a clean, responsive Sphinx theme…
permissive · top 1,000 on PyPI
sphinxcontrib-htmlhelpA Sphinx extension that generates HTML help…
permissive · top 1,000 on PyPI
sphinxcontrib-qthelpA Sphinx extension that converts documentation…
permissive · top 1,000 on PyPI
sphinx-markdown-builderA Sphinx extension that generates Markdown…
permissive · top 15,000 on PyPI
mkdocs-llmstxtMkDocs plugin that generates an /llms.txt file…
permissive · top 15,000 on PyPI
sphinxcontrib-confluencebuilderSphinx extension that converts reStructuredText…
permissive · top 15,000 on PyPI
sphinx-sitemapGenerates sitemaps.org-compliant XML sitemaps…
permissive · top 15,000 on PyPI
sphinxemojiSphinx extension that replaces emoji codes…
permissive · top 15,000 on PyPI
sphinx_mdincludeSphinx extension that lets you include and…
permissive · top 15,000 on PyPI
autodocsummA Sphinx extension that enhances autodoc with…
permissive · top 5,000 on PyPI
sphinx-markdown-tablesAdds markdown table support to Sphinx…
copyleft · top 15,000 on PyPI
sphinx-jinjaA Sphinx extension that lets you embed Jinja2…
permissive · top 5,000 on PyPI