# kosa8 cloud rl runs export

Write every rollout of an RL run as JSONL, oldest first (-o FILE, else stdout)

## Usage

```
kosa8 cloud rl runs export RUN
```

One JSON object a line, each a rollout as the API records it: step, group,
index, sandbox, reward, failure class, exit, duration, cost, tokens, metrics,
meta and the tail of its stdout. Ready for pandas (read_json(lines=True)),
DuckDB or jq.

## Flags

| Flag | Type | What it does | Default |
|---|---|---|---|
| `--output, -o` | string | write to this file instead of stdout |  |

## Example

```
  kosa8 cloud rl runs export run_8f2k -o rollouts.jsonl
  kosa8 cloud rl runs export run_8f2k | jq -s 'map(.reward) | add / length'
```

---
Source: https://docs.kosa8.com/reference/cloud-rl-runs-export/
