---
title: "AI-Friendly Documentation"
description: "Access documentation as clean markdown for AI agents using llms.txt and content negotiation."
canonical_url: "https://docs.basicmemory.com/reference/llms-txt"
---
# AI-Friendly Documentation

> Access documentation as clean markdown for AI agents using llms.txt and content negotiation.

This documentation is optimized for AI agents. Get clean markdown through multiple methods - no HTML parsing required.

<tip>

**Want your AI to read the docs?** Just ask it to fetch the documentation:

```text
Fetch https://docs.basicmemory.com/llms.txt and read the Basic Memory documentation
```

Your AI will use its fetch tool to retrieve clean markdown directly - no browser or HTML parsing needed.

</tip>

---

## Quick reference

<table>
<thead>
  <tr>
    <th>
      Method
    </th>
    
    <th>
      URL
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Index
    </td>
    
    <td>
      <code>
        /llms.txt
      </code>
    </td>
    
    <td>
      List of all pages with links
    </td>
  </tr>
  
  <tr>
    <td>
      Full docs
    </td>
    
    <td>
      <code>
        /llms-full.txt
      </code>
    </td>
    
    <td>
      Complete documentation in one file
    </td>
  </tr>
  
  <tr>
    <td>
      Raw markdown
    </td>
    
    <td>
      <code>
        /raw/<path>.md
      </code>
    </td>
    
    <td>
      Any page as markdown
    </td>
  </tr>
  
  <tr>
    <td>
      Content negotiation
    </td>
    
    <td>
      Any page + <code>
        Accept: text/markdown
      </code>
    </td>
    
    <td>
      Returns markdown directly
    </td>
  </tr>
</tbody>
</table>

---

## Content negotiation

The simplest method for AI agents. Add the `Accept: text/markdown` header to any documentation URL:

```bash
curl -H "Accept: text/markdown" https://docs.basicmemory.com/start-here/what-is-basic-memory
```

Returns clean markdown directly - no redirects, no HTML parsing.

**Example response:**

```bash
# What is Basic Memory

Basic Memory is a knowledge base that you and your AI assistant share...
```

---

## llms.txt index

The `/llms.txt` endpoint provides an index of all documentation pages with direct links to raw markdown:

```bash
curl https://docs.basicmemory.com/llms.txt
```

**Example response:**

```bash
# Basic Memory Documentation

> Documentation for Basic Memory - a knowledge management system...

## Documentation Sets

- [Basic Memory Complete Documentation](https://docs.basicmemory.com/llms-full.txt)

## Docs

- [What is Basic Memory](https://docs.basicmemory.com/raw/start-here/what-is-basic-memory.md)
- [Quickstart: Cloud](https://docs.basicmemory.com/raw/start-here/quickstart-cloud.md)
...
```

Use this as a starting point to discover available documentation.

---

## Full documentation

Get the entire documentation in a single request:

```bash
curl https://docs.basicmemory.com/llms-full.txt
```

This concatenates all pages into one markdown file - useful for loading complete context.

---

## Raw markdown paths

Access any page directly as markdown using the `/raw/` prefix:

```bash
# Pattern
https://docs.basicmemory.com/raw/<path>.md

# Examples
https://docs.basicmemory.com/raw/start-here/what-is-basic-memory.md
https://docs.basicmemory.com/raw/reference/mcp-tools-reference.md
https://docs.basicmemory.com/raw/concepts/knowledge-format.md
```

---

## Usage patterns

### Progressive discovery

Start with the index, then fetch specific pages:

```bash
# 1. Get the index
curl https://docs.basicmemory.com/llms.txt

# 2. Fetch specific pages based on need
curl https://docs.basicmemory.com/raw/start-here/quickstart-cloud.md
```

### Full context loading

Load everything at once for comprehensive context:

```bash
curl https://docs.basicmemory.com/llms-full.txt
```

### Content negotiation in code

```python
import httpx

# Just add the Accept header
response = httpx.get(
    "https://docs.basicmemory.com/start-here/what-is-basic-memory",
    headers={"Accept": "text/markdown"}
)
markdown = response.text
```

```typescript
// Same pattern in TypeScript
const response = await fetch(
  "https://docs.basicmemory.com/start-here/what-is-basic-memory",
  { headers: { Accept: "text/markdown" } }
);
const markdown = await response.text();
```

---

## Why AI-friendly docs?

- **No parsing required** - Clean markdown, not HTML
- **Structured discovery** - llms.txt provides an index
- **Standard patterns** - Uses [llms.txt specification](https://llmstxt.org/)
- **Content negotiation** - Same URLs work for humans and AI

---

## Next Steps

<card-group>
<card icon="i-lucide-wrench" title="MCP Tools Reference" to="https://docs.basicmemory.com/reference/mcp-tools-reference">

The tools your AI uses once it's read the docs.

</card>

<card icon="i-lucide-lightbulb" title="What is Basic Memory" to="https://docs.basicmemory.com/start-here/what-is-basic-memory">

The overview, human-readable edition.

</card>
</card-group>


## Sitemap

See the full [sitemap](https://docs.basicmemory.com/sitemap.md) for all pages.
