Stirrup Harness guide
Install the Stirrup extra, choose a container image or remote sandbox, connect a Chat Completions endpoint and run Stirrup with its sampling and context flags.
The Stirrup Harness runs Stirrup 0.2.2 in the Roller process while a Docker container or remote sandbox executes the agent's commands and holds the task workspace. The container receives no model API key and needs no network egress for model calls.
For Task fields, see Task format reference. For shared outputs, see Trajectory output file guide.
When to use it
Stirrup speaks OpenAI Chat Completions. Use it when:
- the agent loop should stay on the host, so the container or sandbox needs no model API key and no egress.
- a task is a single prompt: Stirrup runs one prompt per task and does not serve as a User Simulator.
- the built-in tools
code_exec,view_image, andfinishare enough for the task.
Prerequisites
- Python 3.12 or later.
- A Docker daemon, or a remote sandbox provider (see the next step).
- An OpenAI Chat Completions endpoint, with its API address, an API key, and a model ID.
Install the Stirrup extra
Stirrup requires the stirrup extra of Roller:
- uv
- pip
uv pip install 'roller-agent[stirrup]'
pip install 'roller-agent[stirrup]'
pdf extraThe stirrup extra cannot be installed together with the pdf extra in the same Python environment because of Pillow version constraints.
Choose a container image or remote sandbox
The default Docker image is python:3.13-slim. Any image that includes bash, GNU coreutils and the packages required by the task works; no Stirrup runtime needs to be installed inside the container.
To run commands in a remote sandbox instead of Docker, install a provider package registered under the roller.sandbox_providers entry point and pass --sandbox-provider NAME --sandbox-template NAME. The Stirrup agent loop stays in the Roller host process while the sandbox executes commands and stores task files.
Configure the model API
Stirrup forwards requests through Roller's local request recording proxy.
| Setting | Default source | CLI override |
|---|---|---|
| API address | OPENAI_BASE_URL | --stirrup-api-base, or --api-base for a single-Harness run |
| API key | OPENAI_API_KEY | --stirrup-api-key-env, or --api-key-env for a single-Harness run |
| Model ID | Task model or --model | Sent to the endpoint unchanged |
export OPENAI_API_KEY='...'
Run a collection
roller collect \
--harness stirrup \
--tasks examples/tasks/tasks.jsonl \
--model my-model \
--api-base http://localhost:8000/v1 \
--api-key-env OPENAI_API_KEY \
--capture-calls \
--output runs \
--run-name stirrup-demo
Stirrup-specific flags
| Flag | Default | Purpose |
|---|---|---|
--docker-image / --stirrup-image | ROLLER_STIRRUP_IMAGE or python:3.13-slim | Container image that executes code_exec commands |
--stirrup-max-steps | 30 | Maximum agent turns per prompt |
--stirrup-context-length | 128000 | Model context window; Stirrup summarizes history at 70% of this limit |
--stirrup-output-tokens | 8192 | max_tokens sent per model request |
--stirrup-command-timeout | 180 | Per-command timeout in seconds inside the container or sandbox |
--stirrup-temperature | None | Sampling temperature |
--stirrup-top-p | None | Nucleus sampling top_p |
--stirrup-seed | None | Base seed; each sample derives its deterministic seed from this value, the task ID and the sample index |
--stirrup-request-set KEY=JSON | None | Repeatable extra JSON fields merged into each Chat Completions request |
--thinking | None | Sent as chat_template_kwargs.reasoning_effort |
Sessions and trajectories
- No proxy forwarding into the container: Because model requests start in the Roller host process, Stirrup passes no proxy variables into the task container.
- Compaction and token IDs:
--wire-trace full,--capture-calls, and--token-idswork in both Docker and remote sandboxes. When Stirrup summarizes conversation history, captured Calls split SFT into separate context windows undersft_segments/, including the summary request as its own window. - No output directory mode: Tasks may set
files.output_dir: nullso Roller collects nothing from the workspace (used by VIALS).