# LLM Docs File

Use these files to give AI tools structured access to the KUB Docs.

## Choosing the Right File

### `llms.txt`

Use the documentation index first: <https://docs.kubchain.com/llms.txt>

This file lists the available documentation pages. It is the best starting point when your tool can fetch pages as needed.

### `llms-full.txt`

Use the full static file when your tool needs the docs in one file: <https://docs.kubchain.com/llms-full.txt>

This file contains a full text snapshot of the KUB Docs.

{% hint style="info" %}
Start with `llms.txt` when possible. Use `llms-full.txt` when your tool cannot browse the docs incrementally.
{% endhint %}

{% hint style="warning" %}
`llms-full.txt` is a snapshot. It may not include the latest documentation updates.
{% endhint %}

## Recommended Workflow

1. Load `llms.txt` to discover the relevant pages.
2. Fetch only the pages you need.
3. Fall back to `llms-full.txt` if your tool needs one local file.

## Use with Claude Code

[Claude Code](https://docs.claude.com/en/docs/claude-code/overview) runs in your terminal and can read local files during a session.

{% stepper %}
{% step %}

#### Download the file

Download <https://docs.kubchain.com/llms-full.txt>.
{% endstep %}

{% step %}

#### Save it locally

Place the file in your project directory or another known location.
{% endstep %}

{% step %}

#### Load it into the session

Use `/read` with the file path, or drag and drop the file into the chat.
{% endstep %}

{% step %}

#### Ask targeted questions

Reference the file in your prompts and ask about specific KUB topics, APIs, or workflows.
{% endstep %}
{% endstepper %}

## Use with Other AI tools

Most AI tools work with `llms-full.txt` the same way:

1. Download the file.
2. Upload or attach it to your session.
3. Ask questions about KUB using that file as context.

## Best Practices

* Prefer `llms.txt` for fresher, page-level discovery.
* Use `llms-full.txt` for offline or file-based workflows.
* Refresh the downloaded file regularly if you need the latest docs.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kubchain.com/build-with-ai/llm-docs-file.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
