Skip to main content

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.

Before you start
  • Python 3.10+.
  • Docker, installed separately and started: docker version shows 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:

Terminal
uv venv --python 3.11
source .venv/bin/activate
uv 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:

Terminal
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:

Terminal
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:

Terminal
docker pull ghcr.io/openclaw/openclaw:2026.11.10

Alternatively, load an existing archive:

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

macOS

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.

Tip

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:

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

examples/env/api.env
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:

Terminal
set -a
source examples/env/api.env
set +a

The OpenClaw model configuration reads these variables. roller init writes it with a placeholder model:

examples/config/openclaw/models.json
{
"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:

IDDemonstrates
01_text_onlySingle-turn plain text
02_local_markdownRead an input file and write to outputs/
03_user_memory_contextInject USER.md and MEMORY.md
04_multi_turnTwo 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:

Terminal
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​

Terminal
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
FlagMeaning
--parallel 4Run at most 4 rollouts at once
--retries 1After the first failure, retry at most 1 additional time
--timeout 600Total timeout per rollout is 600 seconds
--output runsHost root directory for all runs
--run-name quickstartThis run is saved as runs/quickstart
Note

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:

Text
runs/quickstart/
β”œβ”€β”€ info.json
β”œβ”€β”€ lock.json
β”œβ”€β”€ sft.jsonl
└── samples/
└── <model>/
└── <index>_<task-id>/

Most successful samples contain at least the following files:

Text
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:

  1. Whether state in the top-level info.json for the run is finished, summary.failed is 0, and summary.completed matches the expected number of executions.
  2. Whether status in every sample info.json is ok and usage.request_count is greater than 0.
  3. Whether trace_ACTF.json contains the complete user input and model output. If tools were called, verify that each call is paired with its result.
  4. Whether each available SFT record has messages and tools; image records also have images, and compaction segments have target_start_index.
  5. For tasks that must deliver files, whether the sample results/ contains the expected files.
  6. Whether run sft.jsonl has one line per eligible linear SFT sample. Compacted samples stay in sft_segments/ and require a training reader that honors target_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​

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