> ## 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 is `npm install @krun-ai/sdk` (Node.js 20+, server-side only); multimodal inputs, `multi` and assets need `@krun-ai/sdk` >= 0.3.0 and `krun-ai` >= 0.3.0.
> Question types: `choice`, `noul`, `score` and `multi`. The current model is `krun-one-v1` (`krun-one-v0` and `krun-one-v0.3` are aliases). `context` is a string or a list of content parts (`text`, `image`, `document`, `audio` by `asset_id` from `POST /v1/assets`). Use client timeouts of at least 180 s: cold starts can take up to about 2 minutes. `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.

# Krun agent skill

> Install the official Krun agent skill so Claude Code, Codex and other coding agents design Krun integrations correctly.

The Krun agent skill teaches coding agents how to build with Krun: when a decision model fits and when it doesn't,
which primitive to use (`choice`, `noul`, `score`, `multi`), how to act on probabilities and abstention, how to batch
questions for latency, and how to send images, documents and audio through assets. For version-dependent details, such
as limits and SDK signatures, the skill sends the agent to these docs.

* Source: [github.com/krun-ai/skills](https://github.com/krun-ai/skills)
* Skill file: [`skills/krun/SKILL.md`](https://github.com/krun-ai/skills/blob/main/skills/krun/SKILL.md)
* License: Apache-2.0

The skill is instructions only. It doesn't run code, call the Krun API or read your API key.

## Installation

<Tabs>
  <Tab title="Claude Code">
    Add the Krun marketplace and install the plugin:

    ```bash theme={null}
    claude plugin marketplace add krun-ai/skills
    claude plugin install krun@krun-ai
    ```

    Claude loads the skill when a task involves Krun. You can also invoke it directly with `/krun:krun`.
  </Tab>

  <Tab title="Other agents">
    Install with [skills.sh](https://skills.sh), which supports Codex, Cursor, Gemini CLI, GitHub Copilot and many
    other agents:

    ```bash theme={null}
    npx skills add krun-ai/skills --skill krun
    ```

    The CLI asks which agents to install to. Installation is project-local by default; add `-g` to install globally.
  </Tab>

  <Tab title="Manual">
    Copy the `skills/krun/` directory from [the repository](https://github.com/krun-ai/skills) into your agent's
    skills directory, for example `.claude/skills/krun/` for Claude Code.
  </Tab>
</Tabs>

## Use it

Describe the outcome you want and mention Krun:

```text theme={null}
Use Krun to route incoming support tickets and send uncertain decisions to human review.
```

```text theme={null}
Use Krun to classify uploaded invoices and flag uncertain documents for review.
```

The agent needs an API key only to run the code it writes. Set `KRUN_API_KEY` in your server environment. See
[Authentication](/api-reference/authentication).

## Update

<Tabs>
  <Tab title="Claude Code">
    ```bash theme={null}
    claude plugin marketplace update krun-ai
    claude plugin update krun@krun-ai
    ```
  </Tab>

  <Tab title="Other agents">
    ```bash theme={null}
    npx skills update
    ```
  </Tab>
</Tabs>

## Combine with the docs MCP server

The skill covers design; the [docs MCP server](/resources/ai-agents#docs-mcp-server) lets the agent search these docs
while it works. You can use both. See [Use these docs with AI agents](/resources/ai-agents).
