BetterIAM

llms.txt

What /llms.txt, /llms-full.txt, and the per-page Markdown URLs of the Better IAM docs contain, and how AI agents should use them to find, read, and cite pages.

llms.txt is a convention for publishing a site's content in a form language models read well: a Markdown index at a known address, with links to Markdown copies of each page. This site publishes an index at /llms.txt, every page in one file at /llms-full.txt, and a Markdown copy of every page at its URL plus .md.

Use these files when your tool can fetch URLs but cannot call an MCP server, when you want to paste documentation into a chat, or when you build your own retrieval over the docs. For tools that support MCP, the docs MCP server answers the same questions with less context.

What each file contains

URLContent typeContent
/llms.txttext/plainInstructions for agents, then every page's title, Markdown URL, and description, grouped by sidebar section
/llms-full.txttext/plainEvery page rendered as Markdown, one after another
/docs/<page>.mdtext/markdownOne page as Markdown

Both .txt files are generated when the site is built, from the same MDX sources as the HTML pages, so they always match the docs you are reading. They are marked noindex (X-Robots-Tag) so search engines show the HTML pages instead.

llms.txt

/llms.txt is the index. It has three parts:

  1. A title and a one-sentence summary of Better IAM.
  2. Instructions for AI agents: how to find a page, fetch its Markdown, and cite it, which reference pages are generated from the code, and where the full-text file, the MCP server, and the agent skill live.
  3. The index: one ## heading per sidebar section (Get Started, Concepts, Authentication, Authorization, Databases, Integrations, Features, Federation, Guides, Operations, AI Resources, Reference), with one list item per page. The groups inside a section, such as Guides' "Build" or Federation's "Sign-in", are ### sub-headings. Pages inside a sub-folder, such as the migration guides, are indented under the folder's overview page.

Each list item links to the page's Markdown copy and ends with the page's description:

llms.txt (excerpt)
## Get Started

- [Introduction](https://better-iam.com/docs/introduction.md): …
- [Installation](https://better-iam.com/docs/installation.md): Install better-iam, set the secret and base URL, …
- [Quickstart](https://better-iam.com/docs/quickstart.md): Bootstrap the root administrator, create an organization, …

The descriptions come from each page's frontmatter and are written as one precise sentence, so an agent can choose a page from the index alone.

llms-full.txt

/llms-full.txt starts with the same title and summary, then contains every page. Each page begins with its title, its URL path, and its description:

llms-full.txt (excerpt)
# Roles and bindings (/docs/authorization/roles)

> Custom roles built from permission lists or policy documents, role inheritance, bindings to people and groups, and delegated grant authorities.

Listing permissions person by person does not scale: …

The file is large, because it includes the generated reference for every API method, error code, CLI command, and export. Load it only into a model with a long context window, and prefer the index plus individual pages otherwise.

Markdown for one page

Every docs page has a Markdown copy. There are two ways to request it:

Append .md to the page URL. Section overview pages work the same way (/docs/authorization.md).

curl https://better-iam.com/docs/authorization/roles.md

The response starts with the page's title, URL path, and description, like a page in llms-full.txt. It carries a Link: <https://better-iam.com/docs/authorization/roles>; rel="canonical" header that names the HTML page.

The Markdown is converted for models, not copied from the MDX source. Interactive components become the text they stand for:

On the pageIn the Markdown
TabsEach tab's content under a bold label, such as **Server:** and **Client:**
AccordionsA #### heading per item
CalloutsA blockquote, starting with the callout's bold title when it has one
Cards and feature gridsA bulleted list of links with their descriptions
API endpoint boxes on reference pagesA line with the HTTP route and whether it needs a credential, or "Server only"
Glossary termsTheir plain text
Visual-only components (package tables and graphs, API shape diagrams, API group summaries, playground buttons)Removed

Code blocks, tables, and headings are kept as written.

How agents should use these files

The instructions at the top of /llms.txt say the same thing in fewer words:

Find the page

Read /llms.txt once and choose the page whose section and description match the task. For an exact identifier, go straight to the Reference section: API methods, error codes, package exports, options, and CLI commands are generated from the source code.

Fetch its Markdown

Fetch the Markdown URL from the index, or the page URL with Accept: text/markdown. Read the whole page before writing code from it: setup steps, options, and error codes are in separate sections.

Cite the canonical URL

When you tell a person where an answer came from, link the HTML page: the Markdown URL without .md, for example https://better-iam.com/docs/authorization/roles.

Use only what the docs show

If a page does not show a package, import, method, option, or error code, assume it does not exist and say so. Every iam.api method has a page under API reference; a method that is missing there is not part of Better IAM.

Use the files in your own tools

Point a retrieval pipeline or a custom agent at the same addresses:

fetch-docs.ts
const site = 'https://better-iam.com';

/** The llms.txt index, for choosing pages. */
export async function docsIndex(): Promise<string> {
  const response = await fetch(`${site}/llms.txt`);
  if (!response.ok) throw new Error(`llms.txt: HTTP ${response.status}`);
  return response.text();
}

/** One page as Markdown, from its path, for example "/docs/authorization/roles". */
export async function docsPage(path: string): Promise<string> {
  const response = await fetch(`${site}${path}`, { headers: { Accept: 'text/markdown' } });
  if (!response.ok) throw new Error(`${path}: HTTP ${response.status}`);
  return response.text();
}

The site also serves the search index as JSON at /api/search?query=… (the index behind the search dialog) and the OpenAPI 3.1 description of the Better IAM HTTP API at /openapi.json; see Reference.

Next steps

Was this page helpful?

Better IAM is created by Sean Filimon

Last updated

On this page