# AI-friendly documentation

## Overview

The library's documentation is structured so that AI coding assistants and other LLM-based tools can read it directly, without scraping HTML, following the [llms.txt] convention.

## llms.txt and the docs map

The documentation root serves two index files:

- [`llms.txt`](pathname:///llms.txt) — a plain-text list of all documentation pages.
- [`docs_map.md`](pathname:///docs_map.md) — the same list, including each page's headings.

## Per-page Markdown

Every documentation page is also published as plain Markdown at its own URL with an `.md` suffix. For example, this page is also available at [ai-friendly-docs.md](pathname:///latest/ai/ai-friendly-docs.md).

Each page also shows two controls under its title:

- **Copy as Markdown** — copies the page's Markdown to the clipboard.
- **View as Markdown** — opens the page's raw Markdown in a new tab.

## TypeScript definition files

The TypeScript definition files — for both Advanced Charts and Trading Platform — always match the latest version and are hosted next to the docs:

- [`charting_library.d.ts`](pathname:///charting_library.d.ts)
- [`datafeed-api.d.ts`](pathname:///datafeed-api.d.ts)
- [`broker-api.d.ts`](pathname:///broker-api.d.ts) (Trading Platform only)

## How to use this with AI tools

- Point an AI coding assistant or IDE at [`llms.txt`](pathname:///llms.txt) so it knows which pages exist, or at a specific page's `.md` URL for detailed content.
- Use the **Copy as Markdown** button to paste a page straight into a chat.

Need the whole library in a single file instead of browsing page by page? See [Create AI library assistant](https://charting-library-docs.xstaging.tv/latest/ai/build-ai-assistant.md).

[llms.txt]: https://llmstxt.org/

---

## Sitemap

- [All documentation pages](https://charting-library-docs.xstaging.tv/llms.txt)
- [Full page map with headings](https://charting-library-docs.xstaging.tv/docs_map.md)
