# Agent-friendly documentation

> How an AI agent or script can read these docs as Markdown, discover every page, and call the API.

Page: https://docs.aggre.org/agents/overview · Section: For agents · All pages: https://docs.aggre.org/llms.txt

These docs are built to be read by programs as well as people. Nothing here needs a special client.

## Markdown for every page {#markdown}

Append `.md` to any page address:

| Page | Markdown |
|---|---|
| `https://docs.aggre.org/quickstart` | `https://docs.aggre.org/quickstart.md` |
| `https://docs.aggre.org/api/data/market` | `https://docs.aggre.org/api/data/market.md` |
| `https://docs.aggre.org/` | `https://docs.aggre.org/index.md` |

The Markdown version has the title as `# heading`, a one-line summary, the page's canonical address, then the body. **Links inside it are absolute and point to other `.md` pages**, so an agent can follow them without leaving Markdown. Code blocks are fenced with their language. The response is `text/markdown; charset=utf-8`, with a `Link: <page>; rel="canonical"` header and `X-Robots-Tag: noindex` so search engines index the HTML.

You can also ask for Markdown at the page's own address with an `Accept` header:

```bash
curl -s -H "Accept: text/markdown" https://docs.aggre.org/concepts/errors
```

Every HTML page advertises its twin with `<link rel="alternate" type="text/markdown" href="...">`, and has a **Copy page** button that puts the Markdown on the clipboard.

## Discovering pages {#discovery}

| URL | What |
|---|---|
| [`/llms.txt`](https://docs.aggre.org/llms.txt) | An index in the [llms.txt](https://llmstxt.org/) format: every page with its description and `.md` link, grouped by section. Start here. |
| [`/llms-full.txt`](https://docs.aggre.org/llms-full.txt) | The complete text of every page in one file, for loading into a context window or an index. |
| [`/sitemap.xml`](https://docs.aggre.org/sitemap.xml) | The HTML pages. |
| [`/search-index.json`](https://docs.aggre.org/search-index.json) | The search index: one entry per section with a short excerpt. |

## Machine-readable API description {#machine-readable}

- [`/openapi/data.yaml`](https://docs.aggre.org/openapi/data.yaml) (and `.json`): every route of the data API with parameters, and `$ref`s to the row schemas.
- [`/openapi/accounts.yaml`](https://docs.aggre.org/openapi/accounts.yaml): the console's control-plane routes.
- [`/schemas/{name}.json`](https://docs.aggre.org/api/schemas.md): the JSON Schema of every row.

The reference pages are generated from these files, so the prose and the files cannot drift apart.

## Calling the API from an agent {#calling}

1. Give the agent an API key through its tool configuration or environment, never in a prompt or a repository ([Authentication](https://docs.aggre.org/authentication.md)).
2. Start from `GET /v1/datasets` to see what exists, and read `meta.status` on every answer.
3. Follow the rules in [Best practices for agents](https://docs.aggre.org/agents/best-practices.md): strict parameters, `credit` shown with data, `terms_unread` is not retryable.
4. For legal retrieval and judgments there is also an MCP-style tool interface: [MCP compatibility](https://docs.aggre.org/agents/mcp.md).
