# llms.txt

[llms.txt](https://llmstxt.org/) is a proposed standard for making website content more accessible to large language models. Similar to `robots.txt` for web crawlers, `llms.txt` tells AI tools what documentation is available and how to access it.

## Files

WEEX API Documentation provides two llms.txt files:

| File | URL | Description |
| --- | --- | --- |
| `llms.txt` | <a href="/llms.txt" target="_blank" rel="noopener noreferrer">/api-doc/llms.txt</a> | Summary — document titles, descriptions, and links |
| `llms-full.txt` | <a href="/llms-full.txt" target="_blank" rel="noopener noreferrer">/api-doc/llms-full.txt</a> | Full content — all documentation in a single file |

## Format

### llms.txt (Summary)

The summary file contains a structured list of all documentation pages, including their titles, descriptions, and URLs:

```text
# WEEX API Documentation

> Documentation files for Large Language Models

## Spot

- [Change Log](https://www.weex.com/api-doc/products/spot/changelog.md)
- [API Introduction](https://www.weex.com/api-doc/products/spot/introduction/APIBriefIntroduction.md): This is the official WEEX API guide.
...

## Futures

- [Change Log](https://www.weex.com/api-doc/products/futures/changelog.md)
...
```

### llms-full.txt (Full Content)

The full file contains the complete Markdown content of every documentation page, separated by document headings. This is useful for loading the entire documentation into an LLM's context window.

## Usage Examples

### Feed into any LLM

```bash
# Download and use as context
curl -s https://www.weex.com/api-doc/llms.txt

# Full documentation for comprehensive context
curl -s https://www.weex.com/api-doc/llms-full.txt
```

### Use with Claude

```text
Please read https://www.weex.com/api-doc/llms.txt and help me
understand how to place a futures order using the WEEX API.
```

### Use in a Python script

```python
import requests

# Fetch the documentation index
response = requests.get("https://www.weex.com/api-doc/llms.txt")
docs_index = response.text

# Pass it as context to an LLM
messages = [
    {"role": "system", "content": f"WEEX API docs:\n{docs_index}"},
    {"role": "user", "content": "How do I check my account balance?"}
]
```

### Use with LangChain

```python
from langchain_community.document_loaders import WebBaseLoader

loader = WebBaseLoader("https://www.weex.com/api-doc/llms-full.txt")
docs = loader.load()
```

## When to Use llms.txt vs Other Options

- **llms.txt** — Quickly give an LLM awareness of all available documentation or load it into the context window.
- **OpenAPI Schema** — Use structured API data for endpoint discovery, code generation, or API tooling.
- **Markdown page** — Read the complete content of an individual documentation page.
