# For coding agents

> The Markdown of each page, llms.txt and llms-full.txt, and how to use the tutorials as tested programs.

The page: https://chromedp.dev/project/agents/

The site gives every page as Markdown, for coding agents and other programs
that read it.

| Address | What it holds |
| --- | --- |
| [/llms.txt](/llms.txt) | a list of every page, with a link to its Markdown |
| [/llms-full.txt](/llms-full.txt) | every page as Markdown, in one file |
| the address of a page with `.md`, such as [/start/install.md](/start/install.md) | the Markdown of that page |

Each page links to its Markdown in its head, with
`<link rel="alternate" type="text/markdown">`.

## The tutorials are tested programs

The Markdown of a tutorial holds the complete program and its expected
output. The program is in the
[tutorials](https://github.com/chromedp/chromedp-site/tree/main/tutorials)
folder of the repository of the site, and a test runs it in Chrome and
compares its output with the expected output. So a tutorial works with the
version of chromedp in the
[go.mod](https://github.com/chromedp/chromedp-site/blob/main/go.mod) of the
site.

The Markdown of a recording lists its steps: the line of Go of each step and
its code. The file `timeline.json` of the recording holds the protocol
messages of each step.

## Rules that help

- Call the cancel function of `chromedp.NewContext` with `defer`.
- Wait for the page with a query or `chromedp.Poll`, not with
  `chromedp.Sleep`.
- Prefer the actions of chromedp to raw commands of the protocol.
- Use `chromedp.CSS` for a CSS selector. A plain string is a search.
