> ## 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.

# Introduction

> Krun One is a decision model for AI systems. Send text and a set of options, get back one choice with calibrated probabilities and an abstention signal.

**LLMs generate. Krun decides.**

Krun One is a decision model for AI systems. You send a piece of text (the `context`) and one or more questions, each with a set of options you define. For every question, Krun One returns:

* the option it picked, or `null` when it abstains,
* a probability for every option,
* a `confidence` margin between the two best options,
* whether the abstention signal is `calibrated` or `advisory` for that kind of question.

Krun One scores your options instead of generating text, so the answer is always one of your option ids. There is no output to parse and no free-form text to validate.

```json theme={null}
{
  "model": "krun-one-v0",
  "answers": {
    "department": {
      "type": "choice",
      "choice": "returns",
      "confidence": 0.967536,
      "probabilities": { "shipping": 0.011351, "returns": 0.978886, "billing": 0.009763 },
      "abstain": false,
      "abstention_status": "advisory"
    }
  },
  "usage": { "input_tokens": 49 }
}
```

## What Krun is for

Use Krun where your system has to pick one option from a known set:

* **Intent routing**: send a support message to the right queue or flow.
* **Tool routing**: pick the tool or function an agent should call.
* **Agent routing**: hand a task to the right specialized agent.
* **Classification**: label text with categories you define per request.
* **Structured decisions**: answer several questions about the same text (department, priority, risk) in one call.

Options are defined per request, so you don't need to train or deploy anything to change the label set.

## Start here

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Install the Python SDK and make your first decision in a few minutes.
  </Card>

  <Card title="Confidence and probabilities" icon="chart-simple" href="/concepts/confidence-and-probabilities">
    What the numbers in an answer mean, and what they don't.
  </Card>

  <Card title="Tool routing" icon="screwdriver-wrench" href="/guides/tool-routing">
    Choose the right tool for an agent step.
  </Card>

  <Card title="API reference" icon="code" href="/api-reference/overview">
    Endpoints, schemas and an interactive playground.
  </Card>
</CardGroup>

<Note>
  Krun is in closed beta. API keys are issued per project. [Request access](https://krun.ai) to get one.
</Note>
