Getting started: from install to the first trajectory
Install Roller, check the configuration with a dry-run, collect real trajectories, locate the output files, and open the result in the Viewer.
This guide uses OpenClaw as the example and follows one batch of example Tasks from installation to saved trajectories. Other Harnesses follow the same main workflow: prepare the configuration, run a dry-run, collect trajectories, check the results, and open the Viewer. Images, API configuration, and Harness-specific options differ; refer to the corresponding Harness guide when adapting this workflow. If the terms Task, Harness, rollout, run, or trace are unfamiliar, read the Introduction first.
- Python 3.10+.
- Docker, installed separately and started:
docker versionshows both Client and Server information. - A model API that supports OpenAI Responses or Chat Completions, with its URL and API key.
- The OpenClaw image, which step 2 pulls.
Install Rollerβ
Use an isolated Python environment. These commands use Python 3.11:
- uv
- pip
uv venv --python 3.11
source .venv/bin/activate
uv pip install roller-agent
roller --version
Roller 0.8.0
python3 -m venv .venv
source .venv/bin/activate
python -m pip install roller-agent
roller --version
Roller 0.8.0
Write the example tasks and configuration templates into the working directory. The rest of this guide runs from this directory:
roller init
Wrote 18 files to examples
Next: cp examples/env/api.env.example examples/env/api.env and set the model service URL and API key
roller init creates examples/tasks, examples/config, examples/benchmarks and examples/env, and leaves files that already exist untouched.
Install from source instead
Install Roller from source if you want the latest changes or plan to contribute. A clone already contains examples/, so roller init is not needed there:
git clone https://github.com/Valen-Team/Roller.git
cd Roller
uv venv && source .venv/bin/activate
uv pip install -e ".[test]"
Prepare the OpenClaw imageβ
OpenClaw supports both OpenAI Responses and Chat Completions. Pull the pinned image:
docker pull ghcr.io/openclaw/openclaw:2026.11.10
Alternatively, load an existing archive:
docker load -i /path/to/openclaw-2026.11.10-linux-amd64.tar.gz
To use a custom image tag, pass it with --docker-image or set ROLLER_OPENCLAW_IMAGE.
Open Docker Desktop β Settings β Resources β Network, enable Enable host networking, and restart Docker Desktop. Roller uses host networking so that OpenClaw can reach its local request proxy.
Keep the default reasoning settings for the first run. Roller saves the visible reasoning text returned by the model service. If the service reports only reasoning token counts, no reasoning text is saved.
Configure the model APIβ
Copy the local environment template:
cp examples/env/api.env.example examples/env/api.env
In examples/env/api.env, set MY_PROXY_BASE_URL and MY_PROXY_API_KEY to the actual model service URL and API key. The other variables in the file are for the Codex and Claude Code Harnesses, a Chat Completions reasoning provider and OpenClaw web search, which this guide does not use; leave their placeholder values as they are.
MY_PROXY_BASE_URL=https://api.example.com/v1
MY_PROXY_API_KEY=replace-with-your-api-key
Save the file, then load the variables into the current shell:
set -a
source examples/env/api.env
set +a
The OpenClaw model configuration reads these variables. roller init writes it with a placeholder model:
{
"mode": "merge",
"providers": {
"my-openai-proxy": {
"baseUrl": "${MY_PROXY_BASE_URL}",
"apiKey": "${MY_PROXY_API_KEY}",
"api": "openai-responses",
"models": [
{
"id": "my-model",
"name": "My model"
}
]
}
}
}
Set the model id to the name of the model in use. In subsequent commands, the model ID after the provider name must exactly match this id. For example, if id is set to qwen3.8-flash, use --model my-openai-proxy/qwen3.8-flash in subsequent commands. The commands below keep my-model.
Look at the example Tasksβ
examples/tasks/tasks.jsonl contains four tasks, ordered from simple to complex:
| ID | Demonstrates |
|---|---|
01_text_only | Single-turn plain text |
02_local_markdown | Read an input file and write to outputs/ |
03_user_memory_context | Inject USER.md and MEMORY.md |
04_multi_turn | Two predefined user messages share one session |
Dry-runβ
Before real collection, a dry-run checks that Roller can read the tasks and options, then previews the rollouts it would run:
roller collect \
--tasks examples/tasks/tasks.jsonl \
--model my-openai-proxy/my-model \
--model-config examples/config/openclaw/models.json \
--parallel 4 \
--dry-run
{
"dry_run": true,
"harness": "openclaw",
"docker_image": "ghcr.io/openclaw/openclaw:2026.11.10",
"tasks": 4,
"models": [
"my-openai-proxy/my-model"
],
...
"trajectories": 4,
"parallel": 4,
...
"plan": [
{
"request_index": 0,
"task_id": "01_text_only",
...
"task_bundle_digest": "59c6e0934518add014b44b7b8e3c954d3266e51ec2dcad7a9e366edaaa943063",
...
A dry-run does not start containers, call the model API, or write any file; it reads each input once to validate it and lists the bundle digests a real run would record. Proceed to real collection after the dry-run completes without errors.
Collect trajectoriesβ
roller collect \
--tasks examples/tasks/tasks.jsonl \
--model my-openai-proxy/my-model \
--model-config examples/config/openclaw/models.json \
--parallel 4 \
--retries 1 \
--timeout 600 \
--output runs \
--run-name quickstart
| Flag | Meaning |
|---|---|
--parallel 4 | Run at most 4 rollouts at once |
--retries 1 | After the first failure, retry at most 1 additional time |
--timeout 600 | Total timeout per rollout is 600 seconds |
--output runs | Host root directory for all runs |
--run-name quickstart | This run is saved as runs/quickstart |
If a directory with the same name already exists, Roller refuses to overwrite it by default. To continue the original run, add --resume. To start a new experiment, use a new --run-name.
Check the resultsβ
After collection succeeds, inspect the run root:
runs/quickstart/
βββ info.json
βββ lock.json
βββ sft.jsonl
βββ samples/
βββ <model>/
βββ <index>_<task-id>/
Most successful samples contain at least the following files:
trace.jsonl
trace_ACTF.json
info.json
Linear samples also contain trace_SFT.json. If main-agent context was compacted, info.json lists trajectory.sft_segments, and the SFT records are stored as sft_segments/0001.json, 0002.json, and so on. A successful sample can also record SFT as unavailable when its context cannot be represented safely.
Check the following items in order:
- Whether
statein the top-levelinfo.jsonfor the run isfinished,summary.failedis0, andsummary.completedmatches the expected number of executions. - Whether
statusin every sampleinfo.jsonisokandusage.request_countis greater than0. - Whether
trace_ACTF.jsoncontains the complete user input and model output. If tools were called, verify that each call is paired with its result. - Whether each available SFT record has
messagesandtools; image records also haveimages, and compaction segments havetarget_start_index. - For tasks that must deliver files, whether the sample
results/contains the expected files. - Whether run
sft.jsonlhas one line per eligible linear SFT sample. Compacted samples stay insft_segments/and require a training reader that honorstarget_start_index; they never enter the legacy run dataset.
Trajectory outputs describes when each file is written and what is retained on failure.
Open the Viewerβ
roller view runs/quickstart
The Viewer listens on 127.0.0.1:17865 by default and switches to a free port if that port is in use. After the command starts, open the printed URL in a browser.
The Viewer shows the ACTF timeline. The Inspector shows the system prompt, tools schema, run info, and raw content. For details, see the Viewer guide.
Next stepsβ
Common issuesβ
Docker preflight failedβ
Check whether docker version can reach the Server and whether the image has been pulled or loaded.
OpenClaw cannot find the modelβ
Check whether --model matches provider/models[].id in the JSON exactly.
Configuration reports a missing environment variableβ
Check whether source examples/env/api.env has been run and whether the placeholder names match.
/responses returns 404β
The service may support only Chat Completions. Set the OpenClaw provider api to openai-completions.
A run with the same name already existsβ
Use --resume for the original experiment. Change --run-name for a new one.
The Viewer does not show new tasksβ
Confirm that the run root directory was passed, refresh the page, and check the run info.json.
The OpenClaw Harness guide lists additional OpenClaw-specific errors.