# AI Agents

> Serve Markdown, llms.txt, content signals and agent skills to AI agents.

Every build publishes your site in the forms AI agents read best, beside the HTML that browsers get. You don't need to configure anything for this. The two keys below only adjust it.

## What the build emits

| File                                   | Purpose                                                                                                                                                                                                                          |
| -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `<page>.md`                            | A Markdown copy of every page beside its HTML: `guides/build.html` gets `guides/build/index.md`, with its title, description and content, each component reduced to plain Markdown (a callout to a quote, tabs to bold headings) |
| `/llms.txt`                            | An [llms.txt](https://llmstxt.org/) index: the site title and description, then every page's Markdown copy with its description, grouped as the navigation groups them                                                           |
| `/index.md`                            | The home page's copy, or a copy of `llms.txt` when the project has no `index.html`                                                                                                                                               |
| `/robots.txt`                          | A `Content-Signal` line stating how automated systems may use your content                                                                                                                                                       |
| `/_headers`                            | For Cloudflare and Netlify: a `Link` header on the home page pointing at `llms.txt`, `index.md` and the skills index                                                                                                             |
| `/.well-known/agent-skills/index.json` | An [Agent Skills](https://agentskills.io/) discovery index, when `skills` is set                                                                                                                                                 |

Each page also carries `<link rel="alternate" type="text/markdown">` pointing at its copy, and the page toolbar beside it links the copy and, with its script, copies it or opens the page in ChatGPT or Claude.

A project file of the same name replaces the generated one. `_headers` is the one exception: your rules are kept and the generated `Link` rule is appended after them. `htmlpress start` runs the same build, so it serves these files too.

## Content signals

`contentSignals` controls the [Content Signals](https://contentsignals.org/) line in `robots.txt`. All three signals default to `true`:

```yaml
contentSignals:
  search: true # build a search index and show links to your pages
  aiInput: true # feed pages to a model answering a question in real time
  aiTrain: false # train or fine-tune models on your content
```

The line it produces sits in the `User-agent: *` group: `Content-Signal: search=yes, ai-input=yes, ai-train=no`.

## Agent skills

If your project ships [Agent Skills](https://agentskills.io/specification), point `skills` at their `SKILL.md` files, one glob or a list, relative to the project:

```yaml
skills: .skills/*/SKILL.md
```

Each matched skill is published at `/.well-known/agent-skills/<name>/SKILL.md` and listed in `index.json` with a `sha256` digest. Its frontmatter needs a `name` (lowercase letters, digits and single hyphens, at most 64 characters) and a `description` (at most 1024), and the build fails if either is missing or two skills share a name. This site publishes htmlpress' own skill at [/.well-known/agent-skills/](/.well-known/agent-skills/index.json).

## Markdown on request

Agents ask for Markdown by sending `Accept: text/markdown` to the page URL. A static host can't answer that on its own, but a rewrite on your CDN can serve the page's `.md` copy for those requests and leave the HTML for everyone else. Every page has a copy, so the rewrite never points at a missing file. For a ready-made rule, see [Cloudflare](/deployment/cloudflare/).

## See also

- [Agent Skills](/agent-skills/): install htmlpress' own skill into your coding agent.
- [Config File](/customization/configuration-file/): every top-level key.
- [Custom Routes](/customization/custom-routes/): static files copied beside your pages.
