> ## Documentation Index
> Fetch the complete documentation index at: https://docs.krun.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Krun API base URL: https://api.krun.ai. Authenticate server-side with `Authorization: Bearer $KRUN_API_KEY`; never put a Krun API key in browser code.
> Prefer the Python SDK in examples: `pip install krun-ai`, `from krun import Krun`. The TypeScript SDK `@krun-ai/sdk` is not published on npm yet: do not tell users to `npm install` it.
> The only question type is `choice`. `confidence` is the top-1 minus top-2 probability margin, not the probability that the answer is correct. `choice` is null when `abstain` is true.
> Usage reports `input_tokens` only. There are no output tokens.

# Use these docs with AI agents

> Give coding agents and AI tools access to the Krun docs through llms.txt, Markdown pages and the docs MCP server.

The Krun docs are available in formats that coding agents and AI assistants can read directly.

## llms.txt

An index of every page, with descriptions and links to Markdown versions:

```text theme={null}
https://docs.krun.ai/llms.txt
```

The full content of the docs in one file:

```text theme={null}
https://docs.krun.ai/llms-full.txt
```

## Markdown pages

Add `.md` to any page URL to get it as Markdown, for example:

```text theme={null}
https://docs.krun.ai/quickstart.md
```

Each page also has a menu at the top to copy it as Markdown or open it in ChatGPT, Claude, Perplexity, Cursor or VS Code.

## Docs MCP server

The Krun docs have a Model Context Protocol (MCP) server that lets AI tools search and read the docs while they work:

```text theme={null}
https://docs.krun.ai/mcp
```

<Tabs>
  <Tab title="Claude Code">
    ```bash theme={null}
    claude mcp add --transport http krun-docs https://docs.krun.ai/mcp
    ```
  </Tab>

  <Tab title="Cursor">
    Add to `.cursor/mcp.json`:

    ```json theme={null}
    {
      "mcpServers": {
        "krun-docs": {
          "url": "https://docs.krun.ai/mcp"
        }
      }
    }
    ```
  </Tab>

  <Tab title="VS Code">
    Add to `.vscode/mcp.json`:

    ```json theme={null}
    {
      "servers": {
        "krun-docs": {
          "type": "http",
          "url": "https://docs.krun.ai/mcp"
        }
      }
    }
    ```
  </Tab>
</Tabs>

The docs MCP server only searches and reads documentation. It cannot call the Krun API or see your API keys.

## OpenAPI specification

Agents that generate API clients can use the specification directly:

```text theme={null}
https://api.krun.ai/openapi.json
```

## Tips for prompting agents

When you ask a coding agent to integrate Krun, point it at the docs and state the key facts:

```text theme={null}
Integrate the Krun API (docs: https://docs.krun.ai/llms.txt).
Use the Python SDK: pip install krun-ai, from krun import Krun.
Read the key from KRUN_API_KEY, server-side only.
Handle abstention: answer.choice is None when answer.abstain is True.
confidence is the top-1 minus top-2 margin, not the probability of being correct.
```
