---
title: Using These Docs with AI Tools
url: https://docs.kaltura.com/docs/getting-started/general/docs-for-ai-agents
---

These docs are written for people and built to be read by AI agents and LLM tools. An agent can find the right pages through `llms.txt` and read any page as clean Markdown, without the site's navigation, scripts or styling.


## Start with llms.txt

[`https://docs.kaltura.com/llms.txt`](https://docs.kaltura.com/llms.txt) is an index of the documentation, following the [llms.txt](https://llmstxt.org/) convention:

- Pages are grouped by product area, in the same order as the site's top menu.
- Each product area starts with a one-line summary.
- Each page is one line: its title, a link to its Markdown version and a short description.
- Pages that are useful but not essential are listed under `## Optional` at the end.

Some product areas list only their main pages. Every page is still available as Markdown.

## Get any page as Markdown

Every documentation page has a Markdown version. There are two ways to get it.

### Ask for Markdown with the Accept header

Request the page's normal URL with `Accept: text/markdown`. The same URL returns Markdown instead of HTML (content negotiation):

```bash
curl -H "Accept: text/markdown" \
  https://docs.kaltura.com/docs/getting-started/authentication/ks-overview
```

```javascript
const res = await fetch('https://docs.kaltura.com/docs/getting-started/authentication/ks-overview', {
  headers: { Accept: 'text/markdown' },
});
const markdown = await res.text(); // Content-Type: text/markdown
```

- Without the header, or with a browser's default `Accept` header, the URL returns the HTML page as usual.
- Quality values are respected: Markdown is returned when `text/markdown` is preferred over `text/html`. `Accept: */*` returns HTML.
- Responses include `Vary: Accept`, so caches keep the HTML and Markdown versions apart.
- A URL with no page behind it redirects to the "page not found" page; it doesn't return Markdown.

This is the easiest option for an agent that already has a page's link, for example from search results or from another page: it doesn't need to change the URL.

### Add .md to the URL

Add `.md` to the end of a page's URL:

```
https://docs.kaltura.com/docs/getting-started/authentication/ks-overview.md
```

The links in `llms.txt` use this form.

### What the Markdown contains

```markdown
---
title: Overview
url: https://docs.kaltura.com/docs/getting-started/authentication/ks-overview
---

## Kaltura Session (KS) Generation and Management

Generate, use, and rotate Kaltura Sessions (KS) — ...
```

- A short header with the page `title` and its `url` (the HTML page, for citing or linking).
- The page content: text, tables, code samples and links.
- No navigation, sidebars or scripts. Interactive parts of a page, such as live demos, are left out.

## In the browser

Every page has two buttons above its content:

- **Copy as Markdown** copies the page, to paste into an AI assistant's chat.
- **View as Markdown** opens the Markdown version in a new tab.

## Discovery tags for crawlers

Every HTML page declares its Markdown version and the index in its `<head>`, so tools can find them without knowing these conventions:

```html
<link rel="alternate" type="text/markdown" href="/docs/getting-started/authentication/ks-overview.md">
<link rel="describedby" href="/llms.txt" type="text/plain">
```

## Point your agent at the docs

Give your AI assistant or agent this instruction:

```
Use https://docs.kaltura.com/llms.txt to find the documentation pages that answer my question.
Fetch each page with the header "Accept: text/markdown" (or add .md to its URL), and cite the page URL.
```
