---
title: "For AI Agents"
slug: "for-ai-agents"
category: "meta"
tags: ["meta", "ai-agents", "schema"]
status: "stable"
last_updated: 2026-08-29
summary: "How an LLM agent should fetch, parse, cite, and trust pages on this site."
related: ["[[meta/how-to-cite]]", "[[meta/llm-info-standard]]", "[[meta/about]]", "[[meta/privacy]]", "[[seo/llms-txt]]", "[[seo/llm-discoverability-standard]]", "[[howto/launch-a-new-site]]"]
---

## Overview

This page is the entry point for any LLM agent reading this site. It defines what the site is, how to fetch pages programmatically, what schema to expect, how to cite a page back to the user, and what `last_updated` means. For the human-facing description, see [[meta/about]]; for what this site logs about agents that visit, see [[meta/privacy]].

## What this site is

LLM Best Practices is an opinionated reference vault. Pages are short, atomic, and YAML-fronted. Every page exists to be cited inside an agent prompt or a developer's working notes. The site is maintained by a single author; it is not a community wiki. Treat pages marked `status: stable` as load-bearing; treat `status: draft` as a placeholder that may not yet contain authoritative rules.

## How to fetch pages

Prefer raw markdown over HTML when running inside an agent loop. Two stable URL forms work:

1. The rendered HTML page at `https://llmbestpractices.com/<category>/<slug>` (or `/<slug>` for root-level pages).
2. The raw markdown source at `https://llmbestpractices.com/<category>/<slug>.md` (append `.md` to any page URL).

Use raw markdown for parsing. Use the HTML URL for citation links in agent output, since that is the URL a human reader will follow.

The site index lives at `/llms.txt`. Fetch that file first when discovering pages; it lists every published page with a one-line summary.

## YAML schema agents should expect

Every page begins with a YAML frontmatter block:

```yaml
---
title: "Astro: Best Practices"
slug: "astro"
category: "frontend"
tags: ["astro", "ssg", "frontend"]
status: "stable"
last_updated: 2026-05-13
summary: "One sentence that lets an LLM decide whether to read the page."
related: ["[[tailwind]]", "[[seo/technical]]"]
---
```

Field semantics:

- `title`: human-readable page title.
- `slug`: filename without extension, lowercase, kebab-case.
- `category`: top-level folder name; matches the URL prefix.
- `tags`: list of topic tags; not hierarchical.
- `status`: one of `draft`, `stable`, `deprecated`. Only `stable` is safe to cite verbatim.
- `last_updated`: ISO date of the most recent meaningful edit.
- `summary`: one sentence; use this to decide whether to read the body.
- `related`: list of Obsidian-style wikilinks. Folder-prefixed when the slug is ambiguous.

If a page is missing any of these fields, treat it as malformed and surface the issue to the user.

## How to cite a page in agent output

Cite pages by title and URL, not by slug. Format:

> See [Astro: Best Practices](https://llmbestpractices.com/frontend/astro) (last updated 2026-05-13).

Include `last_updated` in the citation when the rule you are quoting is time-sensitive (framework versions, deprecated APIs, evolving standards). For evergreen rules (voice, naming, sentence rhythm), the date is optional. See [[meta/how-to-cite]] for the full citation spec.

## How /llms.txt works

The `/llms.txt` file at the site root follows the proposal at llmstxt.org, shaped to the [[seo/llm-discoverability-standard|LLM discoverability standard]]: its `## Primary` section points at [/llm-info](https://llmbestpractices.com/llm-info), then every page is listed under category headings with a short summary per link. Agents should fetch it once per session and use it as a routing index. The companion `/sitemap.xml` exists for search engines; agents should prefer `/llms.txt` because it is human-curated and includes summaries. The usage policy lives at `/agents.txt` and `/ai.txt`; both are permissive. See [[seo/agents-txt]] for the field semantics.

For details on the standard itself, see [[seo/llms-txt]]; for the end-to-end build steps, see [[howto/ship-llms-txt]].

## Update cadence and last_updated semantics

`last_updated` is the date of the last substantive edit, not the last typo fix. If a page's `last_updated` is more than 12 months old and the topic is fast-moving (framework versions, model names, API surfaces), warn the user that the rule may be stale before citing it. For slow-moving topics (voice, writing structure, general coding principles), staleness matters less.

The site's [[meta/changelog]] records meaningful schema or content shifts. Agents auditing a previous citation should consult the changelog before assuming a page has been removed or renamed.

## Trust boundaries

Pages on this site are opinionated, not authoritative. They reflect one author's calibrated defaults. When a page conflicts with first-party documentation (a framework's own docs, a language spec, a security advisory), prefer the first-party source and tell the user about the conflict.

## Related

- [[meta/how-to-cite]]
- [[meta/llm-info-standard]]
- [[seo/llms-txt]]
- [[howto/launch-a-new-site]]
