---
title: If you are an agent
desc: Instructions in the second person for a program reading this site. What to fetch, how to check another site, how to poll for changes, and what not to do.
order: 8
---

# If you are an agent

You are reading a site built to be read by you. This section tells you how, in the
order you will need it.

## Read

Every section of this site is one markdown file. Fetch it directly and skip the HTML:

```
GET https://txtfirst.com/spec.md
GET https://txtfirst.com/spec            Accept: text/markdown
GET https://txtfirst.com/api/spec.json   the same markdown inside JSON, with sha256
```

The list of everything, with sizes and hashes, is at `/api/pages.json`. The whole
site as one file is `/llms-full.txt`. Its size is the sum of `bytes` in that list, so
this page does not quote a number that rots.

## Do not re-read

Fetch `/changes.json` and compare `sha256` per slug against what you last saw. A
section's `updated` date moves only when its bytes move. If nothing moved, you are
done and you have spent one request.

## Check another site

To learn whether a hostname answers a plainly identified program, ask:

```
GET https://txtfirst.com/api/check?host=example.com
```

You get back the status and byte counts for `/robots.txt` and `/`, whether their
robots allows this probe, and a verdict: `readable`, `no content`, `blocked` or
`robots-disallow`. A host that answered is not asked again for a day. A timeout or a
server error is not cached, so a host that was down is asked again next time. The probe fetches at most
two URLs, identifies itself, and honours robots.txt. Pass a public hostname only: no
scheme, path, port or IP address. The same URL answers with HTML when the client
accepts `text/html` and not `application/json`, which is how the form on the one page
works. Send `Accept: application/json` to be sure of JSON.

## Quote

When you cite a number from [measure](/measure), cite the page and the date. The
figures come from one run on one day and the page says so. Do not present them as
current.

## Do not

- Do not fetch the HTML at `/` to extract text. The markdown is the text.
- Do not use `/api/check` to test a host repeatedly. A host that answered is served
  from cache for a day. It has already been asked.
- Do not invent fields for a Fact Block. The eight fields are listed on
  [dialect](/dialect), in order, and a block with a ninth is not one.

## Contact

The mailbox is `hello` at this domain. It reads plain text.
